Re: FileFallocate misbehaving on XFS - Mailing list pgsql-hackers

From Andres Freund
Subject Re: FileFallocate misbehaving on XFS
Date
Msg-id coyrqea4ty53rknmxn4jjmok6f7vrvvia6s4stt6ys5l6fch4s@6tnxdtybqia3
Whole thread Raw
In response to Re: FileFallocate misbehaving on XFS  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: FileFallocate misbehaving on XFS
List pgsql-hackers
Hi,

On 2024-12-16 18:05:59 +0100, Alvaro Herrera wrote:
> On 2024-Dec-16, Robert Haas wrote:
> 
> > On Mon, Dec 16, 2024 at 9:12 AM Andres Freund <andres@anarazel.de> wrote:
> > > Personally I don't like the obfuscation of "allocate" and "zero" vs just
> > > naming the function names. But I guess that's just taste thing.
> > >
> > > When looking for problems it's considerably more work with bytes, because - at
> > > least for me - the large number is hard to compare quickly and to know how
> > > aggressively we extended also requires to translate to blocks.
> > 
> > FWIW, I think that what we report in the error should hew as closely
> > to the actual system call as possible. Hence, I agree with your first
> > complaint and would prefer to simply see the system calls named, but I
> > disagree with your second complaint and would prefer to see the byte
> > count.
> 
> Maybe we can add errdetail("The system call was FileFallocate( ... %u ...)")
> with the number of bytes, and leave the errmsg() mentioning the general
> operation being done (allocate, zero, etc) with the number of blocks.

I don't see what we gain by requiring guesswork (what does allocating vs
zeroing mean, zeroing also allocates disk space after all) to interpret the
main error message. My experience is that it's often harder to get the DETAIL
than the actual error message (grepping becomes harder due to separate line,
terse verbosity is commonly used).

I think we're going too far towards not mentioning the actual problems in too
many error messages in general.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Improved psql tab completion for joins
Next
From: Tom Lane
Date:
Subject: Re: Regression tests fail on OpenBSD due to low semmns value