Skip to content

Commit aad43aa

Browse files
committed
version 1.1.7. Supports 9.2dev.
1 parent 960930b commit aad43aa

File tree

6 files changed

+64
-8
lines changed

6 files changed

+64
-8
lines changed

bin/pg_reorg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @brief Client Modules
1010
*/
1111

12-
const char *PROGRAM_VERSION = "1.1.6";
12+
const char *PROGRAM_VERSION = "1.1.7";
1313
const char *PROGRAM_URL = "http://reorg.projects.postgresql.org/";
1414
const char *PROGRAM_EMAIL = "reorg-general@lists.pgfoundry.org";
1515

doc/pg_reorg-ja.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</head>
99

1010
<body>
11-
<h1 id="pg_reorg">pg_reorg 1.1.6</h1>
11+
<h1 id="pg_reorg">pg_reorg 1.1.7</h1>
1212
<div class="navigation">
1313
<a href="index-ja.html">Top</a> &gt;
1414
<a href="pg_reorg-ja.html">pg_reorg</a>
@@ -27,6 +27,7 @@ <h1 id="pg_reorg">pg_reorg 1.1.6</h1>
2727
<li><a href="#details">詳細</a></li>
2828
<li><a href="#install">インストール方法</a></li>
2929
<li><a href="#requirement">動作環境</a></li>
30+
<li><a href="#releases">更新履歴</a></li>
3031
<li><a href="#seealso">関連項目</a></li>
3132
</ol>
3233
</div>
@@ -320,6 +321,14 @@ <h2 id="requirement">動作環境</h2>
320321
<dd>処理対象のテーブル、インデックスサイズの2倍以上のディスク空き容量 (対象が1GBならば、さらに追加で2GB)</dd>
321322
</dl>
322323

324+
<h2 id="releases">更新履歴</h2>
325+
<ul>
326+
<li>1.1.7 (2011-08-07)<ul>
327+
<li>バグ修正: DROPされた列を持つテーブルを再編成した場合に、そのテーブルを使用するビューや関数が破損する可能性があった。</li>
328+
<li>PostgreSQL 9.1, 9.2dev のサポート (EXTENSION はまだ)</li>
329+
</ul></li>
330+
</ul>
331+
323332
<h2 id="seealso">関連項目</h2>
324333
<a href="http://www.postgresql.jp/document/current/html/app-clusterdb.html">clusterdb</a>,
325334
<a href="http://www.postgresql.jp/document/current/html/app-vacuumdb.html">vacuumdb</a>

doc/pg_reorg.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</head>
99

1010
<body>
11-
<h1 id="pg_reorg">pg_reorg 1.1.6</h1>
11+
<h1 id="pg_reorg">pg_reorg 1.1.7</h1>
1212
<div class="navigation">
1313
<a href="index.html">Top</a> &gt;
1414
<a href="pg_reorg.html">pg_reorg</a>
@@ -308,6 +308,14 @@ <h2 id="requirement">Requirements</h2>
308308
<dt>Disks</dt><dd>Requires amount of disks twice larger than target table and indexes. (If the total size of targets are 1GB, additional 2GB of disks are required.)</dd>
309309
</dl>
310310

311+
<h2 id="releases">Releases</h2>
312+
<ul>
313+
<li>1.1.7 (2011-08-07)<ul>
314+
<li>Bugfix: VIEWs and FUNCTIONs could be corrupted that used a reorganized table which has a dropped column.</li>
315+
<li>Supports PostgreSQL 9.1 and 9.2dev. (but EXTENSION is not yet)</li>
316+
</ul></li>
317+
</ul>
318+
311319
<h2 id="seealso">See Also</h2>
312320
<a href="http://developer.postgresql.org/pgdocs/postgres/app-clusterdb.html">clusterdb</a>,
313321
<a href="http://developer.postgresql.org/pgdocs/postgres/app-vacuumdb.html">vacuumdb</a>

lib/pgut/pgut-be.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/*-------------------------------------------------------------------------
2+
*
23
* pgut-be.c
34
*
4-
* Portions Copyright (c) 2008-2011, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
5-
* Portions Copyright (c) 2011, Itagaki Takahiro
5+
* Copyright (c) 2009-2011, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
6+
*
67
*-------------------------------------------------------------------------
78
*/
89

@@ -48,4 +49,22 @@ tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
4849
tuplestore_puttuple(state, heap_form_tuple(tdesc, values, isnull));
4950
}
5051

52+
Datum
53+
ExecFetchSlotTupleDatum(TupleTableSlot *slot)
54+
{
55+
HeapTuple tup;
56+
HeapTupleHeader td;
57+
TupleDesc tupdesc;
58+
59+
/* Make sure we can scribble on the slot contents ... */
60+
tup = ExecMaterializeSlot(slot);
61+
/* ... and set up the composite-Datum header fields, in case not done */
62+
td = tup->t_data;
63+
tupdesc = slot->tts_tupleDescriptor;
64+
HeapTupleHeaderSetDatumLength(td, tup->t_len);
65+
HeapTupleHeaderSetTypeId(td, tupdesc->tdtypeid);
66+
HeapTupleHeaderSetTypMod(td, tupdesc->tdtypmod);
67+
return PointerGetDatum(td);
68+
}
69+
5170
#endif

lib/pgut/pgut-be.h

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/*-------------------------------------------------------------------------
2+
*
23
* pgut-be.h
34
*
4-
* Portions Copyright (c) 2008-2011, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
5-
* Portions Copyright (c) 2011, Itagaki Takahiro
5+
* Copyright (c) 2009-2011, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
6+
*
67
*-------------------------------------------------------------------------
78
*/
89

@@ -99,6 +100,8 @@ extern int no_such_variable
99100
#define pgstat_end_function_usage(fcu, finalize) ((void)0)
100101
#define makeRangeVar(schemaname, relname, location) \
101102
makeRangeVar((schemaname), (relname))
103+
#define tuplestore_gettupleslot(state, forward, copy, slot) \
104+
tuplestore_gettupleslot(state, forward, slot)
102105
#define pgstat_track_activity_query_size PGBE_ACTIVITY_SIZE
103106
typedef void *BulkInsertState;
104107

@@ -134,6 +137,7 @@ extern char *text_to_cstring(const text *t);
134137
extern text *cstring_to_text(const char *s);
135138
extern void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
136139
Datum *values, bool *isnull);
140+
extern Datum ExecFetchSlotTupleDatum(TupleTableSlot *slot);
137141

138142
#define CStringGetTextDatum(s) PointerGetDatum(cstring_to_text(s))
139143
#define TextDatumGetCString(d) text_to_cstring((text *) DatumGetPointer(d))
@@ -146,7 +150,13 @@ extern void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
146150
reindex_index((indexId))
147151
#define func_signature_string(funcname, nargs, argnames, argtypes) \
148152
func_signature_string((funcname), (nargs), (argtypes))
149-
#define GetConfigOption(name, restrict_superuser) GetConfigOption((name))
153+
154+
#endif
155+
156+
#if PG_VERSION_NUM < 90200
157+
158+
#define RangeVarGetRelid(relation, lockmode, missing_ok, nowait) \
159+
RangeVarGetRelid((relation), (missing_ok))
150160

151161
#endif
152162

@@ -156,6 +166,7 @@ extern void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
156166
ATExecChangeOwner((relationOid), (newOwnerId), (recursing))
157167
#define deleteDependencyRecordsFor(classId, objectId, skipExtensionDeps) \
158168
deleteDependencyRecordsFor((classId), (objectId))
169+
#define PG_GET_COLLATION() (InvalidOid)
159170

160171
#endif
161172

@@ -175,4 +186,12 @@ extern void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
175186
FuncnameGetCandidates((names), (nargs), (variadic), (defaults))
176187
#endif
177188

189+
#if PG_VERSION_NUM < 90000
190+
#define GetConfigOption(name, missing_ok, restrict_superuser) \
191+
GetConfigOption((name))
192+
#elif PG_VERSION_NUM < 90200
193+
#define GetConfigOption(name, missing_ok, restrict_superuser) \
194+
GetConfigOption((name), (restrict_superuser))
195+
#endif
196+
178197
#endif /* PGUT_BE_H */

lib/reorg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "miscadmin.h"
2424
#include "utils/builtins.h"
2525
#include "utils/lsyscache.h"
26+
#include "utils/rel.h"
2627
#include "utils/relcache.h"
2728
#include "utils/syscache.h"
2829

0 commit comments

Comments
 (0)