Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Melih Mutlu <m.melihmutlu@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>, "wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>,
"shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>, Amit Kapila <amit.kapila16@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>, shveta malik <shveta.malik@gmail.com>
Date: 2023-06-01T12:22:21Z
Lists: pgsql-hackers
On Thu, Jun 1, 2023 at 7:22 AM Melih Mutlu <m.melihmutlu@gmail.com> wrote: > > Hi Peter, > > Peter Smith <smithpb2250@gmail.com>, 26 May 2023 Cum, 10:30 tarihinde > şunu yazdı: > > > > On Thu, May 25, 2023 at 6:59 PM Melih Mutlu <m.melihmutlu@gmail.com> wrote: > > Yes, I was mostly referring to the same as point 1 below about patch > > 0001. I guess I just found the concept of mixing A) launching TSW (via > > apply worker) with B) reassigning TSW to another relation (by the TSW > > battling with its peers) to be a bit difficult to understand. I > > thought most of the refactoring seemed to arise from choosing to do it > > that way. > > No, the refactoring is not related to the way of assigning a new > table. In fact, the patch did not include such refactoring a couple > versions earlier [1] and was still assigning tables the same way. It > was suggested here [2]. Then, I made the patch 0001 which includes > some refactoring and only reuses the worker and nothing else. Also I > find it more understandable this way, maybe it's a bit subjective. > > I feel that logical replication related files are getting more and > more complex and hard to understand with each change. IMHO, even > without reusing anything, those need some refactoring anyway. But for > this patch, refactoring some places made it simpler to reuse workers > and/or replication slots, regardless of how tables are assigned to > TSW's. If refactoring is wanted anyway (regardless of the chosen "reuse" logic), then will it be better to split off a separate 0001 patch just to get that part out of the way first? ------ Kind Regards, Peter Smith. Fujitsu Australia
Commits
-
Refactor to split Apply and Tablesync Workers code.
- 02c1b64fb15c 17.0 landed
-
Fix possible logical replication crash.
- e7e7da2f8d57 16.0 cited