pg_createsubscriber: Remove some code bloat in the atexit() callback

Michael Paquier <michael@paquier.xyz>

Commit: 83e5763d4dddd9b24b738d8335b3cbfc2742e4ac
Author: Michael Paquier <michael@paquier.xyz>
Date: 2025-03-16T10:20:49Z
Releases: 18.0
pg_createsubscriber: Remove some code bloat in the atexit() callback

This commit adjusts some code added by e117cfb2f6c6 in the atexit()
callback of pg_createsubscriber.c, in charge of performing post-failure
cleanup actions.  The code loops over all the databases specified, and
it is changed here to rely on a single LogicalRepInfo for each database
rather than always using LogicalRepInfos, simplifying its logic.

Author: Peter Smith <smithpb2250@gmail.com>
Discussion: https://postgr.es/m/CAHut+PtdBSVi4iH7BObDVwDNVwOpn+H3fezOBdSTtENx+rhNMw@mail.gmail.com

Files

PathChange+/−
src/bin/pg_basebackup/pg_createsubscriber.c modified +14 −12

Discussion