Re: Excessive number of replication slots for 12->14 logical replication
Ajin Cherian <itsajin@gmail.com>
From: Ajin Cherian <itsajin@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
Peter Smith <smithpb2250@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
Hubert Lubaczewski <depesz@depesz.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-08-18T03:44:12Z
Lists: pgsql-bugs
Attachments
- v8-0001-fix-excessive-replication-origin-slots-issue.patch (application/octet-stream) patch v8-0001
On Thu, Aug 18, 2022 at 12:40 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Thu, Aug 18, 2022 at 11:38 AM Ajin Cherian <itsajin@gmail.com> wrote: > > > > On Thu, Aug 18, 2022 at 10:50 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > > > > > > Ajin Cherian, do you want to update the patch according to these > > > comments? or shall I? > > > > > > Regards, > > > > > > > I will create a patch for this in a short while. > > Great, thanks! > > Regards, > Attached a patch with the changes. In DropSubscription(), I have let GetSubscriptionRelations() filter the READY state relations but added a check for !SYNCDONE state while cleaning up origin tracking. This matches with the logic used for clean-up of tablesync slots below in the same function. regards, Ajin Cherian Fujitsu Australia
Commits
-
Make the tablesync worker's replication origin drop logic robust.
- 88f488319bac 16.0 landed
-
Drop replication origin slots before tablesync worker exits.
- f6c5edb8abca 16.0 landed
-
Allow multiple xacts during table sync in logical replication.
- ce0fdbfe9722 14.0 cited