| From: | "Andres Freund" <andres(at)anarazel(dot)de> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: repeated decoding of prepared transactions |
| Date: | 2021-02-20 16:55:46 |
| Message-ID: | 4e2b5197-e2ec-4ecb-b4dd-0f6628f640fb@www.fastmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Fri, Feb 19, 2021, at 19:38, Amit Kapila wrote:
> On Fri, Feb 19, 2021 at 8:23 PM Markus Wanner
> <markus(dot)wanner(at)enterprisedb(dot)com> wrote:
> >
> > With that line of thinking, the point in time (or in WAL) of the COMMIT
> > PREPARED does not matter at all to reason about the decoding of the
> > PREPARE operation. Instead, there are only exactly two cases to consider:
> >
> > a) the PREPARE happened before the start_decoding_at LSN and must not be
> > decoded. (But the effects of the PREPARE must then be included in the
> > initial synchronization. If that's not supported, the output plugin
> > should not enable two-phase commit.)
> >
>
> I see a problem with this assumption. During the initial
> synchronization, this transaction won't be visible to snapshot and we
> won't copy it. Then later if we won't decode and send it then the
> replica will be out of sync. Such a problem won't happen with Ajin's
> patch.
Why isn't the more obvious answer to this to not allow/disable 2pc decoding during the initial sync? You can't really make sense of it before you're synced anyway...
Regards,
Andres
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2021-02-20 20:08:18 | Re: [PATCH] Present all committed transaction to the output plugin |
| Previous Message | Tom Lane | 2021-02-20 16:31:40 | Re: Extensions not dumped when --schema is used |