pgsql: pg_createsubscriber: Remove some code bloat in the atexit() call

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_createsubscriber: Remove some code bloat in the atexit() call
Date: 2025-03-16 10:32:42
Message-ID: E1ttlIQ-002k4U-19@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHut+PtdBSVi4iH7BObDVwDNVwOpn+H3fezOBdSTtENx+rhNMw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/83e5763d4dddd9b24b738d8335b3cbfc2742e4ac

Modified Files
--------------
src/bin/pg_basebackup/pg_createsubscriber.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2025-03-16 11:34:27 pgsql: reindexdb: Fix the index-level REINDEX with multiple jobs
Previous Message Andres Freund 2025-03-16 02:18:20 pgsql: localbuf: Introduce FlushLocalBuffer()