Re: pgsql: Fix WAL replay in presence of an incomplete record

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix WAL replay in presence of an incomplete record
Date: 2021-11-05 12:28:16
Message-ID: 202111051228.q6caqqy6ttjb@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2021-Nov-05, Alvaro Herrera wrote:

> On 2021-Nov-04, Tom Lane wrote:
>
> > the standbys
> > would be unable to proceed anyway in case of a primary crash at the
> > wrong time, because an un-updated primary would send them inconsistent
> > WAL. If anything, it seems like it might be marginally better to
> > update the primary first, reducing the window for it to send WAL that
> > the standbys will *never* be able to handle. Then, if it crashes, at
> > least the WAL contains something the standbys can process once you
> > update them.

I suppose the strategy is useless if the primary never crashes. If the
situation does occur, users can handle it the same way they've handled
it thus far: manually delete the segment from the standby and restart.
At least they know what to do and may even have already automated it.
The other situation is new and would need somebody, possibly taken
abruptly from their sleep, to try to understand why their standbys
refuse to proceed replication in a novel way.

--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/
"Porque Kim no hacía nada, pero, eso sí,
con extraordinario éxito" ("Kim", Kipling)

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2021-11-05 13:09:55 pgsql: pgcrypto: Remove non-OpenSSL support
Previous Message Alvaro Herrera 2021-11-05 12:06:50 Re: pgsql: Fix WAL replay in presence of an incomplete record

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-11-05 12:34:26 Re: WIP: expression evaluation improvements
Previous Message Daniel Gustafsson 2021-11-05 12:07:21 Re: [PATCH] rename column if exists