Re: pg_rewind and postgresql.conf

From: Chris Travers <chris(dot)travers(at)adjust(dot)com>
To: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
Cc: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_rewind and postgresql.conf
Date: 2018-05-04 12:10:46
Message-ID: CAN-RpxD1cRyc7QdYp802uEOCiVSmEOeW9jM9sr5BiS8gYkifHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 4, 2018 at 2:06 PM, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
wrote:

> Would it work to use ALTER SYSTEM (postgresql.auto.conf)? Or is that
> copied by pg_rewind also?
>

Yes that is copied currently by pg_rewind, as are server logs if they are
in the data directory. I think replication slots also might be copied but
would have to check.

>
> Even if so, using the ALTER SYSTEM command after pg_rewind might be an
> easy way of correcting the port back to what you want without doing more
> complicated processing or re-writing the entire postgresql.conf.
>
> On 4 May 2018 at 06:59, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:
>
>> Currently pg_rewind copies all files including postgresql.conf. It
>> would be nice if pg_rewind has an option to not copy
>> postgresql.conf. I sometimes create multiple PostgreSQL database
>> clusters with different port number which postmaster is listening on
>> for a testing purpose. So existing postgresql.conf on the target
>> cluster being overwritten by pg_rewind is annoying. I believe there
>> are some use cases where different port numbers are used among
>> PostgreSQL database clusters in the real world.
>>
>> Comments?
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
>>
>>
>

--
Best Regards,
Chris Travers
Database Administrator

Tel: +49 162 9037 210 | Skype: einhverfr | www.adjust.com
Saarbrücker Straße 37a, 10405 Berlin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2018-05-04 12:30:56 Re: make installcheck-world in a clean environment
Previous Message Isaac Morland 2018-05-04 12:06:47 Re: pg_rewind and postgresql.conf