Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92c4abc

Browse files
author
Amit Kapila
committed
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 LakhinAuthor: Alexander Lakhin, Amit Kapila and Amit LangoteReviewed-by: Amit KapilaDiscussion:https://postgr.es/m/ef0c0232-0c1d-3a35-63d4-0ebd06e31387@gmail.com
1 parent35b2d4b commit92c4abc

File tree

19 files changed

+22
-38
lines changed

19 files changed

+22
-38
lines changed

‎src/backend/access/common/reloptions.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@
5252
* (v) make sure the lock level is set correctly for that operation
5353
* (vi) don't forget to document the option
5454
*
55-
* Note that we don't handle "oids" in relOpts because it is handled by
56-
* interpretOidsOption().
57-
*
5855
* The default choice for any new option should be AccessExclusiveLock.
5956
* In some cases the lock level can be reduced from there, but the lock
6057
* level chosen should always conflict with itself to ensure that multiple

‎src/backend/access/heap/heapam.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ initscan(HeapScanDesc scan, ScanKey key, bool keep_startblock)
239239
* behaviors, independently of the size of the table; also there is a GUC
240240
* variable that can disable synchronized scanning.)
241241
*
242-
* Note thatheap_parallelscan_initialize has a very similar test; if you
243-
* change this, consider changing that one, too.
242+
* Note thattable_block_parallelscan_initialize has a very similar test;
243+
*if youchange this, consider changing that one, too.
244244
*/
245245
if (!RelationUsesLocalBuffers(scan->rs_base.rs_rd)&&
246246
scan->rs_nblocks>NBuffers /4)
@@ -1396,15 +1396,6 @@ heap_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *s
13961396
* If the tuple is found but fails the time qual check, then false is returned
13971397
* but tuple->t_data is left pointing to the tuple.
13981398
*
1399-
* keep_buf determines what is done with the buffer in the false-result cases.
1400-
* When the caller specifies keep_buf = true, we retain the pin on the buffer
1401-
* and return it in *userbuf (so the caller must eventually unpin it); when
1402-
* keep_buf = false, the pin is released and *userbuf is set to InvalidBuffer.
1403-
*
1404-
* stats_relation is the relation to charge the heap_fetch operation against
1405-
* for statistical purposes. (This could be the heap rel itself, an
1406-
* associated index, or NULL to not count the fetch at all.)
1407-
*
14081399
* heap_fetch does not follow HOT chains: only the exact TID requested will
14091400
* be fetched.
14101401
*
@@ -7085,7 +7076,7 @@ heap_compute_xid_horizon_for_tuples(Relation rel,
70857076
* Conjecture: if hitemid is dead then it had xids before the xids
70867077
* marked on LP_NORMAL items. So we just ignore this item and move
70877078
* onto the next, for the purposes of calculating
7088-
*latestRemovedxids.
7079+
*latestRemovedXid.
70897080
*/
70907081
}
70917082
else

‎src/backend/access/heap/heapam_handler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ heapam_tuple_insert_speculative(Relation relation, TupleTableSlot *slot,
286286

287287
staticvoid
288288
heapam_tuple_complete_speculative(Relationrelation,TupleTableSlot*slot,
289-
uint32spekToken,boolsucceeded)
289+
uint32specToken,boolsucceeded)
290290
{
291291
boolshouldFree= true;
292292
HeapTupletuple=ExecFetchSlotHeapTuple(slot, true,&shouldFree);

‎src/backend/access/heap/rewriteheap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ end_heap_rewrite(RewriteState state)
350350
*
351351
* It's obvious that we must do this when not WAL-logging. It's less
352352
* obvious that we have to do it even if we did WAL-log the pages. The
353-
* reason is the same as intablecmds.c'scopy_relation_data(): we're
353+
* reason is the same as instorage.c'sRelationCopyStorage(): we're
354354
* writing data that's not in shared buffers, and so a CHECKPOINT
355355
* occurring during the rewriteheap operation won't have fsync'd data we
356356
* wrote before the checkpoint.

‎src/backend/access/transam/xact.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ intsynchronous_commit = SYNCHRONOUS_COMMIT_ON;
9191
* need to return the same answers in the parallel worker as they would have
9292
* in the user backend, so we need some additional bookkeeping.
9393
*
94-
*XactTopTransactionId stores the XID of our toplevel transaction, which
95-
* will be the same as TopTransactionState.transactionId in an ordinary
94+
*XactTopFullTransactionId stores the XID of our toplevel transaction, which
95+
* will be the same as TopTransactionState.fullTransactionId in an ordinary
9696
* backend; but in a parallel backend, which does not have the entire
9797
* transaction state, it will instead be copied from the backend that started
9898
* the parallel operation.

‎src/backend/access/transam/xlog.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,6 @@ static bool recoveryStopAfter;
314314
*
315315
* recoveryTargetTLI: the currently understood target timeline; changes
316316
*
317-
* recoveryTargetIsLatest: was the requested target timeline 'latest'?
318-
*
319317
* expectedTLEs: a list of TimeLineHistoryEntries for recoveryTargetTLI and the timelines of
320318
* its known parents, newest first (so recoveryTargetTLI is always the
321319
* first list member). Only these TLIs are expected to be seen in the WAL

‎src/backend/access/transam/xloginsert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ log_newpage_buffer(Buffer buffer, bool page_std)
10241024
/*
10251025
* WAL-log a range of blocks in a relation.
10261026
*
1027-
* An image of all pages with block numbers 'startblk' <= X < 'endblock' is
1027+
* An image of all pages with block numbers 'startblk' <= X < 'endblk' is
10281028
* written to the WAL. If the range is large, this is done in multiple WAL
10291029
* records.
10301030
*

‎src/backend/commands/copy.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ typedef struct CopyStateData
177177
*/
178178
AttrNumbernum_defaults;
179179
FmgrInfooid_in_function;
180-
Oidoid_typioparam;
181180
FmgrInfo*in_functions;/* array of input functions for each attrs */
182181
Oid*typioparams;/* array of element types for in_functions */
183182
int*defmap;/* array of default att numbers */

‎src/backend/commands/tablecmds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static void ATExecCheckNotNull(AlteredTableInfo *tab, Relation rel,
379379
const char *colName, LOCKMODE lockmode);
380380
static bool NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr);
381381
static bool ConstraintImpliedByRelConstraint(Relation scanrel,
382-
List *partConstraint, List *existedConstraints);
382+
List *testConstraint, List *provenConstraint);
383383
static ObjectAddress ATExecColumnDefault(Relation rel, const char *colName,
384384
Node *newDefault, LOCKMODE lockmode);
385385
static ObjectAddress ATExecAddIdentity(Relation rel, const char *colName,
@@ -5522,8 +5522,8 @@ ATPrepAddColumn(List **wqueue, Relation rel, bool recurse, bool recursing,
55225522
}
55235523

55245524
/*
5525-
* Add a column to a table; this handles the AT_AddOids cases as well. The
5526-
*return value is the address of thenew column in the parent relation.
5525+
* Add a column to a table. The return value is the address of the
5526+
* new column in the parent relation.
55275527
*/
55285528
static ObjectAddress
55295529
ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel,

‎src/backend/executor/execTuples.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,7 @@ void
18671867
slot_getsomeattrs_int(TupleTableSlot*slot,intattnum)
18681868
{
18691869
/* Check for caller errors */
1870-
Assert(slot->tts_nvalid<attnum);/*slot_getsomeattrchecked */
1870+
Assert(slot->tts_nvalid<attnum);/* checked in slot_getsomeattrs */
18711871
Assert(attnum>0);
18721872

18731873
if (unlikely(attnum>slot->tts_tupleDescriptor->natts))

‎src/backend/executor/nodeModifyTable.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2316,7 +2316,9 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
23162316
* verify that the proposed target relations are valid and open their
23172317
* indexes for insertion of new index entries. Note we *must* set
23182318
* estate->es_result_relation_info correctly while we initialize each
2319-
* sub-plan; ExecContextForcesOids depends on that!
2319+
* sub-plan; external modules such as FDWs may depend on that (see
2320+
* contrib/postgres_fdw/postgres_fdw.c: postgresBeginDirectModify()
2321+
* as one example).
23202322
*/
23212323
saved_resultRelInfo=estate->es_result_relation_info;
23222324

‎src/backend/lib/integerset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ struct IntegerSet
236236
*
237237
* 'iter_values' is an array of integers ready to be returned to the
238238
* caller; 'iter_num_values' is the length of that array, and
239-
* 'iter_valueno' is the next index. 'iter_node' and 'item_itemno' point
239+
* 'iter_valueno' is the next index. 'iter_node' and 'iter_itemno' point
240240
* to the leaf node, and item within the leaf node, to get the next batch
241241
* of values from.
242242
*

‎src/backend/postmaster/postmaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ static void BackendRun(Port *port) pg_attribute_noreturn();
404404
staticvoidExitPostmaster(intstatus)pg_attribute_noreturn();
405405
staticintServerLoop(void);
406406
staticintBackendStartup(Port*port);
407-
staticintProcessStartupPacket(Port*port,boolSSLdone);
407+
staticintProcessStartupPacket(Port*port,boolsecure_done);
408408
staticvoidSendNegotiateProtocolVersion(List*unrecognized_protocol_options);
409409
staticvoidprocessCancelRequest(Port*port,void*pkt);
410410
staticintinitMasks(fd_set*rmask);

‎src/backend/storage/smgr/md.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ register_dirty_segment(SMgrRelation reln, ForkNumber forknum, MdfdVec *seg)
921921
}
922922

923923
/*
924-
*register_unlink() -- Schedule a file to be deleted after next checkpoint
924+
*register_unlink_segment() -- Schedule a file to be deleted after next checkpoint
925925
*/
926926
staticvoid
927927
register_unlink_segment(RelFileNodeBackendrnode,ForkNumberforknum,

‎src/include/access/heapam.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ extern void heap_setscanlimits(TableScanDesc scan, BlockNumber startBlk,
116116
externvoidheapgetpage(TableScanDescscan,BlockNumberpage);
117117
externvoidheap_rescan(TableScanDescscan,ScanKeykey,boolset_params,
118118
boolallow_strat,boolallow_sync,boolallow_pagemode);
119-
externvoidheap_rescan_set_params(TableScanDescscan,ScanKeykey,
120-
boolallow_strat,boolallow_sync,boolallow_pagemode);
121119
externvoidheap_endscan(TableScanDescscan);
122120
externHeapTupleheap_getnext(TableScanDescscan,ScanDirectiondirection);
123121
externboolheap_getnextslot(TableScanDescsscan,

‎src/include/access/tableam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ typedef struct TableAmRoutine
690690
* block using the TsmRoutine's NextSampleTuple() callback.
691691
*
692692
* The callback needs to perform visibility checks, and only return
693-
* visible tuples. That obviously can mean callingNextSampletuple()
693+
* visible tuples. That obviously can mean callingNextSampleTuple()
694694
* multiple times.
695695
*
696696
* The TsmRoutine interface assumes that there's a maximum offset on a
@@ -1596,7 +1596,7 @@ table_relation_size(Relation rel, ForkNumber forkNumber)
15961596
}
15971597

15981598
/*
1599-
*table_needs_toast_table - does this relation need a toast table?
1599+
*table_relation_needs_toast_table - does this relation need a toast table?
16001600
*/
16011601
staticinlinebool
16021602
table_relation_needs_toast_table(Relationrel)

‎src/include/executor/executor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,6 @@ extern ExprContext *MakePerTupleExprContext(EState *estate);
514514

515515
externvoidExecAssignExprContext(EState*estate,PlanState*planstate);
516516
externTupleDescExecGetResultType(PlanState*planstate);
517-
externTupleTableSlotExecGetResultSlot(PlanState*planstate);
518517
externconstTupleTableSlotOps*ExecGetResultSlotOps(PlanState*planstate,
519518
bool*isfixed);
520519
externvoidExecAssignProjectionInfo(PlanState*planstate,

‎src/include/storage/sync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ typedef enum SyncRequestHandler
4444
*/
4545
typedefstructFileTag
4646
{
47-
int16handler;/*SyncRequstHandler value, saving space */
47+
int16handler;/*SyncRequestHandler value, saving space */
4848
int16forknum;/* ForkNumber, saving space */
4949
RelFileNodernode;
5050
uint32segno;

‎src/test/modules/test_integerset/test_integerset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ test_huge_distances(void)
581581
intset_add_member(intset,values[i]);
582582

583583
/*
584-
* Testiterset_is_member() around each of these values
584+
* Testintset_is_member() around each of these values
585585
*/
586586
for (inti=0;i<num_values;i++)
587587
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp