Re: [bug fix] prepared transaction might be lost when max_prepared_transactions is zero on the subscriber
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>,
"Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>,
"Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>,
"pgsql-hackers@lists.postgresql.org"
<pgsql-hackers@lists.postgresql.org>
Date: 2024-11-07T19:23:47Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Don't advance origin during apply failure.
- 1528b0d899d6 19 (unreleased) landed
- 2f7ffe124a9b 18.2 landed
- 63a65adf4d8e 16.12 landed
- 0ed8f1afb15f 17.8 landed
- 3f28b2fcac33 18.0 landed
- 915aafe82a7c 17.0 landed
- b39c5272c1d2 16.5 landed
-
Perform apply of large transactions by parallel workers.
- 216a784829c2 16.0 cited
Amit Kapila <amit.kapila16@gmail.com> writes: > On Tue, Aug 20, 2024 at 2:01 PM shveta malik <shveta.malik@gmail.com> wrote: >> Looks good to me. Please find backported patches attached. > Pushed. I came across this commit while preparing release notes, and I'm worried about whether it doesn't create more problems than it solves. The intent stated in the thread subject is to prevent an apply worker from advancing past a prepared transaction if the subscriber side doesn't permit prepared transactions. However, it appears to me that the committed patch doesn't permit an apply worker to advance past any failing transaction whatsoever. Was any thought given to how a DBA would get out of such a situation and get replication flowing again? In the prepared-xact case, it's at least clear that you could increase max_prepared_transactions and restart the subscriber installation. In the general case, it's not very obvious that you'd even know what the problem is let alone have an easy way to fix it. In other words: I thought the original design here was to intentionally ignore apply errors and keep going, on the theory that that was better than blocking replication altogether. This commit has reversed that decision, on the strength of little or no discussion AFAICS. Are we really ready to push this into minor releases of stable branches? Is it a good idea even on HEAD? regards, tom lane