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

Commit4034868

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 parent514aca6 commit4034868

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
@@ -3046,10 +3046,7 @@ AtEOXact_cleanup(Relation relation, bool isCommit)
30463046
*
30473047
* During commit, reset the flag to zero, since we are now out of the
30483048
* creating transaction. During abort, simply delete the relcache entry
3049-
* --- it isn't interesting any longer. (NOTE: if we have forgotten the
3050-
* new-ness of a new relation due to a forced cache flush, the entry will
3051-
* get deleted anyway by shared-cache-inval processing of the aborted
3052-
* pg_class insertion.)
3049+
* --- it isn't interesting any longer.
30533050
*/
30543051
if (relation->rd_createSubid!=InvalidSubTransactionId)
30553052
{

‎src/include/utils/rel.h

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

97-
/*
97+
/*----------
9898
* rd_createSubid is the ID of the highest subtransaction the rel has
9999
* survived into; or zero if the rel was not created in the current top
100100
* transaction. This can be now be relied on, whereas previously it could
@@ -104,8 +104,13 @@ typedef struct RelationData
104104
* have forgotten changing it). rd_newRelfilenodeSubid can be forgotten
105105
* when a relation has multiple new relfilenodes within a single
106106
* transaction, with one of them occurring in a subsequently aborted
107-
* subtransaction, e.g. BEGIN; TRUNCATE t; SAVEPOINT save; TRUNCATE t;
108-
* ROLLBACK TO save; -- rd_newRelfilenode is now forgotten
107+
* subtransaction, e.g.
108+
*BEGIN;
109+
*TRUNCATE t;
110+
*SAVEPOINT save;
111+
*TRUNCATE t;
112+
*ROLLBACK TO save;
113+
*-- rd_newRelfilenodeSubid is now forgotten
109114
*/
110115
SubTransactionIdrd_createSubid;/* rel was created in current xact */
111116
SubTransactionIdrd_newRelfilenodeSubid;/* new relfilenode assigned in

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp