pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: ALTER SYSTEM between upgrades
3+ messages / 2 participants
[nested] [flat]
* Re: ALTER SYSTEM between upgrades
@ 2020-08-25 18:59 Bruce Momjian <bruce@momjian.us>
2020-08-25 22:22 ` Re: ALTER SYSTEM between upgrades Daniel Gustafsson <daniel@yesql.se>
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Momjian @ 2020-08-25 18:59 UTC (permalink / raw)
To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; pgsql-docs
On Tue, Jul 14, 2020 at 12:52:23PM +0200, Daniel Gustafsson wrote:
> > On 14 Jul 2020, at 01:58, Bruce Momjian <bruce@momjian.us> wrote:
>
> > I am creating a new thread to discuss the question raised by Alvaro of
> > how many ALTER SYSTEM settings are lost during major upgrades. Do we
> > properly document that users should migrate their postgresql.conf _and_
> > postgresql.auto.conf files during major upgrades? I personally never
> > thought of this until now.
>
> Transferring postgresql.conf is discussed to some degree in the documentation
> for pg_upgrade:
>
> 11. Restore pg_hba.conf
> If you modified pg_hba.conf, restore its original settings. It might
> also be necessary to adjust other configuration files in the new
> cluster to match the old cluster, e.g. postgresql.conf.
>
> .. as well as upgrading via pg_dumpall:
>
> 4. Restore your previous pg_hba.conf and any postgresql.conf
> modifications.
>
> One can argue whether those bulletpoints are sufficient for stressing the
> importance, but it's at least mentioned. There is however no mention of
> postgresql.auto.conf which clearly isn't helping anyone, so we should fix that.
>
> Taking that a step further, maybe we should mention additional config files
> which could be included via include directives? There are tools out there who
> avoid changing the users postgresql.conf by injecting an include directive
> instead; they might've placed the included file alongside postgresql.conf.
I have developed the attached pg_upgrade doc patch to address this.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
Attachments:
auto.diff (text/x-diff, 1.3K) download
diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 6779a5bddc..74f27130ec 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -516,9 +516,10 @@ pg_upgrade.exe
<para>
Save any configuration files from the old standbys' configuration
- directories you need to keep, e.g. <filename>postgresql.conf</filename>,
- <literal>pg_hba.conf</literal>, because these will be overwritten or
- removed in the next step.
+ directories you need to keep, e.g. <filename>postgresql.conf</filename>
+ (and any files included by it), <filename>postgresql.auto.conf</filename>,
+ <literal>pg_hba.conf</literal>, because these will be overwritten
+ or removed in the next step.
</para>
</step>
@@ -606,7 +607,8 @@ rsync --archive --delete --hard-links --size-only --no-inc-recursive /vol1/pg_tb
<para>
If you modified <filename>pg_hba.conf</filename>, restore its original settings.
It might also be necessary to adjust other configuration files in the new
- cluster to match the old cluster, e.g. <filename>postgresql.conf</filename>.
+ cluster to match the old cluster, e.g., <filename>postgresql.conf</filename>
+ (and any files included by it), <filename>postgresql.auto.conf</filename>.
</para>
</step>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ALTER SYSTEM between upgrades
2020-08-25 18:59 Re: ALTER SYSTEM between upgrades Bruce Momjian <bruce@momjian.us>
@ 2020-08-25 22:22 ` Daniel Gustafsson <daniel@yesql.se>
2020-08-31 21:36 ` Re: ALTER SYSTEM between upgrades Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Gustafsson @ 2020-08-25 22:22 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; pgsql-docs
> On 25 Aug 2020, at 21:30, Bruce Momjian <bruce@momjian.us> wrote:
>
> On Tue, Jul 14, 2020 at 12:52:23PM +0200, Daniel Gustafsson wrote:
>>>> On 14 Jul 2020, at 01:58, Bruce Momjian <bruce@momjian.us> wrote:
>>>
>>> I am creating a new thread to discuss the question raised by Alvaro of
>>> how many ALTER SYSTEM settings are lost during major upgrades. Do we
>>> properly document that users should migrate their postgresql.conf _and_
>>> postgresql.auto.conf files during major upgrades? I personally never
>>> thought of this until now.
>>
>> Transferring postgresql.conf is discussed to some degree in the documentation
>> for pg_upgrade:
>>
>> 11. Restore pg_hba.conf
>> If you modified pg_hba.conf, restore its original settings. It might
>> also be necessary to adjust other configuration files in the new
>> cluster to match the old cluster, e.g. postgresql.conf.
>>
>> .. as well as upgrading via pg_dumpall:
>>
>> 4. Restore your previous pg_hba.conf and any postgresql.conf
>> modifications.
>>
>> One can argue whether those bulletpoints are sufficient for stressing the
>> importance, but it's at least mentioned. There is however no mention of
>> postgresql.auto.conf which clearly isn't helping anyone, so we should fix that.
>>
>> Taking that a step further, maybe we should mention additional config files
>> which could be included via include directives? There are tools out there who
>> avoid changing the users postgresql.conf by injecting an include directive
>> instead; they might've placed the included file alongside postgresql.conf.
>
> I have developed the attached pg_upgrade doc patch to address this.
LGTM, thanks!
cheers ./daniel
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ALTER SYSTEM between upgrades
2020-08-25 18:59 Re: ALTER SYSTEM between upgrades Bruce Momjian <bruce@momjian.us>
2020-08-25 22:22 ` Re: ALTER SYSTEM between upgrades Daniel Gustafsson <daniel@yesql.se>
@ 2020-08-31 21:36 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Momjian @ 2020-08-31 21:36 UTC (permalink / raw)
To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; pgsql-docs
On Wed, Aug 26, 2020 at 12:22:25AM +0200, Daniel Gustafsson wrote:
> >> One can argue whether those bulletpoints are sufficient for stressing the
> >> importance, but it's at least mentioned. There is however no mention of
> >> postgresql.auto.conf which clearly isn't helping anyone, so we should fix that.
> >>
> >> Taking that a step further, maybe we should mention additional config files
> >> which could be included via include directives? There are tools out there who
> >> avoid changing the users postgresql.conf by injecting an include directive
> >> instead; they might've placed the included file alongside postgresql.conf.
> >
> > I have developed the attached pg_upgrade doc patch to address this.
>
> LGTM, thanks!
Patch applied,
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-08-31 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 18:59 Re: ALTER SYSTEM between upgrades Bruce Momjian <bruce@momjian.us>
2020-08-25 22:22 ` Daniel Gustafsson <daniel@yesql.se>
2020-08-31 21:36 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox