Re: pg_rewind and postgresql.conf

2018-05-04 Thread Tatsuo Ishii
> I totally agree. Ideally, rewind would just rewind data dirs by default > and provide an option to include other files as specified by the > administrator. Something like "--copy-including-files=file1,file2,..."? However I would like to also have "--copy-excluding-files=". The latter would be

Re: pg_rewind and postgresql.conf

2018-05-04 Thread Tatsuo Ishii
> 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. To make ALTER SYSTEM works, the server needs to start up in the first place. But

Re: pg_rewind and postgresql.conf

2018-05-04 Thread Michael Paquier
On Fri, May 04, 2018 at 02:05:25PM +0200, Chris Travers wrote: > I totally agree. Ideally, rewind would just rewind data dirs by default > and provide an option to include other files as specified by the > administrator. That's actually a potential please-shoot-both-my-feet option. Imagine if

Re: pg_rewind and postgresql.conf

2018-05-04 Thread Christoph Moench-Tegeder
## Tatsuo Ishii (is...@sraoss.co.jp): > Currently pg_rewind copies all files including postgresql.conf. It > would be nice if pg_rewind has an option to not copy > postgresql.conf. How about including a file outside the data directory with "local" settings? Like "include

Re: pg_rewind and postgresql.conf

2018-05-04 Thread Chris Travers
On Fri, May 4, 2018 at 2:06 PM, Isaac Morland 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

Re: pg_rewind and postgresql.conf

2018-05-04 Thread Isaac Morland
Would it work to use ALTER SYSTEM (postgresql.auto.conf)? Or is that copied by pg_rewind also? 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

Re: pg_rewind and postgresql.conf

2018-05-04 Thread Chris Travers
On Fri, May 4, 2018 at 12:59 PM, Tatsuo Ishii 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

pg_rewind and postgresql.conf

2018-05-04 Thread Tatsuo Ishii
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