Thread

Commits

  1. Remove empty function BufmgrCommit().

  2. Rethink the way FSM truncation works. Instead of WAL-logging FSM

  1. BufmgrCommit no-op since 2008, remaining uses?

    Matthias van de Meent <boekewurm+postgres@gmail.com> — 2023-03-29T11:51:36Z

    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
    
    
    
    
  2. Re: BufmgrCommit no-op since 2008, remaining uses?

    Tom Lane <tgl@sss.pgh.pa.us> — 2023-03-29T12:12:05Z

    Matthias van de Meent <boekewurm+postgres@gmail.com> writes:
    > 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?
    
    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
    
    
    
    
  3. Re: BufmgrCommit no-op since 2008, remaining uses?

    Matthias van de Meent <boekewurm+postgres@gmail.com> — 2023-03-29T12:49:18Z

    On Wed, 29 Mar 2023 at 14:12, Tom Lane <tgl@sss.pgh.pa.us> wrote:
    >
    > Matthias van de Meent <boekewurm+postgres@gmail.com> writes:
    > > 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?
    >
    > 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.
    
    Then, the attached trivial patch removes the function and all
    references I could find.
    
    Kind regards,
    
    Matthias van de Meent
    
  4. Re: BufmgrCommit no-op since 2008, remaining uses?

    Tom Lane <tgl@sss.pgh.pa.us> — 2023-03-29T13:17:37Z

    Matthias van de Meent <boekewurm+postgres@gmail.com> writes:
    > Then, the attached trivial patch removes the function and all
    > references I could find.
    
    Pushed after a bit of fooling with adjacent comments.
    
    			regards, tom lane