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 m

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 wi

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 on

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 /some/where/else/local.co

Re: pg_rewind and postgresql.conf

2018-05-04 Thread Michael Paquier
On Fri, May 04, 2018 at 02:10:46PM +0200, Chris Travers wrote: > Yes that is copied currently by pg_rewind, as are server logs if they are > in the data directory. Yes, that is valid for all the existing versions of pg_rewind in the core tree, as well as what I maintain for VMware (9.3 and 9.4 ver

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 replication slots also might be copi

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 postgresql.

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 number which postmaste