From: | "Bossart, Nathan" <bossartn(at)amazon(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Avoiding data loss with synchronous replication |
Date: | 2021-07-23 17:53:21 |
Message-ID: | F3DEA948-1614-417F-B5F4-227152657AAA@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 7/23/21, 3:58 AM, "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Fri, Jul 23, 2021 at 2:48 AM Bossart, Nathan <bossartn(at)amazon(dot)com> wrote:
>> Instead of blocking query cancellations and backend terminations, I
>> think we should allow them to proceed, but we should keep the
>> transactions marked in-progress so they do not yet become visible to
>> sessions on the primary.
>>
>
> One naive question, what if the primary gets some error while changing
> the status from in-progress to committed? Won't in such a case the
> transaction will be visible on standby but not on the primary?
Yes. In this case, the transaction would remain in-progress on the
primary until it can be marked committed.
>> Once replication has caught up to the
>> the necessary point, the transactions can be marked completed, and
>> they would finally become visible.
>>
>
> If the session issued the commit is terminated, will this work be done
> by some background process?
I think the way I'm imagining it is that a background process would be
responsible for handling all of the "offloaded" transactions. I'm not
wedded to any particular design at this point, though.
Nathan
From | Date | Subject | |
---|---|---|---|
Next Message | Bossart, Nathan | 2021-07-23 17:53:47 | Re: Avoiding data loss with synchronous replication |
Previous Message | Mark Dilger | 2021-07-23 17:43:00 | Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers) |