From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | bharath(dot)rupireddyforpostgres(at)gmail(dot)com |
Cc: | sravanvcybage(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Question regarding "Make archiver process an auxiliary process. commit" |
Date: | 2022-12-07 06:01:02 |
Message-ID: | 20221207.150102.878202280292197696.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Tue, 6 Dec 2022 17:23:50 +0530, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote in
> Thanks. +1 for fixing this.
>
> I would like to quote recent discussions on reducing the useless
> wakeups or increasing the sleep/hibernation times in various processes
> to reduce the power savings [1] [2] [3] [4] [5]. With that in context,
> does the archiver need to wake up every 60 sec at all when its latch
> gets set (PgArchWakeup()) whenever the server switches to a new WAL
> file? What happens if we get rid of PGARCH_AUTOWAKE_INTERVAL and rely
> on its latch being set? If required, we can spread PgArchWakeup() to
> more places, no?
I thought so first, but archiving may be interrupted for various
reasons (disk full I think is the most common one). So, only
intentional wakeups aren't sufficient.
> Before even answering the above questions, I think we need to see if
> there're any cases where a process can miss SetLatch() calls (I don't
> have an answer for that).
I read a recent Thomas' mail that says something like "should we
consider the case latch sets are missed?". It is triggered by SIGURG
or SetEvent(). I'm not sure but I believe the former is now reliable
and the latter was born reliable.
> Or do we want to stick to what the below comment says?
>
> /*
> * There shouldn't be anything for the archiver to do except to wait for a
> * signal ... however, the archiver exists to protect our data, so she
> * wakes up occasionally to allow herself to be proactive.
> */
So I think this is still valid. If we want to eliminate useless
wakeups, archiver needs to remember whether the last iteration was
fully done or not. But it seems to be a race condition is involved.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2022-12-07 06:19:39 | Re: Question regarding "Make archiver process an auxiliary process. commit" |
Previous Message | Hayato Kuroda (Fujitsu) | 2022-12-07 05:59:14 | RE: [Proposal] Add foreign-server health checks infrastructure |