Thread
Commits
-
Remove obsolete comment in AtEOXact_Inval
- 15b140d465b6 19 (unreleased) landed
-
remove obsolete comment in AtEOXact_Inval
Steven Niu <niushiji@gmail.com> — 2025-10-27T02:43:51Z
Hi, Hackers, When I read the code, I noticed there is one line of comment in function AtEOXact_Inval() which is obviously obsolete. "This should be called as the last step in processing a transaction" AtEOXact_Inval() is called in CommitTransaction() and AbortTransaction() and there are many other steps after function AtEOXact_Inval() is called. Such as: AtCommit_Notify(); AtEOXact_GUC(true, 1); AtEOXact_SPI(true); AtEOXact_Enum(); AtEOXact_on_commit_actions(true); AtEOXact_Namespace(true, is_parallel_worker); AtEOXact_SMgr(); AtEOXact_Files(true); AtEOXact_ComboCid(); AtEOXact_HashTables(true); AtEOXact_PgStat(true, is_parallel_worker); AtEOXact_Snapshot(true, false); AtEOXact_ApplyLauncher(true); AtEOXact_LogicalRepWorkers(true); So that comment is no longer true. I made a patch to remove it as attached. Best Regards, Steven -
Re: remove obsolete comment in AtEOXact_Inval
Chao Li <li.evan.chao@gmail.com> — 2025-10-27T03:50:21Z
> On Oct 27, 2025, at 10:43, Steven Niu <niushiji@gmail.com> wrote: > > Hi, Hackers, > > When I read the code, I noticed there is one line of comment in function AtEOXact_Inval() which is obviously obsolete. > > "This should be called as the last step in processing a transaction" > > Steven<0001-PATCH-remove-obsolete-comment-in-AtEOXact_Inval.patch> +1 The comment of "void AtEOXact_Inval(bool isCommit): ``` * Note: * This should be called as the last step in processing a transaction. ``` Was added 29 years ago. However, looking at CommitTransaction(): ``` /* * Make catalog changes visible to all backends. This has to happen after * relcache references are dropped (see comments for * AtEOXact_RelationCache), but before locks are released (if anyone is * waiting for lock on a relation we've modified, we want them to know * about the catalog change before they start using the relation). */ AtEOXact_Inval(true); AtEOXact_MultiXact(); # <=== added 21 years ago ``` it seems the newer change has made the original comment inaccurate. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/ -
Re: remove obsolete comment in AtEOXact_Inval
Daniel Gustafsson <daniel@yesql.se> — 2026-05-08T08:54:22Z
> On 27 Oct 2025, at 04:50, Chao Li <li.evan.chao@gmail.com> wrote: > >> On Oct 27, 2025, at 10:43, Steven Niu <niushiji@gmail.com> wrote: >> >> Hi, Hackers, >> >> When I read the code, I noticed there is one line of comment in function AtEOXact_Inval() which is obviously obsolete. >> >> "This should be called as the last step in processing a transaction" >> >> Steven<0001-PATCH-remove-obsolete-comment-in-AtEOXact_Inval.patch> > > +1 > > The comment of "void AtEOXact_Inval(bool isCommit): > ``` > * Note: > * This should be called as the last step in processing a transaction. > ``` > Was added 29 years ago. This comment was part of the Postgres95 import, and was originally added to the function RegisterInvalid() which in turn was committed by Cimarron Taylor in 1990. I agree that it's no longer helpful and will go ahead to remove it shortly unless someone disagrees. -- Daniel Gustafsson
-
Re: remove obsolete comment in AtEOXact_Inval
Daniel Gustafsson <daniel@yesql.se> — 2026-05-18T15:50:07Z
> On 8 May 2026, at 01:54, Daniel Gustafsson <daniel@yesql.se> wrote: > This comment was part of the Postgres95 import, and was originally added to the > function RegisterInvalid() which in turn was committed by Cimarron Taylor in > 1990. I agree that it's no longer helpful and will go ahead to remove it shortly > unless someone disagrees. Done. -- Daniel Gustafsson