From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jakub Wartak <Jakub(dot)Wartak(at)tomtom(dot)com>, "alvherre(at)2ndquadrant(dot)com" <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Handing off SLRU fsyncs to the checkpointer |
Date: | 2020-09-25 00:53:37 |
Message-ID: | CA+hUKG+cffBxq9-Yf+nsJpJPP6RZypBttBtb5UJqnYMb+sHqLg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Sep 25, 2020 at 12:05 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > Tom, do you have any thoughts on ShutdownCLOG() etc?
>
> Hm, if we cannot reach that without first completing a shutdown checkpoint,
> it does seem a little pointless.
Thanks for the sanity check.
> It'd likely be a good idea to add a comment to CheckPointCLOG et al
> explaining that we expect $what-exactly to fsync the data we are writing
> before the checkpoint is considered done.
Good point. Done like this:
+ /*
+ * Write dirty CLOG pages to disk. This may result in sync
requests queued
+ * for later handling by ProcessSyncRequests(), as part of the
checkpoint.
+ */
TRACE_POSTGRESQL_CLOG_CHECKPOINT_START(true);
- SimpleLruFlush(XactCtl, true);
+ SimpleLruWriteAll(XactCtl, true);
TRACE_POSTGRESQL_CLOG_CHECKPOINT_DONE(true);
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?
Attachment | Content-Type | Size |
---|---|---|
v8-0001-Defer-flushing-of-SLRU-files.patch | text/x-patch | 30.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2020-09-25 00:55:31 | pg_upgrade: fail early if a tablespace dir already exists for new cluster version |
Previous Message | Kyotaro Horiguchi | 2020-09-25 00:33:48 | Re: "cert" + clientcert=verify-ca in pg_hba.conf? |