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

Commit03e99a6

Browse files
committed
Fix cosmetic blemishes involving rd_createSubid.
Remove an obsolete comment from AtEOXact_cleanup(). Restore formattingof a comment in struct RelationData, mangled by the pgindent run incommit9af4159. Back-patch to 9.5 (allsupported versions), because another fix stacks on this.
1 parent0c96744 commit03e99a6

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

‎src/backend/utils/cache/relcache.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,10 +2926,7 @@ AtEOXact_cleanup(Relation relation, bool isCommit)
29262926
*
29272927
* During commit, reset the flag to zero, since we are now out of the
29282928
* creating transaction. During abort, simply delete the relcache entry
2929-
* --- it isn't interesting any longer. (NOTE: if we have forgotten the
2930-
* new-ness of a new relation due to a forced cache flush, the entry will
2931-
* get deleted anyway by shared-cache-inval processing of the aborted
2932-
* pg_class insertion.)
2929+
* --- it isn't interesting any longer.
29332930
*/
29342931
if (relation->rd_createSubid!=InvalidSubTransactionId)
29352932
{

‎src/include/utils/rel.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef struct RelationData
6464
* valid, 2 = temporarily forced */
6565
boolrd_statvalid;/* is rd_statlist valid? */
6666

67-
/*
67+
/*----------
6868
* rd_createSubid is the ID of the highest subtransaction the rel has
6969
* survived into; or zero if the rel was not created in the current top
7070
* transaction. This can be now be relied on, whereas previously it could
@@ -74,8 +74,13 @@ typedef struct RelationData
7474
* have forgotten changing it). rd_newRelfilenodeSubid can be forgotten
7575
* when a relation has multiple new relfilenodes within a single
7676
* transaction, with one of them occurring in a subsequently aborted
77-
* subtransaction, e.g. BEGIN; TRUNCATE t; SAVEPOINT save; TRUNCATE t;
78-
* ROLLBACK TO save; -- rd_newRelfilenode is now forgotten
77+
* subtransaction, e.g.
78+
*BEGIN;
79+
*TRUNCATE t;
80+
*SAVEPOINT save;
81+
*TRUNCATE t;
82+
*ROLLBACK TO save;
83+
*-- rd_newRelfilenodeSubid is now forgotten
7984
*/
8085
SubTransactionIdrd_createSubid;/* rel was created in current xact */
8186
SubTransactionIdrd_newRelfilenodeSubid;/* new relfilenode assigned in

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp