Re: Handing off SLRU fsyncs to the checkpointer

Tomas Vondra <tomas.vondra@enterprisedb.com>

From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Thomas Munro <thomas.munro@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jakub Wartak <Jakub.Wartak@tomtom.com>, "alvherre@2ndquadrant.com" <alvherre@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-01-03T14:35:39Z
Lists: pgsql-hackers
On 9/25/20 9:09 AM, Thomas Munro wrote:
> On Fri, Sep 25, 2020 at 12:53 PM Thomas Munro <thomas.munro@gmail.com> wrote:
>> Here's a new version.  The final thing I'm contemplating before
>> pushing this is whether there may be hidden magical dependencies in
>> the order of operations in CheckPointGuts(), which I've changed
>> around.  Andres, any comments?
> 
> I nagged Andres off-list and he opined that it might be better to
> reorder it a bit so that ProcessSyncRequests() comes after almost
> everything else, so that if we ever teach more things to offload their
> fsync work it'll be in the right order.  I reordered it like that; now
> only CheckPointTwoPhase() comes later, based on the comment that
> accompanies it.  In any case, we can always reconsider the ordering of
> this function in later commits as required.  Pushed like that.
> 

Seems this commit left behind a couple unnecessary prototypes in a bunch 
of header files. In particular, it removed these functions

- ShutdownCLOG();
- ShutdownCommitTs();
- ShutdownSUBTRANS();
- ShutdownMultiXact();

but we still have

$ git grep ShutdownCLOG
src/include/access/clog.h:extern void ShutdownCLOG(void);


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Commits

  1. Remove unused function prototypes.

  2. Defer flushing of SLRU files.

  3. Improve the vacuum error context phase information.

  4. Cache smgrnblocks() results in recovery.

  5. Refactor the fsync queue for wider use.

  6. Increase maximum number of clog buffers.

  7. Make the number of CLOG buffers adaptive, based on shared_buffers.

  8. Replace implementation of pg_log as a relation accessed through the