Re: Resetting recovery target parameters in pg_createsubscriber - Mailing list pgsql-hackers

From Alena Vinter
Subject Re: Resetting recovery target parameters in pg_createsubscriber
Date
Msg-id CAGWv16KC2RGC30GtpWQc+7yuhr6bnOz7qypb=DGFGQ23C6ARSQ@mail.gmail.com
Whole thread Raw
In response to Re: Resetting recovery target parameters in pg_createsubscriber  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Resetting recovery target parameters in pg_createsubscriber
List pgsql-hackers
Hi,

I'm back with improvements :)
I've added code comments in `recovery_gen.c` and expanded the documentation in `pg_createsubscriber.sgml`.

About the recovery parameters cleanup: I thought about adding an exit callback, but it doesn't really make sense because once the target server gets promoted (which happens soon after we set the parameters), there's no point in cleaning up - the server is already promoted and can't be used as a replica again and must be recreated. Also, `reset_recovery_params()` might call `exit()` itself, which could cause problems with the cleanup callback.
So I think it's better to just warn users about leftover parameters and let them handle the cleanup manually if needed.

By the way, is it ok that the second patch includes both code and test changes together, or should I split them into separate commits?

I look forward to your feedback!

Regards,
Alena Vinter
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Introduce unified support for composite GUC options
Next
From: jian he
Date:
Subject: Re: let ALTER TABLE DROP COLUMN drop whole-row referenced object