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-26T02:21:14Z
Lists: pgsql-hackers
On Fri, Jun 23, 2023 at 11:50 PM Melih Mutlu <m.melihmutlu@gmail.com> wrote: > > > src/backend/replication/logical/worker.c > > > > 10. General -- run_tablesync_worker, TablesyncWorkerMain > > > > IMO these functions would be more appropriately reside in the > > tablesync.c instead of the (common) worker.c. Was there some reason > > why they cannot be put there? > > I'm not really against moving those functions to tablesync.c. But > what's not clear to me is worker.c. Is it the places to put common > functions for all log. rep. workers? Then, what about apply worker? > Should we consider a separate file for apply worker too? IIUC - tablesync.c = for tablesync only - applyparallelworker = for parallel apply worker only - worker.c = for both normal apply worker, plus "common" worker code Regarding making another file (e.g. applyworker.c). It sounds sensible, but I guess you would need to first demonstrate the end result will be much cleaner to get support for such a big refactor. ------ 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