Re: Gotchas about pg_verify_checksums

2018-04-17 Thread Michael Paquier
On Tue, Apr 17, 2018 at 09:43:47PM +0200, Michael Banck wrote: > So I decided to add some support for earlier version in my version of > the program, and pushed it to https://github.com/credativ/pg_checksums > if anybody is interested in that. I have to admit that it is quite less > fancy than your

Re: Gotchas about pg_verify_checksums

2018-04-17 Thread Michael Banck
Hi Michael, On Mon, Apr 16, 2018 at 11:30:30AM +0900, Michael Paquier wrote: > On Thu, Apr 12, 2018 at 05:47:29AM +0900, Michael Paquier wrote: > > On Wed, Apr 11, 2018 at 10:21:29PM +0200, Daniel Gustafsson wrote: > >> Naming it pg_checksums, with only verification as an option, seems to me to >

Re: Gotchas about pg_verify_checksums

2018-04-15 Thread Michael Paquier
On Sun, Apr 15, 2018 at 01:54:13PM +0200, Magnus Hagander wrote: > I have applied this patch along with the documentation patch from Michael. Thanks, I saw the commits. That's fine by me. -- Michael signature.asc Description: PGP signature

Re: Gotchas about pg_verify_checksums

2018-04-15 Thread Michael Paquier
On Thu, Apr 12, 2018 at 05:47:29AM +0900, Michael Paquier wrote: > On Wed, Apr 11, 2018 at 10:21:29PM +0200, Daniel Gustafsson wrote: >> Naming it pg_checksums, with only verification as an option, seems to me to >> imply future direction for 12 more than what pg_verify_checksums does. I >> would

Re: Gotchas about pg_verify_checksums

2018-04-15 Thread Magnus Hagander
On Sun, Apr 15, 2018 at 9:49 AM, Daniel Gustafsson wrote: > > On 15 Apr 2018, at 09:36, Michael Paquier wrote: > > > > On Tue, Apr 10, 2018 at 10:27:19PM +0200, Daniel Gustafsson wrote: > >> Thinking more on this, I don’t think the -f option should be in the > tool until > >> we have the ability

Re: Gotchas about pg_verify_checksums

2018-04-15 Thread Daniel Gustafsson
> On 15 Apr 2018, at 09:36, Michael Paquier wrote: > > On Tue, Apr 10, 2018 at 10:27:19PM +0200, Daniel Gustafsson wrote: >> Thinking more on this, I don’t think the -f option should be in the tool >> until >> we have the ability to turn on/off checksums. Since checksums are always on, >> or al

Re: Gotchas about pg_verify_checksums

2018-04-15 Thread Michael Paquier
On Tue, Apr 10, 2018 at 10:27:19PM +0200, Daniel Gustafsson wrote: > Thinking more on this, I don’t think the -f option should be in the tool until > we have the ability to turn on/off checksums. Since checksums are always on, > or always off, -f is at best confusing IMO. The attached patch remov

Re: Gotchas about pg_verify_checksums

2018-04-11 Thread Michael Paquier
On Wed, Apr 11, 2018 at 10:21:29PM +0200, Daniel Gustafsson wrote: > Right, I misunderstood your initial email but I see what you mean. Yes, you > are right and with that +1 on your patch. OK, no problem. > Naming it pg_checksums, with only verification as an option, seems to me to > imply futur

Re: Gotchas about pg_verify_checksums

2018-04-11 Thread Daniel Gustafsson
> On 11 Apr 2018, at 01:53, Michael Paquier wrote: > > On Tue, Apr 10, 2018 at 10:27:19PM +0200, Daniel Gustafsson wrote: >>> On 10 Apr 2018, at 06:21, Michael Paquier wrote: >> Does it really imply that? Either way, the tool could potentially be useful >> for debugging a broken cluster so I’m

Re: Gotchas about pg_verify_checksums

2018-04-10 Thread Peter Geoghegan
On Tue, Apr 10, 2018 at 4:44 PM, Michael Paquier wrote: > Peter, the code does the right thing as it requires the instance's > control file state to be either DB_SHUTDOWNED_IN_RECOVERY or > DB_SHUTDOWNED. The documentation, on the contrary, implies that > the instance just needs to be offline, wh

Re: Gotchas about pg_verify_checksums

2018-04-10 Thread Michael Paquier
On Tue, Apr 10, 2018 at 10:27:19PM +0200, Daniel Gustafsson wrote: >> On 10 Apr 2018, at 06:21, Michael Paquier wrote: > Does it really imply that? Either way, the tool could potentially be useful > for debugging a broken cluster so I’m not sure that stating it requires a > cleanly shut down serv

Re: Gotchas about pg_verify_checksums

2018-04-10 Thread Michael Paquier
On Tue, Apr 10, 2018 at 02:40:58PM -0700, Peter Geoghegan wrote: > I agree with Michael -- shutting down the server using immediate mode > could lead to torn pages, that crash recovery will need to repair at a > later stage. I think that some strong caveats around this are required > in the pg_veri

Re: Gotchas about pg_verify_checksums

2018-04-10 Thread Peter Geoghegan
On Tue, Apr 10, 2018 at 1:27 PM, Daniel Gustafsson wrote: >> On 10 Apr 2018, at 06:21, Michael Paquier wrote: >> 1) The documentation states that the cluster needs to be offline. >> Doesn't this imply that the cluster can also be forcibly killed? It >> seems to me that the documentation ought to

Re: Gotchas about pg_verify_checksums

2018-04-10 Thread Daniel Gustafsson
> On 10 Apr 2018, at 06:21, Michael Paquier wrote: > 1) The documentation states that the cluster needs to be offline. > Doesn't this imply that the cluster can also be forcibly killed? It > seems to me that the documentation ought to say that the cluster needs > to be shut down cleanly instead.