Re: FileFallocate misbehaving on XFS

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Harris <harmic(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FileFallocate misbehaving on XFS
Date: 2024-12-16 17:52:13
Message-ID: coyrqea4ty53rknmxn4jjmok6f7vrvvia6s4stt6ys5l6fch4s@6tnxdtybqia3
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-12-16 17:52:46 Re: Regression tests fail on OpenBSD due to low semmns value
Previous Message Tomas Vondra 2024-12-16 17:51:49 Re: Improved psql tab completion for joins