Re: Adding a LogicalRepWorker type field
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-08-02T06:43:33Z
Lists: pgsql-hackers
Attachments
- v3-0001-Add-LogicalRepWorkerType-enum.patch (application/octet-stream) patch v3-0001
- v3-0002-Switch-on-worker-type.patch (application/octet-stream) patch v3-0002
On Wed, Aug 2, 2023 at 1:00 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Wed, Aug 2, 2023 at 8:10 AM Peter Smith <smithpb2250@gmail.com> wrote: > > > > > > The am_xxx functions are removed now in the v2-0001 patch. See [1]. > > > > The replacement set of macros (the ones with no arg) are not strictly > > necessary, except I felt it would make the code unnecessarily verbose > > if we insist to pass MyLogicalRepWorker everywhere from the callers in > > worker.c / tablesync.c / applyparallelworker.c. > > > > Agreed but having a dual set of macros is also not clean. Can we > provide only a unique set of inline functions instead? > We can't use the same names for both with/without-parameter functions because there is no function overloading in C. In patch v3-0001 I've replaced the "dual set of macros", with a single inline function of a different name, and one set of space-saving macros. PSA v3 ------ Kind Regards, Peter Smith. Fujitsu Australia
Commits
-
Simplify the logical worker type checks by using the switch on worker type.
- 1cdc6d86bfc3 17.0 landed
-
Simplify determining logical replication worker types.
- 2a8b40e36819 17.0 landed