Fix cosmetic blemishes involving rd_createSubid.
authorNoah Misch <noah@leadboat.com>
Sat, 21 Mar 2020 16:38:26 +0000 (09:38 -0700)
committerNoah Misch <noah@leadboat.com>
Sat, 21 Mar 2020 16:38:35 +0000 (09:38 -0700)
Remove an obsolete comment from AtEOXact_cleanup().  Restore formatting
of a comment in struct RelationData, mangled by the pgindent run in
commit 9af4159fce6654aa0e081b00d02bca40b978745c.  Back-patch to 9.5 (all
supported versions), because another fix stacks on this.

src/backend/utils/cache/relcache.c
src/include/utils/rel.h

index 07c938e0dacd844906f902d4f5452ad42bd7822f..07e0ab136ad40389fc030942b926d12026b2b1fa 100644 (file)
@@ -2741,10 +2741,7 @@ AtEOXact_cleanup(Relation relation, bool isCommit)
     *
     * During commit, reset the flag to zero, since we are now out of the
     * creating transaction.  During abort, simply delete the relcache entry
-    * --- it isn't interesting any longer.  (NOTE: if we have forgotten the
-    * new-ness of a new relation due to a forced cache flush, the entry will
-    * get deleted anyway by shared-cache-inval processing of the aborted
-    * pg_class insertion.)
+    * --- it isn't interesting any longer.
     */
    if (relation->rd_createSubid != InvalidSubTransactionId)
    {
index fa15f28468d5fb363ba1f9acef096f6cfb1b11a5..ea247b2a63694c50b1a32e5c59f57dbdfec6248d 100644 (file)
@@ -63,7 +63,7 @@ typedef struct RelationData
    char        rd_indexvalid;  /* state of rd_indexlist: 0 = not valid, 1 =
                                 * valid, 2 = temporarily forced */
 
-   /*
+   /*----------
     * rd_createSubid is the ID of the highest subtransaction the rel has
     * survived into; or zero if the rel was not created in the current top
     * transaction.  This can be now be relied on, whereas previously it could
@@ -73,8 +73,13 @@ typedef struct RelationData
     * have forgotten changing it). rd_newRelfilenodeSubid can be forgotten
     * when a relation has multiple new relfilenodes within a single
     * transaction, with one of them occurring in a subsequently aborted
-    * subtransaction, e.g. BEGIN; TRUNCATE t; SAVEPOINT save; TRUNCATE t;
-    * ROLLBACK TO save; -- rd_newRelfilenode is now forgotten
+    * subtransaction, e.g.
+    *      BEGIN;
+    *      TRUNCATE t;
+    *      SAVEPOINT save;
+    *      TRUNCATE t;
+    *      ROLLBACK TO save;
+    *      -- rd_newRelfilenodeSubid is now forgotten
     */
    SubTransactionId rd_createSubid;    /* rel was created in current xact */
    SubTransactionId rd_newRelfilenodeSubid;    /* new relfilenode assigned in