Re: Print physical file path when checksum check fails

2020-03-19 Thread Hubert Zhang
I have updated the patch based on the previous comments. Sorry for the late patch. I removed `SetZeroDamagedPageInChecksum` and add `zeroDamagePage` flag in smgrread to determine whether we should zero damage page when an error happens. It depends on the caller. `GetRelationFilePath` is removed a

Re: Print physical file path when checksum check fails

2020-02-19 Thread Hubert Zhang
Thanks Kyotaro, On Wed, Feb 19, 2020 at 2:02 PM Kyotaro Horiguchi wrote: > At Wed, 19 Feb 2020 13:28:04 +0900, Michael Paquier > wrote in > > On Wed, Feb 19, 2020 at 01:07:36PM +0900, Kyotaro Horiguchi wrote: > > > If we also verify checksum in md layer, callback is overkill since the > > > imm

Re: Print physical file path when checksum check fails

2020-02-19 Thread Hubert Zhang
Thanks, On Thu, Feb 20, 2020 at 11:36 AM Andres Freund wrote: > Hi, > > On 2020-02-19 16:48:45 +0900, Michael Paquier wrote: > > On Wed, Feb 19, 2020 at 03:00:54PM +0900, Kyotaro Horiguchi wrote: > > > I have had support requests related to broken block several times, and > > > (I think) most of

Re: Print physical file path when checksum check fails

2020-02-19 Thread Andres Freund
Hi, On 2020-02-19 16:48:45 +0900, Michael Paquier wrote: > On Wed, Feb 19, 2020 at 03:00:54PM +0900, Kyotaro Horiguchi wrote: > > I have had support requests related to broken block several times, and > > (I think) most of *them* had hard time to locate the broken block or > > even broken file. I

Re: Print physical file path when checksum check fails

2020-02-18 Thread Michael Paquier
On Wed, Feb 19, 2020 at 03:00:54PM +0900, Kyotaro Horiguchi wrote: > I have had support requests related to broken block several times, and > (I think) most of *them* had hard time to locate the broken block or > even broken file. I don't think it is useles at all, but I'm not sure > it is worth t

Re: Print physical file path when checksum check fails

2020-02-18 Thread Kyotaro Horiguchi
At Wed, 19 Feb 2020 13:28:04 +0900, Michael Paquier wrote in > On Wed, Feb 19, 2020 at 01:07:36PM +0900, Kyotaro Horiguchi wrote: > > If we also verify checksum in md layer, callback is overkill since the > > immediate caller consumes the event immediately. We can signal the > > error by someho

Re: Print physical file path when checksum check fails

2020-02-18 Thread Michael Paquier
On Wed, Feb 19, 2020 at 01:07:36PM +0900, Kyotaro Horiguchi wrote: > If we also verify checksum in md layer, callback is overkill since the > immediate caller consumes the event immediately. We can signal the > error by somehow returning a file tag. FWIW, I am wondering if there is any need for a

Re: Print physical file path when checksum check fails

2020-02-18 Thread Kyotaro Horiguchi
Hello. Thank you for the new patch. At Tue, 18 Feb 2020 09:27:39 +0800, Hubert Zhang wrote in > On Wed, Feb 12, 2020 at 5:22 PM Hubert Zhang wrote: > > > Thanks Andres, > > > > On Tue, Feb 11, 2020 at 5:30 AM Andres Freund wrote: > > > >> HHi, > >> > >> On 2020-02-10 16:04:21 +0800, Hubert Zh

Re: Print physical file path when checksum check fails

2020-02-17 Thread Hubert Zhang
On Wed, Feb 12, 2020 at 5:22 PM Hubert Zhang wrote: > Thanks Andres, > > On Tue, Feb 11, 2020 at 5:30 AM Andres Freund wrote: > >> HHi, >> >> On 2020-02-10 16:04:21 +0800, Hubert Zhang wrote: >> > Currently we only print block number and relation path when checksum >> check >> > fails. See examp

Re: Print physical file path when checksum check fails

2020-02-12 Thread Hubert Zhang
Thanks Andres, On Tue, Feb 11, 2020 at 5:30 AM Andres Freund wrote: > HHi, > > On 2020-02-10 16:04:21 +0800, Hubert Zhang wrote: > > Currently we only print block number and relation path when checksum > check > > fails. See example below: > > > > ERROR: invalid page in block 333571 of relation

Re: Print physical file path when checksum check fails

2020-02-10 Thread Andres Freund
HHi, On 2020-02-10 16:04:21 +0800, Hubert Zhang wrote: > Currently we only print block number and relation path when checksum check > fails. See example below: > > ERROR: invalid page in block 333571 of relation base/65959/656195 > DBA complains that she needs additional work to calculate which

Print physical file path when checksum check fails

2020-02-10 Thread Hubert Zhang
Hi hacker, Currently we only print block number and relation path when checksum check fails. See example below: ERROR: invalid page in block 333571 of relation base/65959/656195 DBA complains that she needs additional work to calculate which physical file is broken, since one physical file can o