From: | Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> |
---|---|
To: | vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Subject: | Re: [PoC] pg_upgrade: allow to upgrade publisher node |
Date: | 2023-10-19 06:21:27 |
Message-ID: | CANhcyEW9xmB03wcKYby8YrdRPZC+kDsv6e4Wj=SuBBmtX22iPQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Few comments:
> 1) We will be able to override the value of max_slot_wal_keep_size by
> using --new-options like '--new-options "-c
> max_slot_wal_keep_size=val"':
> + /*
> + * Use max_slot_wal_keep_size as -1 to prevent the WAL removal by the
> + * checkpointer process. If WALs required by logical replication slots
> + * are removed, the slots are unusable. This setting prevents the
> + * invalidation of slots during the upgrade. We set this option when
> + * cluster is PG17 or later because logical replication slots
> can only be
> + * migrated since then. Besides, max_slot_wal_keep_size is
> added in PG13.
> + */
> + if (GET_MAJOR_VERSION(cluster->major_version) >= 1700)
> + appendPQExpBufferStr(&pgoptions, " -c
> max_slot_wal_keep_size=-1");
>
> Should there be a check to throw an error if this option is specified
> or do we need some documentation that this option should not be
> specified?
I have tested the above scenario. We are able to override the
max_slot_wal_keep_size by using '--new-options "-c
max_slot_wal_keep_size=val"'. And also with some insert statements
during pg_upgrade, old WAL file were deleted and logical replication
slots were invalidated. Since the slots were invalidated replication
was not happening after the upgrade.
Thanks,
Shlok Kumar Kyal
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2023-10-19 06:28:12 | Re: [PoC] pg_upgrade: allow to upgrade publisher node |
Previous Message | Jeevan Chalke | 2023-10-19 06:07:58 | Re: More new SQL/JSON item methods |