Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.
От | vignesh C |
---|---|
Тема | Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility. |
Дата | |
Msg-id | CALDaNm3wLKFjSJ-4fF4ACBaq+jH3fPeA68OmS3jc_smaOe=6Qw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility. (Shubham Khanna <khannashubham1197@gmail.com>) |
Ответы |
Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.
|
Список | pgsql-hackers |
On Wed, 19 Mar 2025 at 14:32, Shubham Khanna <khannashubham1197@gmail.com> wrote: > > > Changed -r to -R based on the shared analysis to avoid conflict with > the --retain option used in pg_upgrade and to maintain consistency > across tools. > > The attached patch contains the suggested change. Few suggestions: 1) I felt the comments from the function header of check_and_drop_publications and the comments of the caller should be interchanged. That will help in understanding the check_and_drop_publications function more easily: + * Since the publications were created before the consistent LSN, they + * remain on the subscriber even after the physical replica is + * promoted. Remove these publications from the subscriber because + * they have no use. Additionally, if requested, drop all pre-existing + * publications. */ - drop_publication(conn, &dbinfo[i]); + check_and_drop_publications(conn, &dbinfo[i]); +/* + * Check and drop the required publications in the given database. + */ +static void +check_and_drop_publications(PGconn *conn, struct LogicalRepInfo *dbinfo) 2) I was not sure if this line "Multiple object types can be specified by using multiple --removed" is required in documentation, as currently the only option supported is publications: + target server. Multiple object types can be specified by using multiple + <option>--remove</option> switches. + </para> I felt this should be added once at least one more object type removal is included. Regards, Vignesh
В списке pgsql-hackers по дате отправления: