Re: [HACKERS] Add checksums without --initdb

2015-07-06 Thread David Christensen
> On Jul 2, 2015, at 3:43 PM, Heikki Linnakangas wrote: > > On 07/02/2015 11:28 PM, Andres Freund wrote: >> On 2015-07-02 22:53:40 +0300, Heikki Linnakangas wrote: >>> Add a "enabling-checksums" mode to the server where it calculates checksums >>> for anything it writes, but doesn't check or com

Re: [HACKERS] Add checksums without --initdb

2015-07-02 Thread Andres Freund
On 2015-07-02 23:43:17 +0300, Heikki Linnakangas wrote: > >You'd need, afaics, a bgworker that connects to every database to read > >pg_class, to figure out what type of page a relfilenode has. And this > >probably should call back into the relevant AM or such. > > Nah, we already assume that ever

Re: [HACKERS] Add checksums without --initdb

2015-07-02 Thread Heikki Linnakangas
On 07/02/2015 11:28 PM, Andres Freund wrote: On 2015-07-02 22:53:40 +0300, Heikki Linnakangas wrote: Add a "enabling-checksums" mode to the server where it calculates checksums for anything it writes, but doesn't check or complain about incorrect checksums on reads. Put the server into that mode

Re: [HACKERS] Add checksums without --initdb

2015-07-02 Thread Andres Freund
On 2015-07-02 22:53:40 +0300, Heikki Linnakangas wrote: > On 07/02/2015 10:39 PM, David Christensen wrote: > >Possible concerns here are whether checksums are included in WAL > >full_page_writes or if they are independently calculated; if the > >latter I think we’d be fine. If checksums are all ha

Re: [HACKERS] Add checksums without --initdb

2015-07-02 Thread Heikki Linnakangas
On 07/02/2015 10:39 PM, David Christensen wrote: Possible concerns here are whether checksums are included in WAL full_page_writes or if they are independently calculated; if the latter I think we’d be fine. If checksums are all handled at the layer below WAL than any streamed/processed changes

Re: [HACKERS] Add checksums without --initdb

2015-07-02 Thread Josh Berkus
On 07/02/2015 12:39 PM, David Christensen wrote: > So on #postgresql, I was musing about methods of getting checksums > enabled/disabled without requiring a separate initdb step and minimizing the > downtime required to get such functionality enabled. Funny, I was thinking just yesterday about h

[HACKERS] Add checksums without --initdb

2015-07-02 Thread David Christensen
So on #postgresql, I was musing about methods of getting checksums enabled/disabled without requiring a separate initdb step and minimizing the downtime required to get such functionality enabled. What about adapting pg_basebackup to add the following options: -k|--checksums - build the replica