Fix inconsistencies for v12
Hello hackers,
Please also consider fixing the following inconsistencies found in new
v12 code:
1. AT_AddOids - remove (orphaned after 578b2297)
2. BeingModified ->TM_BeingModified (for consistency)
3. copy_relation_data -> remove (orphaned after d25f5191)
4. endblock -> endblk (an internal inconsistency)
5. ExecContextForcesOids - not changed, but may be should be removed
(orphaned after 578b2297)
6. ExecGetResultSlot - remove (not used since introduction in 1a0586de)
7. existedConstraints & partConstraint -> provenConstraint &
testConstraint (sync with implementation)
8. heap_parallelscan_initialize -> remove the sentence (changed in c2fe139c)
9. heap_rescan_set_params - remove (orphaned after c2fe139c)
10. HeapTupleSatisfiesSnapshot -> HeapTupleSatisfiesVisibility (an
internal inconsistency)
11. interpretOidsOption - remove (orphaned after 578b2297)
12. item_itemno -> iter_itemno (an internal inconsistency)
13. iterset_is_member -> intset_is_member (an internal inconsistency)
14. latestRemovedxids -> latestRemovedXids (an inconsistent case)
15. newrode -> newrnode (an internal inconsistency)
16. NextSampletuple -> NextSampleTuple (an inconsistent case)
17. oid_typioparam - remove? (orphaned after 578b2297)
18. recoveryTargetIsLatest - remove (orphaned after 2dedf4d9)
19. register_unlink -> register_unlink_segment (an internal inconsistency)
20. RelationGetOidIndex ? just to remove the paragraph (orphaned after
578b2297)
21. slot_getsomeattr -> checked in slot_getsomeattrs ? (an internal
inconsistency and questionable grammar)
22. spekToken -> specToken (an internal inconsistency)
23. SSLdone -> secure_done (sync with implementation)
24. stats_relation & keep_buf - remove (orphaned after 9a8ee1dc & 5db6df0c0)
25. SyncRequstHandler -> SyncRequestHandler (a typo)
26. table_needs_toast_table -> table_relation_needs_toast_table (an
internal inconsistency)
27. XactTopTransactionId -> XactTopFullTransactionId (an internal
inconsistency)
The separate patches for all the defects (except 5) are attached. In
case a single patch is preferable, I can produce it too.
Best regards,
Alexander
Attachments:
AT_AddOids.patchtext/x-patch; name=AT_AddOids.patchDownload
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index c9b8857d30..e4627d2026 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -5512,8 +5512,8 @@ ATPrepAddColumn(List **wqueue, Relation rel, bool recurse, bool recursing,
}
/*
- * Add a column to a table; this handles the AT_AddOids cases as well. The
- * return value is the address of the new column in the parent relation.
+ * Add a column to a table. The return value is the address of the
+ * new column in the parent relation.
*/
static ObjectAddress
ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel,
BeingModified.patchtext/x-patch; name=BeingModified.patchDownload
diff --git a/contrib/pgrowlocks/pgrowlocks.c b/contrib/pgrowlocks/pgrowlocks.c
index a2c44a916c..caf036f40b 100644
--- a/contrib/pgrowlocks/pgrowlocks.c
+++ b/contrib/pgrowlocks/pgrowlocks.c
@@ -165,7 +165,7 @@ pgrowlocks(PG_FUNCTION_ARGS)
infomask = tuple->t_data->t_infomask;
/*
- * A tuple is locked if HTSU returns BeingModified.
+ * A tuple is locked if HTSU returns TM_BeingModified.
*/
if (htsu == TM_BeingModified)
{
copy_relation_data.patchtext/x-patch; name=copy_relation_data.patchDownload
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index 131ec7b8d7..19617e6eaa 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -350,10 +350,9 @@ end_heap_rewrite(RewriteState state)
*
* It's obvious that we must do this when not WAL-logging. It's less
* obvious that we have to do it even if we did WAL-log the pages. The
- * reason is the same as in tablecmds.c's copy_relation_data(): we're
- * writing data that's not in shared buffers, and so a CHECKPOINT
- * occurring during the rewriteheap operation won't have fsync'd data we
- * wrote before the checkpoint.
+ * reason is that we're writing data that's not in shared buffers, and
+ * so a CHECKPOINT occurring during the rewriteheap operation won't
+ * have fsync'd data we wrote before the checkpoint.
*/
if (RelationNeedsWAL(state->rs_new_rel))
heap_sync(state->rs_new_rel);
endblock.patchtext/x-patch; name=endblock.patchDownload
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index d3c0a93a2e..3ec67d468b 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -1024,7 +1024,7 @@ log_newpage_buffer(Buffer buffer, bool page_std)
/*
* WAL-log a range of blocks in a relation.
*
- * An image of all pages with block numbers 'startblk' <= X < 'endblock' is
+ * An image of all pages with block numbers 'startblk' <= X < 'endblk' is
* written to the WAL. If the range is large, this is done in multiple WAL
* records.
*
ExecGetResultSlot.patchtext/x-patch; name=ExecGetResultSlot.patchDownload
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index 88134bcc71..d056fd6151 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -514,7 +514,6 @@ extern ExprContext *MakePerTupleExprContext(EState *estate);
extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
extern TupleDesc ExecGetResultType(PlanState *planstate);
-extern TupleTableSlot ExecGetResultSlot(PlanState *planstate);
extern const TupleTableSlotOps *ExecGetResultSlotOps(PlanState *planstate,
bool *isfixed);
extern void ExecAssignProjectionInfo(PlanState *planstate,
existedConstraints.patchtext/x-patch; name=existedConstraints.patchDownload
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index c9b8857d30..23c7674881 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -379,7 +379,7 @@ static void ATExecCheckNotNull(AlteredTableInfo *tab, Relation rel,
const char *colName, LOCKMODE lockmode);
static bool NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr);
static bool ConstraintImpliedByRelConstraint(Relation scanrel,
- List *partConstraint, List *existedConstraints);
+ List *testConstraint, List *provenConstraint);
static ObjectAddress ATExecColumnDefault(Relation rel, const char *colName,
Node *newDefault, LOCKMODE lockmode);
static ObjectAddress ATExecAddIdentity(Relation rel, const char *colName,
heap_parallelscan_initialize.patchtext/x-patch; name=heap_parallelscan_initialize.patchDownload
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 419da8784a..595e0876f0 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -238,9 +238,6 @@ initscan(HeapScanDesc scan, ScanKey key, bool keep_startblock)
* (However, some callers need to be able to disable one or both of these
* behaviors, independently of the size of the table; also there is a GUC
* variable that can disable synchronized scanning.)
- *
- * Note that heap_parallelscan_initialize has a very similar test; if you
- * change this, consider changing that one, too.
*/
if (!RelationUsesLocalBuffers(scan->rs_base.rs_rd) &&
scan->rs_nblocks > NBuffers / 4)
heap_rescan_set_params.patchtext/x-patch; name=heap_rescan_set_params.patchDownload
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index b88bd8a4d7..dffb57bf11 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -116,8 +116,6 @@ extern void heap_setscanlimits(TableScanDesc scan, BlockNumber startBlk,
extern void heapgetpage(TableScanDesc scan, BlockNumber page);
extern void heap_rescan(TableScanDesc scan, ScanKey key, bool set_params,
bool allow_strat, bool allow_sync, bool allow_pagemode);
-extern void heap_rescan_set_params(TableScanDesc scan, ScanKey key,
- bool allow_strat, bool allow_sync, bool allow_pagemode);
extern void heap_endscan(TableScanDesc scan);
extern HeapTuple heap_getnext(TableScanDesc scan, ScanDirection direction);
extern bool heap_getnextslot(TableScanDesc sscan,
HeapTupleSatisfiesSnapshot.patchtext/x-patch; name=HeapTupleSatisfiesSnapshot.patchDownload
diff --git a/src/backend/access/heap/heapam_visibility.c b/src/backend/access/heap/heapam_visibility.c
index 537e681b23..2e3764d3c5 100644
--- a/src/backend/access/heap/heapam_visibility.c
+++ b/src/backend/access/heap/heapam_visibility.c
@@ -1392,7 +1392,7 @@ HeapTupleSatisfiesVacuum(HeapTuple htup, TransactionId OldestXmin,
* See SNAPSHOT_TOAST's definition for the intended behaviour.
*
* This is an interface to HeapTupleSatisfiesVacuum that's callable via
- * HeapTupleSatisfiesSnapshot, so it can be used through a Snapshot.
+ * HeapTupleSatisfiesVisibility, so it can be used through a Snapshot.
* snapshot->xmin must have been set up with the xmin horizon to use.
*/
static bool
interpretOidsOption.patchtext/x-patch; name=interpretOidsOption.patchDownload
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 4d0d24be0b..de06c92574 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -52,9 +52,6 @@
* (v) make sure the lock level is set correctly for that operation
* (vi) don't forget to document the option
*
- * Note that we don't handle "oids" in relOpts because it is handled by
- * interpretOidsOption().
- *
* The default choice for any new option should be AccessExclusiveLock.
* In some cases the lock level can be reduced from there, but the lock
* level chosen should always conflict with itself to ensure that multiple
item_itemno.patchtext/x-patch; name=item_itemno.patchDownload
diff --git a/src/backend/lib/integerset.c b/src/backend/lib/integerset.c
index 6921955f85..6d51c7903e 100644
--- a/src/backend/lib/integerset.c
+++ b/src/backend/lib/integerset.c
@@ -236,7 +236,7 @@ struct IntegerSet
*
* 'iter_values' is an array of integers ready to be returned to the
* caller; 'iter_num_values' is the length of that array, and
- * 'iter_valueno' is the next index. 'iter_node' and 'item_itemno' point
+ * 'iter_valueno' is the next index. 'iter_node' and 'iter_itemno' point
* to the leaf node, and item within the leaf node, to get the next batch
* of values from.
*
iterset_is_member.patchtext/x-patch; name=iterset_is_member.patchDownload
diff --git a/src/test/modules/test_integerset/test_integerset.c b/src/test/modules/test_integerset/test_integerset.c
index 346bb779bf..15b9ce1ac3 100644
--- a/src/test/modules/test_integerset/test_integerset.c
+++ b/src/test/modules/test_integerset/test_integerset.c
@@ -581,7 +581,7 @@ test_huge_distances(void)
intset_add_member(intset, values[i]);
/*
- * Test iterset_is_member() around each of these values
+ * Test intset_is_member() around each of these values
*/
for (int i = 0; i < num_values; i++)
{
latestRemovedxids.patchtext/x-patch; name=latestRemovedxids.patchDownload
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 419da8784a..8907243e6c 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -7085,7 +7085,7 @@ heap_compute_xid_horizon_for_tuples(Relation rel,
* Conjecture: if hitemid is dead then it had xids before the xids
* marked on LP_NORMAL items. So we just ignore this item and move
* onto the next, for the purposes of calculating
- * latestRemovedxids.
+ * latestRemovedXids.
*/
}
else
newrode.patchtext/x-patch; name=newrode.patchDownload
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index bf3a472018..e3619b8e7e 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -1331,7 +1331,7 @@ table_finish_bulk_insert(Relation rel, int options)
*/
/*
- * Create storage for `rel` in `newrode`, with persistence set to
+ * Create storage for `rel` in `newrnode`, with persistence set to
* `persistence`.
*
* This is used both during relation creation and various DDL operations to
NextSampletuple.patchtext/x-patch; name=NextSampletuple.patchDownload
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index bf3a472018..92a799652d 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -691,7 +691,7 @@ typedef struct TableAmRoutine
* block using the TsmRoutine's NextSampleTuple() callback.
*
* The callback needs to perform visibility checks, and only return
- * visible tuples. That obviously can mean calling NextSampletuple()
+ * visible tuples. That obviously can mean calling NextSampleTuple()
* multiple times.
*
* The TsmRoutine interface assumes that there's a maximum offset on a
oid_typioparam.patchtext/x-patch; name=oid_typioparam.patchDownload
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index a8ff304909..20a1d599c0 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -177,7 +177,6 @@ typedef struct CopyStateData
*/
AttrNumber num_defaults;
FmgrInfo oid_in_function;
- Oid oid_typioparam;
FmgrInfo *in_functions; /* array of input functions for each attrs */
Oid *typioparams; /* array of element types for in_functions */
int *defmap; /* array of default att numbers */
recoveryTargetIsLatest.patchtext/x-patch; name=recoveryTargetIsLatest.patchDownload
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 1c7dd51b9f..e08320e829 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -314,8 +314,6 @@ static bool recoveryStopAfter;
*
* recoveryTargetTLI: the currently understood target timeline; changes
*
- * recoveryTargetIsLatest: was the requested target timeline 'latest'?
- *
* expectedTLEs: a list of TimeLineHistoryEntries for recoveryTargetTLI and the timelines of
* its known parents, newest first (so recoveryTargetTLI is always the
* first list member). Only these TLIs are expected to be seen in the WAL
register_unlink.patchtext/x-patch; name=register_unlink.patchDownload
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index bbcd18d52b..64acc3fa43 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -921,7 +921,7 @@ register_dirty_segment(SMgrRelation reln, ForkNumber forknum, MdfdVec *seg)
}
/*
- * register_unlink() -- Schedule a file to be deleted after next checkpoint
+ * register_unlink_segment() -- Schedule a file to be deleted after next checkpoint
*/
static void
register_unlink_segment(RelFileNodeBackend rnode, ForkNumber forknum,
RelationGetOidIndex.patchtext/x-patch; name=RelationGetOidIndex.patchDownload
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 11936a6571..a6e5119099 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -317,13 +317,6 @@ IsSharedRelation(Oid relationId)
* consecutive existing OIDs. This is a mostly reasonable assumption for
* system catalogs.
*
- * This is exported separately because there are cases where we want to use
- * an index that will not be recognized by RelationGetOidIndex: TOAST tables
- * have indexes that are usable, but have multiple columns and are on
- * ordinary columns rather than a true OID column. This code will work
- * anyway, so long as the OID is the index's first column. The caller must
- * pass in the actual heap attnum of the OID column, however.
- *
* Caller must have a suitable lock on the relation.
*/
Oid
slot_getsomeattr.patchtext/x-patch; name=slot_getsomeattr.patchDownload
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c
index 968e2039d1..5d2baf532d 100644
--- a/src/backend/executor/execTuples.c
+++ b/src/backend/executor/execTuples.c
@@ -1867,7 +1867,7 @@ void
slot_getsomeattrs_int(TupleTableSlot *slot, int attnum)
{
/* Check for caller errors */
- Assert(slot->tts_nvalid < attnum); /* slot_getsomeattr checked */
+ Assert(slot->tts_nvalid < attnum); /* checked in slot_getsomeattrs */
Assert(attnum > 0);
if (unlikely(attnum > slot->tts_tupleDescriptor->natts))
spekToken.patchtext/x-patch; name=spekToken.patchDownload
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index a4a28e88ec..f53a6fed6b 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -286,7 +286,7 @@ heapam_tuple_insert_speculative(Relation relation, TupleTableSlot *slot,
static void
heapam_tuple_complete_speculative(Relation relation, TupleTableSlot *slot,
- uint32 spekToken, bool succeeded)
+ uint32 specToken, bool succeeded)
{
bool shouldFree = true;
HeapTuple tuple = ExecFetchSlotHeapTuple(slot, true, &shouldFree);
SSLdone.patchtext/x-patch; name=SSLdone.patchDownload
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 8e098e401b..dd16938d9c 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -404,7 +404,7 @@ static void BackendRun(Port *port) pg_attribute_noreturn();
static void ExitPostmaster(int status) pg_attribute_noreturn();
static int ServerLoop(void);
static int BackendStartup(Port *port);
-static int ProcessStartupPacket(Port *port, bool SSLdone);
+static int ProcessStartupPacket(Port *port, bool secure_done);
static void SendNegotiateProtocolVersion(List *unrecognized_protocol_options);
static void processCancelRequest(Port *port, void *pkt);
static int initMasks(fd_set *rmask);
stats_relation.patchtext/x-patch; name=stats_relation.patchDownload
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 419da8784a..34624d6953 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -1396,15 +1396,6 @@ heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *s
* If the tuple is found but fails the time qual check, then false is returned
* but tuple->t_data is left pointing to the tuple.
*
- * keep_buf determines what is done with the buffer in the false-result cases.
- * When the caller specifies keep_buf = true, we retain the pin on the buffer
- * and return it in *userbuf (so the caller must eventually unpin it); when
- * keep_buf = false, the pin is released and *userbuf is set to InvalidBuffer.
- *
- * stats_relation is the relation to charge the heap_fetch operation against
- * for statistical purposes. (This could be the heap rel itself, an
- * associated index, or NULL to not count the fetch at all.)
- *
* heap_fetch does not follow HOT chains: only the exact TID requested will
* be fetched.
*
SyncRequstHandler.patchtext/x-patch; name=SyncRequstHandler.patchDownload
diff --git a/src/include/storage/sync.h b/src/include/storage/sync.h
index 1e453a5b30..16428c5f5f 100644
--- a/src/include/storage/sync.h
+++ b/src/include/storage/sync.h
@@ -44,7 +44,7 @@ typedef enum SyncRequestHandler
*/
typedef struct FileTag
{
- int16 handler; /* SyncRequstHandler value, saving space */
+ int16 handler; /* SyncRequestHandler value, saving space */
int16 forknum; /* ForkNumber, saving space */
RelFileNode rnode;
uint32 segno;
table_needs_toast_table.patchtext/x-patch; name=table_needs_toast_table.patchDownload
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index bf3a472018..45590c5797 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -1597,7 +1597,7 @@ table_relation_size(Relation rel, ForkNumber forkNumber)
}
/*
- * table_needs_toast_table - does this relation need a toast table?
+ * table_relation_needs_toast_table - does this relation need a toast table?
*/
static inline bool
table_relation_needs_toast_table(Relation rel)
XactTopTransactionId.patchtext/x-patch; name=XactTopTransactionId.patchDownload
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index f1108ccc8b..718f71173e 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -91,7 +91,7 @@ int synchronous_commit = SYNCHRONOUS_COMMIT_ON;
* need to return the same answers in the parallel worker as they would have
* in the user backend, so we need some additional bookkeeping.
*
- * XactTopTransactionId stores the XID of our toplevel transaction, which
+ * XactTopFullTransactionId stores the XID of our toplevel transaction, which
* will be the same as TopTransactionState.transactionId in an ordinary
* backend; but in a parallel backend, which does not have the entire
* transaction state, it will instead be copied from the backend that started
On Sun, May 26, 2019 at 2:20 AM Alexander Lakhin <exclusion@gmail.com> wrote:
Hello hackers,
Please also consider fixing the following inconsistencies found in new
v12 code:1. AT_AddOids - remove (orphaned after 578b2297)
2. BeingModified ->TM_BeingModified (for consistency)
/*
- * A tuple is locked if HTSU returns BeingModified.
+ * A tuple is locked if HTSU returns TM_BeingModified.
*/
if (htsu == TM_BeingModified)
I think the existing comment is quite clear. I mean we can change it
if we want, but I don't see the dire need to do it.
3. copy_relation_data -> remove (orphaned after d25f5191)
- * reason is the same as in tablecmds.c's copy_relation_data(): we're
- * writing data that's not in shared buffers, and so a CHECKPOINT
- * occurring during the rewriteheap operation won't have fsync'd data we
- * wrote before the checkpoint.
+ * reason is that we're writing data that's not in shared buffers, and
+ * so a CHECKPOINT occurring during the rewriteheap operation won't
+ * have fsync'd data we wrote before the checkpoint.
It seems to me that the same thing is moved to storage.c's
RelationCopyStorage() in the commit mentioned by you. So, isn't it
better to change the comment accordingly rather than entirely removing
the reference to a similar comment in another place?
4. endblock -> endblk (an internal inconsistency)
5. ExecContextForcesOids - not changed, but may be should be removed
(orphaned after 578b2297)
Yes, we should remove the use of ExecContextForcesOids. We are using
es_result_relation_info at other places as well, so I think we can
change the comment to indicate the same.
The separate patches for all the defects (except 5) are attached. In
case a single patch is preferable, I can produce it too.
It is okay, we can review the individual patches and then combine them
later. I couldn't get a chance to review all of them yet. Thanks
for working on this.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Amit Kapila <amit.kapila16@gmail.com> writes:
On Sun, May 26, 2019 at 2:20 AM Alexander Lakhin <exclusion@gmail.com> wrote:
5. ExecContextForcesOids - not changed, but may be should be removed
(orphaned after 578b2297)
Yes, we should remove the use of ExecContextForcesOids.
Unless grep is failing me, ExecContextForcesOids is in fact gone.
All that's left is one obsolete mention in a comment, which should
certainly be cleaned up.
However, the full context of the mention is
/*
* call ExecInitNode on each of the plans to be executed and save the
* results into the array "mt_plans". This is also a convenient place to
* verify that the proposed target relations are valid and open their
* indexes for insertion of new index entries. Note we *must* set
* estate->es_result_relation_info correctly while we initialize each
* sub-plan; ExecContextForcesOids depends on that!
*/
which makes one wonder if the code to twiddle
estate->es_result_relation_info during subplan init is dead code. If so
we probably ought to remove it, as it's surely confusing. If it's not
dead, then this comment ought to be updated to explain the surviving
reason(s), not simply deleted.
regards, tom lane
On Mon, May 27, 2019 at 3:59 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amit Kapila <amit.kapila16@gmail.com> writes:
On Sun, May 26, 2019 at 2:20 AM Alexander Lakhin <exclusion@gmail.com> wrote:
5. ExecContextForcesOids - not changed, but may be should be removed
(orphaned after 578b2297)Yes, we should remove the use of ExecContextForcesOids.
Unless grep is failing me, ExecContextForcesOids is in fact gone.
All that's left is one obsolete mention in a comment, which should
certainly be cleaned up.
That's right and I was talking about that usage. Initially, I thought
we need to change the comment, but on again looking at the code, I
think we can remove that comment and the related code, but I am not
completely sure. If we read the comment atop ExecContextForcesOids
[1]: /* .. * We assume that if we are generating tuples for INSERT or UPDATE, * estate->es_result_relation_info is already set up to describe the target * relation. Note that in an UPDATE that spans an inheritance tree, some of * the target relations may have OIDs and some not. We have to make the * decisions on a per-relation basis as we initialize each of the subplans of * the ModifyTable node, so ModifyTable has to set es_result_relation_info * while initializing each subplan. .. */
initialization of es_result_relation_info for each subplan is for its
usage in ExecContextForcesOids. I have run the regression tests with
the attached patch (which removes changing es_result_relation_info in
ExecInitModifyTable) and all the tests passed. Do you have any
thoughts on this matter?
[1]: /* .. * We assume that if we are generating tuples for INSERT or UPDATE, * estate->es_result_relation_info is already set up to describe the target * relation. Note that in an UPDATE that spans an inheritance tree, some of * the target relations may have OIDs and some not. We have to make the * decisions on a per-relation basis as we initialize each of the subplans of * the ModifyTable node, so ModifyTable has to set es_result_relation_info * while initializing each subplan. .. */
/*
..
* We assume that if we are generating tuples for INSERT or UPDATE,
* estate->es_result_relation_info is already set up to describe the target
* relation. Note that in an UPDATE that spans an inheritance tree, some of
* the target relations may have OIDs and some not. We have to make the
* decisions on a per-relation basis as we initialize each of the subplans of
* the ModifyTable node, so ModifyTable has to set es_result_relation_info
* while initializing each subplan.
..
*/
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachments:
remove_dead_code_ExecContextForcesOids_1.patchapplication/octet-stream; name=remove_dead_code_ExecContextForcesOids_1.patchDownload
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index a3c0e91..2af0af6 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -2271,7 +2271,6 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
ModifyTableState *mtstate;
CmdType operation = node->operation;
int nplans = list_length(node->plans);
- ResultRelInfo *saved_resultRelInfo;
ResultRelInfo *resultRelInfo;
Plan *subplan;
ListCell *l;
@@ -2314,12 +2313,8 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
* call ExecInitNode on each of the plans to be executed and save the
* results into the array "mt_plans". This is also a convenient place to
* verify that the proposed target relations are valid and open their
- * indexes for insertion of new index entries. Note we *must* set
- * estate->es_result_relation_info correctly while we initialize each
- * sub-plan; ExecContextForcesOids depends on that!
+ * indexes for insertion of new index entries.
*/
- saved_resultRelInfo = estate->es_result_relation_info;
-
resultRelInfo = mtstate->resultRelInfo;
i = 0;
foreach(l, node->plans)
@@ -2360,8 +2355,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
operation == CMD_UPDATE)
update_tuple_routing_needed = true;
- /* Now init the plan for this result rel */
- estate->es_result_relation_info = resultRelInfo;
+ /* Now init the plan */
mtstate->mt_plans[i] = ExecInitNode(subplan, estate, eflags);
mtstate->mt_scans[i] =
ExecInitExtraTupleSlot(mtstate->ps.state, ExecGetResultType(mtstate->mt_plans[i]),
@@ -2385,8 +2379,6 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
i++;
}
- estate->es_result_relation_info = saved_resultRelInfo;
-
/* Get the target relation */
rel = (getTargetResultRelInfo(mtstate))->ri_RelationDesc;
28.05.2019 2:05, Amit Kapila wrote:
On Mon, May 27, 2019 at 3:59 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amit Kapila <amit.kapila16@gmail.com> writes:
On Sun, May 26, 2019 at 2:20 AM Alexander Lakhin <exclusion@gmail.com> wrote:
5. ExecContextForcesOids - not changed, but may be should be removed
(orphaned after 578b2297)Yes, we should remove the use of ExecContextForcesOids.
Unless grep is failing me, ExecContextForcesOids is in fact gone.
All that's left is one obsolete mention in a comment, which should
certainly be cleaned up.That's right and I was talking about that usage. Initially, I thought
we need to change the comment, but on again looking at the code, I
think we can remove that comment and the related code, but I am not
completely sure. If we read the comment atop ExecContextForcesOids
[1] before it was removed, it seems to indicate that the
initialization of es_result_relation_info for each subplan is for its
usage in ExecContextForcesOids. I have run the regression tests with
the attached patch (which removes changing es_result_relation_info in
ExecInitModifyTable) and all the tests passed. Do you have any
thoughts on this matter?[1]
/*
..
* We assume that if we are generating tuples for INSERT or UPDATE,
* estate->es_result_relation_info is already set up to describe the target
* relation. Note that in an UPDATE that spans an inheritance tree, some of
* the target relations may have OIDs and some not. We have to make the
* decisions on a per-relation basis as we initialize each of the subplans of
* the ModifyTable node, so ModifyTable has to set es_result_relation_info
* while initializing each subplan.
..
*/
I got a coredump with `make installcheck-world` (on postgres_fdw test):
Core was generated by `postgres: law contrib_regression [local]
UPDATE '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ff1410ece98 in postgresBeginDirectModify
(node=0x560a563fab30, eflags=0) at postgres_fdw.c:2363
2363 rtindex =
estate->es_result_relation_info->ri_RangeTableIndex;
(gdb) bt
#0 0x00007ff1410ece98 in postgresBeginDirectModify
(node=0x560a563fab30, eflags=0) at postgres_fdw.c:2363
#1 0x0000560a55979e62 in ExecInitForeignScan
(node=node@entry=0x560a56254dc0, estate=estate@entry=0x560a563f9ae8,
eflags=eflags@entry=0) at nodeForeignscan.c:227
#2 0x0000560a5594e123 in ExecInitNode (node=node@entry=0x560a56254dc0,
estate=estate@entry=0x560a563f9ae8,
eflags=eflags@entry=0) at execProcnode.c:277
...
So It seems that this is not a dead code.
This comment initially appeared with c7a165ad in
nodeAppend.c:ExecInitAppend as following:
/*
* call ExecInitNode on each of the plans to be executed and
save the
* results into the array "initialized". Note we *must* set
* estate->es_result_relation_info correctly while we initialize
each
* sub-plan; ExecAssignResultTypeFromTL depends on that!
*/
for (i = appendstate->as_firstplan; i <=
appendstate->as_lastplan; i++)
{
appendstate->as_whichplan = i;
exec_append_initialize_next(node);
initNode = (Plan *) nth(i, appendplans);
initialized[i] = ExecInitNode(initNode, estate, (Plan *)
node);
}
/*
* initialize tuple type
*/
ExecAssignResultTypeFromTL((Plan *) node, &appendstate->cstate);
appendstate->cstate.cs_ProjInfo = NULL;
and in ExecAssignResultTypeFromTL we see:
* This is pretty grotty: we need to ensure that result tuples have
* space for an OID iff they are going to be stored into a relation
* that has OIDs. We assume that estate->es_result_relation_info
* is already set up to describe the target relation.
So the initial comment stated that before calling
ExecAssignResultTypeFromTL we need to have correct
es_result_relation_infos (but we don't set them in that code).
Later in commit a376a467 we have the ExecContextForcesOids call inside
ExecAssignResultTypeFromTL appeared:
void
ExecAssignResultTypeFromTL(PlanState *planstate)
{
bool hasoid;
TupleDesc tupDesc;
if (ExecContextForcesOids(planstate, &hasoid))
{
/* context forces OID choice; hasoid is now set correctly */
}
And the comment was changed to:
Note we *must* set
* estate->es_result_relation_info correctly while we initialize
each
* sub-plan; ExecContextForcesOids depends on that!
although the code still calls ExecAssignResultTypeFromTL:
for (i = appendstate->as_firstplan; i <=
appendstate->as_lastplan; i++)
{
appendstate->as_whichplan = i;
exec_append_initialize_next(appendstate);
initNode = (Plan *) nth(i, node->appendplans);
appendplanstates[i] = ExecInitNode(initNode, estate);
}
/*
* initialize tuple type
*/
ExecAssignResultTypeFromTL(&appendstate->ps);
Later, in 8a5849b7 the comment moves out of nodeAppend.c:ExecInitAppend
into nodeModifyTable.c: ExecInitModifyTable (where we see it now):
/*
* call ExecInitNode on each of the plans to be executed and
save the
* results into the array "mt_plans". Note we *must* set
* estate->es_result_relation_info correctly while we initialize
each
* sub-plan; ExecContextForcesOids depends on that!
*/
estate->es_result_relation_info = estate->es_result_relations;
i = 0;
foreach(l, node->plans)
{
subplan = (Plan *) lfirst(l);
mtstate->mt_plans[i] = ExecInitNode(subplan, estate,
eflags);
estate->es_result_relation_info++;
i++;
}
estate->es_result_relation_info = NULL;
This code actually sets es_result_relation_info, but
ExecAssignResultTypeFromTL not called there anymore. So it seems that
this comment at least diverged from the initial author's intent.
With this in mind, I am inclined to just remove it.
(On a side note, I agree with your remarks regarding 2 and 3; please
look at a better patch for 3 attached.)
Best regards,
Alexander
Attachments:
copy_relation_data.patchtext/x-patch; name=copy_relation_data.patchDownload
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index 131ec7b8d7..369694fa2e 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -350,7 +350,7 @@ end_heap_rewrite(RewriteState state)
*
* It's obvious that we must do this when not WAL-logging. It's less
* obvious that we have to do it even if we did WAL-log the pages. The
- * reason is the same as in tablecmds.c's copy_relation_data(): we're
+ * reason is the same as in storage.c's RelationCopyStorage(): we're
* writing data that's not in shared buffers, and so a CHECKPOINT
* occurring during the rewriteheap operation won't have fsync'd data we
* wrote before the checkpoint.
On 2019/05/28 14:00, Alexander Lakhin wrote:
28.05.2019 2:05, Amit Kapila wrote:
... If we read the comment atop ExecContextForcesOids
[1] before it was removed, it seems to indicate that the
initialization of es_result_relation_info for each subplan is for its
usage in ExecContextForcesOids. I have run the regression tests with
the attached patch (which removes changing es_result_relation_info in
ExecInitModifyTable) and all the tests passed. Do you have any
thoughts on this matter?I got a coredump with `make installcheck-world` (on postgres_fdw test):
Core was generated by `postgres: law contrib_regression [local]
UPDATE '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ff1410ece98 in postgresBeginDirectModify
(node=0x560a563fab30, eflags=0) at postgres_fdw.c:2363
2363 rtindex =
estate->es_result_relation_info->ri_RangeTableIndex;
(gdb) bt
#0 0x00007ff1410ece98 in postgresBeginDirectModify
(node=0x560a563fab30, eflags=0) at postgres_fdw.c:2363
#1 0x0000560a55979e62 in ExecInitForeignScan
(node=node@entry=0x560a56254dc0, estate=estate@entry=0x560a563f9ae8,
eflags=eflags@entry=0) at nodeForeignscan.c:227
#2 0x0000560a5594e123 in ExecInitNode (node=node@entry=0x560a56254dc0,
estate=estate@entry=0x560a563f9ae8,
eflags=eflags@entry=0) at execProcnode.c:277
...
So It seems that this is not a dead code.
... So it seems that
this comment at least diverged from the initial author's intent.
With this in mind, I am inclined to just remove it.
Seeing that the crash occurs due to postgres_fdw relying on
es_result_relation_info being set when initializing a "direct
modification" plan on foreign tables managed by it, we could change the
comment to say that instead. Note that allowing "direct modification" of
foreign tables is a core feature, so there's no postgres_fdw-specific
behavior here; there may be other FDWs that support "direct modification"
plans and so likewise rely on es_result_relation_info being set.
How about:
diff --git a/src/backend/executor/nodeModifyTable.c
b/src/backend/executor/nodeModifyTable.c
index a3c0e91543..95545c9472 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -2316,7 +2316,7 @@ ExecInitModifyTable(ModifyTable *node, EState
*estate, int eflags)
* verify that the proposed target relations are valid and open their
* indexes for insertion of new index entries. Note we *must* set
* estate->es_result_relation_info correctly while we initialize each
- * sub-plan; ExecContextForcesOids depends on that!
+ * sub-plan; FDWs may depend on that.
*/
saved_resultRelInfo = estate->es_result_relation_info;
Thanks,
Amit
On Tue, May 28, 2019 at 12:29 PM Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
On 2019/05/28 14:00, Alexander Lakhin wrote:
28.05.2019 2:05, Amit Kapila wrote:
... If we read the comment atop ExecContextForcesOids
[1] before it was removed, it seems to indicate that the
initialization of es_result_relation_info for each subplan is for its
usage in ExecContextForcesOids. I have run the regression tests with
the attached patch (which removes changing es_result_relation_info in
ExecInitModifyTable) and all the tests passed. Do you have any
thoughts on this matter?I got a coredump with `make installcheck-world` (on postgres_fdw test):
Core was generated by `postgres: law contrib_regression [local]
UPDATE '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007ff1410ece98 in postgresBeginDirectModify
(node=0x560a563fab30, eflags=0) at postgres_fdw.c:2363
2363 rtindex =
estate->es_result_relation_info->ri_RangeTableIndex;
(gdb) bt
#0 0x00007ff1410ece98 in postgresBeginDirectModify
(node=0x560a563fab30, eflags=0) at postgres_fdw.c:2363
#1 0x0000560a55979e62 in ExecInitForeignScan
(node=node@entry=0x560a56254dc0, estate=estate@entry=0x560a563f9ae8,
eflags=eflags@entry=0) at nodeForeignscan.c:227
#2 0x0000560a5594e123 in ExecInitNode (node=node@entry=0x560a56254dc0,
estate=estate@entry=0x560a563f9ae8,
eflags=eflags@entry=0) at execProcnode.c:277
...
So It seems that this is not a dead code.... So it seems that
this comment at least diverged from the initial author's intent.
With this in mind, I am inclined to just remove it.Seeing that the crash occurs due to postgres_fdw relying on
es_result_relation_info being set when initializing a "direct
modification" plan on foreign tables managed by it, we could change the
comment to say that instead. Note that allowing "direct modification" of
foreign tables is a core feature, so there's no postgres_fdw-specific
behavior here; there may be other FDWs that support "direct modification"
plans and so likewise rely on es_result_relation_info being set.
Can we ensure some way that only FDW's rely on it not any other part
of the code?
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
On 2019/05/28 20:26, Amit Kapila wrote:
On Tue, May 28, 2019 at 12:29 PM Amit Langote wrote:
Seeing that the crash occurs due to postgres_fdw relying on
es_result_relation_info being set when initializing a "direct
modification" plan on foreign tables managed by it, we could change the
comment to say that instead. Note that allowing "direct modification" of
foreign tables is a core feature, so there's no postgres_fdw-specific
behavior here; there may be other FDWs that support "direct modification"
plans and so likewise rely on es_result_relation_info being set.Can we ensure some way that only FDW's rely on it not any other part
of the code?
Hmm, I can't think of any way of doing than other than manual inspection.
We are sure that no piece of core code relies on it in the ExecInitNode()
code path. Apparently FDWs may, as we've found out here. Now that I've
looked around, maybe other loadable modules may too, by way of (only?)
Custom nodes. I don't see any other way to hook into ExecInitNode(), so
maybe that's it.
So, maybe reword a bit as:
diff --git a/src/backend/executor/nodeModifyTable.c
b/src/backend/executor/nodeModifyTable.c
index a3c0e91543..95545c9472 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -2316,7 +2316,7 @@ ExecInitModifyTable(ModifyTable *node, EState
*estate, int eflags)
* verify that the proposed target relations are valid and open their
* indexes for insertion of new index entries. Note we *must* set
* estate->es_result_relation_info correctly while we initialize each
- * sub-plan; ExecContextForcesOids depends on that!
+ * sub-plan; external modules such as FDWs may depend on that.
Thanks,
Amit
On Tue, May 28, 2019 at 10:30 AM Alexander Lakhin <exclusion@gmail.com> wrote:
28.05.2019 2:05, Amit Kapila wrote:
On Mon, May 27, 2019 at 3:59 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amit Kapila <amit.kapila16@gmail.com> writes:
On Sun, May 26, 2019 at 2:20 AM Alexander Lakhin <exclusion@gmail.com> wrote:
5. ExecContextForcesOids - not changed, but may be should be removed
(orphaned after 578b2297)Yes, we should remove the use of ExecContextForcesOids.
Unless grep is failing me, ExecContextForcesOids is in fact gone.
All that's left is one obsolete mention in a comment, which should
certainly be cleaned up.
..
*/
I got a coredump with `make installcheck-world` (on postgres_fdw test):
Thanks for noticing this. I have run the tests in parallel mode with
something like make -s check-world -j4 PROVE_FLAGS='-j4'. It didn't
stop at failure, so I missed to notice it. However, now looking
carefully (by redirecting the output to a log file), I could see this.
(On a side note, I agree with your remarks regarding 2 and 3; please
look at a better patch for 3 attached.)
The new patch looks good to me. However, instead of committing just
this one alone, I will review others as well and see which all can be
combined and pushed together.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
On Wed, May 29, 2019 at 6:12 AM Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
On 2019/05/28 20:26, Amit Kapila wrote:
On Tue, May 28, 2019 at 12:29 PM Amit Langote wrote:
Seeing that the crash occurs due to postgres_fdw relying on
es_result_relation_info being set when initializing a "direct
modification" plan on foreign tables managed by it, we could change the
comment to say that instead. Note that allowing "direct modification" of
foreign tables is a core feature, so there's no postgres_fdw-specific
behavior here; there may be other FDWs that support "direct modification"
plans and so likewise rely on es_result_relation_info being set.Can we ensure some way that only FDW's rely on it not any other part
of the code?Hmm, I can't think of any way of doing than other than manual inspection.
We are sure that no piece of core code relies on it in the ExecInitNode()
code path. Apparently FDWs may, as we've found out here. Now that I've
looked around, maybe other loadable modules may too, by way of (only?)
Custom nodes. I don't see any other way to hook into ExecInitNode(), so
maybe that's it.So, maybe reword a bit as:
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index a3c0e91543..95545c9472 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -2316,7 +2316,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) * verify that the proposed target relations are valid and open their * indexes for insertion of new index entries. Note we *must* set * estate->es_result_relation_info correctly while we initialize each - * sub-plan; ExecContextForcesOids depends on that! + * sub-plan; external modules such as FDWs may depend on that.
I think it will be better to include postgres_fdw in the comment in
some way so that if someone wants a concrete example, there is
something to refer to.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
On 2019/05/30 18:51, Amit Kapila wrote:
On Wed, May 29, 2019 at 6:12 AM Amit Langote wrote:
On 2019/05/28 20:26, Amit Kapila wrote:
Can we ensure some way that only FDW's rely on it not any other part
of the code?Hmm, I can't think of any way of doing than other than manual inspection.
We are sure that no piece of core code relies on it in the ExecInitNode()
code path. Apparently FDWs may, as we've found out here. Now that I've
looked around, maybe other loadable modules may too, by way of (only?)
Custom nodes. I don't see any other way to hook into ExecInitNode(), so
maybe that's it.So, maybe reword a bit as:
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index a3c0e91543..95545c9472 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -2316,7 +2316,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) * verify that the proposed target relations are valid and open their * indexes for insertion of new index entries. Note we *must* set * estate->es_result_relation_info correctly while we initialize each - * sub-plan; ExecContextForcesOids depends on that! + * sub-plan; external modules such as FDWs may depend on that.I think it will be better to include postgres_fdw in the comment in
some way so that if someone wants a concrete example, there is
something to refer to.
Maybe a good idea, but this will be the first time to mention postgres_fdw
in the core source code. If you think that's OK, how about the attached?
Thanks,
Amit
Attachments:
remove-ExecContextForcesOids-reference.patchtext/plain; charset=UTF-8; name=remove-ExecContextForcesOids-reference.patchDownload
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index a3c0e91543..da6da06115 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -2316,7 +2316,9 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
* verify that the proposed target relations are valid and open their
* indexes for insertion of new index entries. Note we *must* set
* estate->es_result_relation_info correctly while we initialize each
- * sub-plan; ExecContextForcesOids depends on that!
+ * sub-plan; external modules such as FDWs may depend on that (see
+ * contrib/postgres_fdw/postgres_fdw.c: postgresBeginDirectModify()
+ * as one example.)
*/
saved_resultRelInfo = estate->es_result_relation_info;
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
On 2019/05/30 18:51, Amit Kapila wrote:
I think it will be better to include postgres_fdw in the comment in
some way so that if someone wants a concrete example, there is
something to refer to.
Maybe a good idea, but this will be the first time to mention postgres_fdw
in the core source code. If you think that's OK, how about the attached?
This wording seems fine to me.
Now that we've beat that item into the ground ... there were a bunch of
other tweaks suggested in Alexander's initial email. Amit (K), were you
going to review/commit those?
regards, tom lane
On Mon, Jun 3, 2019 at 10:56 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
On 2019/05/30 18:51, Amit Kapila wrote:
I think it will be better to include postgres_fdw in the comment in
some way so that if someone wants a concrete example, there is
something to refer to.Maybe a good idea, but this will be the first time to mention postgres_fdw
in the core source code. If you think that's OK, how about the attached?This wording seems fine to me.
Now that we've beat that item into the ground ... there were a bunch of
other tweaks suggested in Alexander's initial email. Amit (K), were you
going to review/commit those?
Yes, I am already reviewing those. I will post my comments today.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Hi Andres,
I have added you here as some of these are related to commits done by
you. So need your opinion on the same. I have mentioned where your
feedback will be helpful.
On Sun, May 26, 2019 at 2:20 AM Alexander Lakhin <exclusion@gmail.com> wrote:
6. ExecGetResultSlot - remove (not used since introduction in 1a0586de)
Yeah, I also think this is not required. Andres, this API is not
defined. Is it intended for some purpose?
8. heap_parallelscan_initialize -> remove the sentence (changed in c2fe139c)
The same check has been moved to table_block_parallelscan_initialize.
So, I think instead of removing the sentence you need to change the
function name in the comment.
10. HeapTupleSatisfiesSnapshot -> HeapTupleSatisfiesVisibility (an
internal inconsistency)
* This is an interface to HeapTupleSatisfiesVacuum that's callable via
- * HeapTupleSatisfiesSnapshot, so it can be used through a Snapshot.
+ * HeapTupleSatisfiesVisibility, so it can be used through a Snapshot.
I think now we don't need to write the second half of the comment ("so
it can be used through a Snapshot"). It makes more sense with
previous style API.
Another related point:
* HeapTupleSatisfiesNonVacuumable
*
* True if tuple might be visible to some
transaction; false if it's
* surely dead to everyone, ie, vacuumable.
*
* See SNAPSHOT_TOAST's definition for the intended behaviour.
Here, I think instead of SNAPSHOT_TOAST, we should mention
SNAPSHOT_NON_VACUUMABLE.
Andres, do you have any comments on the proposed changes?
14. latestRemovedxids -> latestRemovedXids (an inconsistent case)
* Conjecture: if hitemid is dead then it had xids before the xids
* marked on LP_NORMAL items. So we just ignore this item and move
* onto the next, for the purposes of calculating
- * latestRemovedxids.
+ * latestRemovedXids.
I think it should be latestRemovedXid.
16. NextSampletuple -> NextSampleTuple (an inconsistent case)
I think this doesn't make much difference, but we can fix it so that
NextSampleTuple's occurrence can be found during grep.
20. RelationGetOidIndex ? just to remove the paragraph (orphaned after
578b2297)
- * This is exported separately because there are cases where we want to use
- * an index that will not be recognized by RelationGetOidIndex: TOAST tables
- * have indexes that are usable, but have multiple columns and are on
- * ordinary columns rather than a true OID column. This code will work
- * anyway, so long as the OID is the index's first column. The caller must
- * pass in the actual heap attnum of the OID column, however.
- *
Instead of removing the entire paragraph, how about changing it like
"This also handles the special cases where TOAST tables have indexes
that are usable, but have multiple columns and are on ordinary columns
rather than a true OID column. This code will work anyway, so long as
the OID is the index's first column. The caller must
pass in the actual heap attnum of the OID column, however."
Andres, any suggestions?
27. XactTopTransactionId -> XactTopFullTransactionId (an internal
inconsistency)
- * XactTopTransactionId stores the XID of our toplevel transaction, which
+ * XactTopFullTransactionId stores the XID of our toplevel transaction, which
* will be the same as TopTransactionState.transactionId in an ordinary
I think in the above sentence, now we need to use
TopTransactionState.fullTransactionId.
Note that I agree with your changes for the points where I have not
responded anything.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
On Tue, Jun 4, 2019 at 7:36 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
Hi Andres,
I have added you here as some of these are related to commits done by
you. So need your opinion on the same. I have mentioned where your
feedback will be helpful.10. HeapTupleSatisfiesSnapshot -> HeapTupleSatisfiesVisibility (an
internal inconsistency)* This is an interface to HeapTupleSatisfiesVacuum that's callable via - * HeapTupleSatisfiesSnapshot, so it can be used through a Snapshot. + * HeapTupleSatisfiesVisibility, so it can be used through a Snapshot.I think now we don't need to write the second half of the comment ("so
it can be used through a Snapshot"). It makes more sense with
previous style API.Another related point:
* HeapTupleSatisfiesNonVacuumable
*
* True if tuple might be visible to some
transaction; false if it's
* surely dead to everyone, ie, vacuumable.
*
* See SNAPSHOT_TOAST's definition for the intended behaviour.Here, I think instead of SNAPSHOT_TOAST, we should mention
SNAPSHOT_NON_VACUUMABLE.Andres, do you have any comments on the proposed changes?
20. RelationGetOidIndex ? just to remove the paragraph (orphaned after
578b2297)- * This is exported separately because there are cases where we want to use
- * an index that will not be recognized by RelationGetOidIndex: TOAST tables
- * have indexes that are usable, but have multiple columns and are on
- * ordinary columns rather than a true OID column. This code will work
- * anyway, so long as the OID is the index's first column. The caller must
- * pass in the actual heap attnum of the OID column, however.
- *Instead of removing the entire paragraph, how about changing it like
"This also handles the special cases where TOAST tables have indexes
that are usable, but have multiple columns and are on ordinary columns
rather than a true OID column. This code will work anyway, so long as
the OID is the index's first column. The caller must
pass in the actual heap attnum of the OID column, however."Andres, any suggestions?
Leaving the changes related to the above two points, I have combined
all the changes and fixed the things as per my review in the attached
patch. Alexander, see if you can verify once the combined patch. I
am planning to commit the attached by tomorrow and then we can deal
with the remaining two. However, in the meantime, if Andres shared
his views on the above two points, then we can include the changes
corresponding to them as well.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachments:
0001-Fix-assorted-inconsistencies.patchapplication/octet-stream; name=0001-Fix-assorted-inconsistencies.patchDownload
From f65d396470c2b035cbe8aac3536496e9a02b5966 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Fri, 7 Jun 2019 09:53:11 +0530
Subject: [PATCH] Fix assorted inconsistencies.
There were a number of issues in the recent commits which include typos,
code and comments mismatch, leftover function declarations. Fix them.
Reported-by: Alexander Lakhin
Author: Alexander Lakhin, Amit Kapila and Amit Langote
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/ef0c0232-0c1d-3a35-63d4-0ebd06e31387@gmail.com
---
src/backend/access/common/reloptions.c | 3 ---
src/backend/access/heap/heapam.c | 15 +++------------
src/backend/access/heap/heapam_handler.c | 2 +-
src/backend/access/heap/rewriteheap.c | 2 +-
src/backend/access/transam/xact.c | 4 ++--
src/backend/access/transam/xlog.c | 2 --
src/backend/access/transam/xloginsert.c | 2 +-
src/backend/commands/copy.c | 1 -
src/backend/commands/tablecmds.c | 6 +++---
src/backend/executor/execTuples.c | 2 +-
src/backend/executor/nodeModifyTable.c | 4 +++-
src/backend/lib/integerset.c | 2 +-
src/backend/postmaster/postmaster.c | 2 +-
src/backend/storage/smgr/md.c | 2 +-
src/include/access/heapam.h | 2 --
src/include/access/tableam.h | 4 ++--
src/include/executor/executor.h | 1 -
src/include/storage/sync.h | 2 +-
src/test/modules/test_integerset/test_integerset.c | 2 +-
19 files changed, 22 insertions(+), 38 deletions(-)
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 4d0d24b..de06c92 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -52,9 +52,6 @@
* (v) make sure the lock level is set correctly for that operation
* (vi) don't forget to document the option
*
- * Note that we don't handle "oids" in relOpts because it is handled by
- * interpretOidsOption().
- *
* The default choice for any new option should be AccessExclusiveLock.
* In some cases the lock level can be reduced from there, but the lock
* level chosen should always conflict with itself to ensure that multiple
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index bf82304..8ac0f8a 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -239,8 +239,8 @@ initscan(HeapScanDesc scan, ScanKey key, bool keep_startblock)
* behaviors, independently of the size of the table; also there is a GUC
* variable that can disable synchronized scanning.)
*
- * Note that heap_parallelscan_initialize has a very similar test; if you
- * change this, consider changing that one, too.
+ * Note that table_block_parallelscan_initialize has a very similar test;
+ * if you change this, consider changing that one, too.
*/
if (!RelationUsesLocalBuffers(scan->rs_base.rs_rd) &&
scan->rs_nblocks > NBuffers / 4)
@@ -1396,15 +1396,6 @@ heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *s
* If the tuple is found but fails the time qual check, then false is returned
* but tuple->t_data is left pointing to the tuple.
*
- * keep_buf determines what is done with the buffer in the false-result cases.
- * When the caller specifies keep_buf = true, we retain the pin on the buffer
- * and return it in *userbuf (so the caller must eventually unpin it); when
- * keep_buf = false, the pin is released and *userbuf is set to InvalidBuffer.
- *
- * stats_relation is the relation to charge the heap_fetch operation against
- * for statistical purposes. (This could be the heap rel itself, an
- * associated index, or NULL to not count the fetch at all.)
- *
* heap_fetch does not follow HOT chains: only the exact TID requested will
* be fetched.
*
@@ -7085,7 +7076,7 @@ heap_compute_xid_horizon_for_tuples(Relation rel,
* Conjecture: if hitemid is dead then it had xids before the xids
* marked on LP_NORMAL items. So we just ignore this item and move
* onto the next, for the purposes of calculating
- * latestRemovedxids.
+ * latestRemovedXid.
*/
}
else
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 92ea1d1..b7d2ddb 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -286,7 +286,7 @@ heapam_tuple_insert_speculative(Relation relation, TupleTableSlot *slot,
static void
heapam_tuple_complete_speculative(Relation relation, TupleTableSlot *slot,
- uint32 spekToken, bool succeeded)
+ uint32 specToken, bool succeeded)
{
bool shouldFree = true;
HeapTuple tuple = ExecFetchSlotHeapTuple(slot, true, &shouldFree);
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index 131ec7b..369694f 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -350,7 +350,7 @@ end_heap_rewrite(RewriteState state)
*
* It's obvious that we must do this when not WAL-logging. It's less
* obvious that we have to do it even if we did WAL-log the pages. The
- * reason is the same as in tablecmds.c's copy_relation_data(): we're
+ * reason is the same as in storage.c's RelationCopyStorage(): we're
* writing data that's not in shared buffers, and so a CHECKPOINT
* occurring during the rewriteheap operation won't have fsync'd data we
* wrote before the checkpoint.
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index f1108cc..821652b 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -91,8 +91,8 @@ int synchronous_commit = SYNCHRONOUS_COMMIT_ON;
* need to return the same answers in the parallel worker as they would have
* in the user backend, so we need some additional bookkeeping.
*
- * XactTopTransactionId stores the XID of our toplevel transaction, which
- * will be the same as TopTransactionState.transactionId in an ordinary
+ * XactTopFullTransactionId stores the XID of our toplevel transaction, which
+ * will be the same as TopTransactionState.fullTransactionId in an ordinary
* backend; but in a parallel backend, which does not have the entire
* transaction state, it will instead be copied from the backend that started
* the parallel operation.
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 1c7dd51..e08320e 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -314,8 +314,6 @@ static bool recoveryStopAfter;
*
* recoveryTargetTLI: the currently understood target timeline; changes
*
- * recoveryTargetIsLatest: was the requested target timeline 'latest'?
- *
* expectedTLEs: a list of TimeLineHistoryEntries for recoveryTargetTLI and the timelines of
* its known parents, newest first (so recoveryTargetTLI is always the
* first list member). Only these TLIs are expected to be seen in the WAL
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index d3c0a93..3ec67d4 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -1024,7 +1024,7 @@ log_newpage_buffer(Buffer buffer, bool page_std)
/*
* WAL-log a range of blocks in a relation.
*
- * An image of all pages with block numbers 'startblk' <= X < 'endblock' is
+ * An image of all pages with block numbers 'startblk' <= X < 'endblk' is
* written to the WAL. If the range is large, this is done in multiple WAL
* records.
*
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 2593732..84c54fb 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -177,7 +177,6 @@ typedef struct CopyStateData
*/
AttrNumber num_defaults;
FmgrInfo oid_in_function;
- Oid oid_typioparam;
FmgrInfo *in_functions; /* array of input functions for each attrs */
Oid *typioparams; /* array of element types for in_functions */
int *defmap; /* array of default att numbers */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index e13b96d..27b4cb2 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -379,7 +379,7 @@ static void ATExecCheckNotNull(AlteredTableInfo *tab, Relation rel,
const char *colName, LOCKMODE lockmode);
static bool NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr);
static bool ConstraintImpliedByRelConstraint(Relation scanrel,
- List *partConstraint, List *existedConstraints);
+ List *testConstraint, List *provenConstraint);
static ObjectAddress ATExecColumnDefault(Relation rel, const char *colName,
Node *newDefault, LOCKMODE lockmode);
static ObjectAddress ATExecAddIdentity(Relation rel, const char *colName,
@@ -5518,8 +5518,8 @@ ATPrepAddColumn(List **wqueue, Relation rel, bool recurse, bool recursing,
}
/*
- * Add a column to a table; this handles the AT_AddOids cases as well. The
- * return value is the address of the new column in the parent relation.
+ * Add a column to a table. The return value is the address of the
+ * new column in the parent relation.
*/
static ObjectAddress
ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel,
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c
index f785efa..a5cb7bb 100644
--- a/src/backend/executor/execTuples.c
+++ b/src/backend/executor/execTuples.c
@@ -1867,7 +1867,7 @@ void
slot_getsomeattrs_int(TupleTableSlot *slot, int attnum)
{
/* Check for caller errors */
- Assert(slot->tts_nvalid < attnum); /* slot_getsomeattr checked */
+ Assert(slot->tts_nvalid < attnum); /* checked in slot_getsomeattrs */
Assert(attnum > 0);
if (unlikely(attnum > slot->tts_tupleDescriptor->natts))
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index a3c0e91..da6da06 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -2316,7 +2316,9 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
* verify that the proposed target relations are valid and open their
* indexes for insertion of new index entries. Note we *must* set
* estate->es_result_relation_info correctly while we initialize each
- * sub-plan; ExecContextForcesOids depends on that!
+ * sub-plan; external modules such as FDWs may depend on that (see
+ * contrib/postgres_fdw/postgres_fdw.c: postgresBeginDirectModify()
+ * as one example.)
*/
saved_resultRelInfo = estate->es_result_relation_info;
diff --git a/src/backend/lib/integerset.c b/src/backend/lib/integerset.c
index 6921955..6d51c79 100644
--- a/src/backend/lib/integerset.c
+++ b/src/backend/lib/integerset.c
@@ -236,7 +236,7 @@ struct IntegerSet
*
* 'iter_values' is an array of integers ready to be returned to the
* caller; 'iter_num_values' is the length of that array, and
- * 'iter_valueno' is the next index. 'iter_node' and 'item_itemno' point
+ * 'iter_valueno' is the next index. 'iter_node' and 'iter_itemno' point
* to the leaf node, and item within the leaf node, to get the next batch
* of values from.
*
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 8e098e4..dd16938 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -404,7 +404,7 @@ static void BackendRun(Port *port) pg_attribute_noreturn();
static void ExitPostmaster(int status) pg_attribute_noreturn();
static int ServerLoop(void);
static int BackendStartup(Port *port);
-static int ProcessStartupPacket(Port *port, bool SSLdone);
+static int ProcessStartupPacket(Port *port, bool secure_done);
static void SendNegotiateProtocolVersion(List *unrecognized_protocol_options);
static void processCancelRequest(Port *port, void *pkt);
static int initMasks(fd_set *rmask);
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index bbcd18d..64acc3f 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -921,7 +921,7 @@ register_dirty_segment(SMgrRelation reln, ForkNumber forknum, MdfdVec *seg)
}
/*
- * register_unlink() -- Schedule a file to be deleted after next checkpoint
+ * register_unlink_segment() -- Schedule a file to be deleted after next checkpoint
*/
static void
register_unlink_segment(RelFileNodeBackend rnode, ForkNumber forknum,
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index b88bd8a..dffb57b 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -116,8 +116,6 @@ extern void heap_setscanlimits(TableScanDesc scan, BlockNumber startBlk,
extern void heapgetpage(TableScanDesc scan, BlockNumber page);
extern void heap_rescan(TableScanDesc scan, ScanKey key, bool set_params,
bool allow_strat, bool allow_sync, bool allow_pagemode);
-extern void heap_rescan_set_params(TableScanDesc scan, ScanKey key,
- bool allow_strat, bool allow_sync, bool allow_pagemode);
extern void heap_endscan(TableScanDesc scan);
extern HeapTuple heap_getnext(TableScanDesc scan, ScanDirection direction);
extern bool heap_getnextslot(TableScanDesc sscan,
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index c4e43b0..585c120 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -690,7 +690,7 @@ typedef struct TableAmRoutine
* block using the TsmRoutine's NextSampleTuple() callback.
*
* The callback needs to perform visibility checks, and only return
- * visible tuples. That obviously can mean calling NextSampletuple()
+ * visible tuples. That obviously can mean calling NextSampleTuple()
* multiple times.
*
* The TsmRoutine interface assumes that there's a maximum offset on a
@@ -1596,7 +1596,7 @@ table_relation_size(Relation rel, ForkNumber forkNumber)
}
/*
- * table_needs_toast_table - does this relation need a toast table?
+ * table_relation_needs_toast_table - does this relation need a toast table?
*/
static inline bool
table_relation_needs_toast_table(Relation rel)
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index 88134bc..d056fd6 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -514,7 +514,6 @@ extern ExprContext *MakePerTupleExprContext(EState *estate);
extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
extern TupleDesc ExecGetResultType(PlanState *planstate);
-extern TupleTableSlot ExecGetResultSlot(PlanState *planstate);
extern const TupleTableSlotOps *ExecGetResultSlotOps(PlanState *planstate,
bool *isfixed);
extern void ExecAssignProjectionInfo(PlanState *planstate,
diff --git a/src/include/storage/sync.h b/src/include/storage/sync.h
index 1e453a5..16428c5 100644
--- a/src/include/storage/sync.h
+++ b/src/include/storage/sync.h
@@ -44,7 +44,7 @@ typedef enum SyncRequestHandler
*/
typedef struct FileTag
{
- int16 handler; /* SyncRequstHandler value, saving space */
+ int16 handler; /* SyncRequestHandler value, saving space */
int16 forknum; /* ForkNumber, saving space */
RelFileNode rnode;
uint32 segno;
diff --git a/src/test/modules/test_integerset/test_integerset.c b/src/test/modules/test_integerset/test_integerset.c
index 346bb77..15b9ce1 100644
--- a/src/test/modules/test_integerset/test_integerset.c
+++ b/src/test/modules/test_integerset/test_integerset.c
@@ -581,7 +581,7 @@ test_huge_distances(void)
intset_add_member(intset, values[i]);
/*
- * Test iterset_is_member() around each of these values
+ * Test intset_is_member() around each of these values
*/
for (int i = 0; i < num_values; i++)
{
--
1.8.3.1
Hello Amit,
07.06.2019 7:30, Amit Kapila wrote:
Leaving the changes related to the above two points, I have combined
all the changes and fixed the things as per my review in the attached
patch. Alexander, see if you can verify once the combined patch. I
am planning to commit the attached by tomorrow and then we can deal
with the remaining two. However, in the meantime, if Andres shared
his views on the above two points, then we can include the changes
corresponding to them as well.
Amit, I agree with all of your changes. All I could is to move a dot:
.. (see contrib/postgres_fdw/postgres_fdw.c: postgresBeginDirectModify()
as one example).
Best regards,
Alexander
On Mon, Jun 3, 2019 at 10:56 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
On 2019/05/30 18:51, Amit Kapila wrote:
I think it will be better to include postgres_fdw in the comment in
some way so that if someone wants a concrete example, there is
something to refer to.Maybe a good idea, but this will be the first time to mention postgres_fdw
in the core source code. If you think that's OK, how about the attached?This wording seems fine to me.
Now that we've beat that item into the ground ... there were a bunch of
other tweaks suggested in Alexander's initial email. Amit (K), were you
going to review/commit those?
Pushed most of the changes except for two (point no. 10 and point no.
20) about which it is better if someone else can also comment. I have
provided suggestions about those in my review email [1]/messages/by-id/CAA4eK1J9_gdV22dRg-KaH_tnA1bXOUgLWCoJQikmPVyRbMHboA@mail.gmail.com. See, if you
have any comments on those.
[1]: /messages/by-id/CAA4eK1J9_gdV22dRg-KaH_tnA1bXOUgLWCoJQikmPVyRbMHboA@mail.gmail.com
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com