Subject: BufmgrCommit no-op since 2008, remaining uses?

From: Matthias van de Meent <[email-masked]>
Date: Wed, 29 Mar 2023 13:51:36 +0200

Hi,

Whilst reading up on the transaction commit code, I noticed the following lines:

  /* Tell bufmgr and smgr to prepare for commit */
  BufmgrCommit();

BufmgrCommit does exactly nothing; it is an empty function and has
been since commit 33960006 in late 2008 when it stopped calling
smgrcommit().

All two usages of the function (in our code base) seem to be in
xact.c. Are we maintaining it for potential future use, or can the
function be removed?

Kind regards,

Matthias van de Meent

---

From: Tom Lane <[email-masked]>
Date: Wed, 29 Mar 2023 08:12:05 -0400

> xact.c. Are we maintaining it for potential future use, or can the

Seems reasonable.  Even if bufmgr grew a new need to be called
during commit, it would quite possibly need to be called from
a different spot; so I doubt that the function is useful even
as a placeholder.

			regards, tom lane

---

From: Matthias van de Meent <[email-masked]>
Date: Wed, 29 Mar 2023 14:49:18 +0200

> a different spot; so I doubt that the function is useful even

Then, the attached trivial patch removes the function and all
references I could find.

Kind regards,

Matthias van de Meent