Re: AlterSubscription_refresh "wrconn" wrong variable?
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-07T08:09:05Z
Lists: pgsql-hackers
Attachments
- v4-0001-AlterSubscription_refresh-Use-stack-variable-for-.patch (application/octet-stream) patch v4-0001
- v4-0002-Rename-the-logical-replication-global-wrconn.patch (application/octet-stream) patch v4-0002
On Fri, May 7, 2021 at 7:08 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > > On 2021-May-06, Peter Smith wrote: > >> PSA v3 of the patch. Same as before, but now also renames the global > >> variable from "wrconn" to "lrep_worker_wrconn". > > > I think there are two patches here -- the changes to > > AlterSubscription_refresh are a backpatchable bugfix, and the rest of it > > can just be applied to master. > > The rename of that variable is just cosmetic, true, but I'd still be > inclined to back-patch it. If we don't do so then I'm afraid that > future back-patched fixes might be bitten by the same confusion, > possibly introducing new real bugs. > > Having said that, keeping the two aspects in separate patches might > ease review and testing. Done. > > > In my mind we make a bit of a distinction for global variables by using > > CamelCase rather than undercore_separated_words. > > I think it's about 50/50, TBH. I'd stick with whichever style is > being used in nearby code. > The nearby code was a random mixture of Camels and Snakes, so instead of flipping a coin I went with the suggestion from Alvaro. ~~ PSA v4 of the patch. 0001 - Fixes the AlterSubscription_refresh as before. 0002 - Renames the global var "wrconn" -> "LogRepWorkerWalRcvConn" as suggested. ------ Kind Regards, Peter Smith Fujitsu Australia
Commits
-
Rename the logical replication global "wrconn"
- e5c071bc0f93 13.4 landed
- db16c656478b 14.0 landed
- b5b7cba7643c 10.18 landed
- b0e6e08b1981 11.13 landed
- 6e9723cde5c6 12.8 landed
-
AlterSubscription_refresh: avoid stomping on global variable
- ef70b6f8e28d 13.3 landed
- cfebc7080c99 12.7 landed
- b40865ebd41a 11.12 landed
- 4e8c0f1a0d0d 14.0 landed
- 1803c7626000 10.17 landed
-
Logical replication support for initial data copy
- 7c4f52409a8c 10.0 cited