Re: archive status ".ready" files may be created too early

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "x4mmm(at)yandex-team(dot)ru" <x4mmm(at)yandex-team(dot)ru>, "a(dot)lubennikova(at)postgrespro(dot)ru" <a(dot)lubennikova(at)postgrespro(dot)ru>, "hlinnaka(at)iki(dot)fi" <hlinnaka(at)iki(dot)fi>, "matsumura(dot)ryo(at)fujitsu(dot)com" <matsumura(dot)ryo(at)fujitsu(dot)com>, "masao(dot)fujii(at)gmail(dot)com" <masao(dot)fujii(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: archive status ".ready" files may be created too early
Date: 2021-07-28 01:04:58
Message-ID: 202107280104.ah3afb7d3grg@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Feb-19, Bossart, Nathan wrote:

> 0002 adds logic for persisting the last notified segment through
> crashes. This is needed because a poorly-timed crash could otherwise
> cause us to skip marking segments as ready-for-archival altogether.
> This file is only used for primary servers, as there exists a separate
> code path for marking segments as ready-for-archive for standbys.

I'm not sure I understand what's the reason not to store this value in
pg_control; I feel like I'm missing something. Can you please explain?

There were some comments earlier in the thread about the maximum size of
a record. As I recall, you can have records of arbitrary size if you
have COMMIT with a large number of relation invalidation messages being
included in the xlog record, or a large number of XIDs of
subtransactions in the transaction. Spanning several segments is
possible, AFAIU.

--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/
"La rebeldía es la virtud original del hombre" (Arthur Schopenhauer)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-07-28 01:15:34 Re: a thinko in b676ac443b6
Previous Message David Rowley 2021-07-28 00:07:15 Re: Reduce the number of special cases to build contrib modules on windows