From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com> |
Cc: | Ants Aasma <ants(dot)aasma(at)cybertec(dot)at>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Small fixes needed by high-availability tools |
Date: | 2025-05-14 09:33:33 |
Message-ID: | CAA4eK1JE0XDmn91H=AHrfPXghSJFK_NGY+P8HqCtvWN7nOwAsg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, May 14, 2025 at 2:15 AM Mihail Nikalayeu
<mihailnikalayeu(at)gmail(dot)com> wrote:
>
> > One idea to solve this problem could be that whenever we cancel
> > sync_rep_wait, we set some system-wide flag that indicates that any
> > new transaction must ensure that all the current data is replicated to
> > the synchronous standby. Once we ensure that we have waited for
> > pending transactions to replicate, we can toggle back that system-wide
> > flag. Now, if the system restarts for any reason during such a wait,
> > we can use your idea to disallow new connections until the standby
> > quorum is established.
>
> It might not necessarily be a flag—it could be some LSN value instead.
> Also, it's not just about a "new transaction," but about any new
> snapshot that could see data not yet replicated to the synchronous
> standby.
>
Sounds reasonable to me. Let us see what others think about it.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2025-05-14 10:36:27 | vectorized CRC on ARM64 |
Previous Message | jian he | 2025-05-14 09:16:14 | Re: using index to speedup add not null constraints to a table |