Re: Incorrect Assert in BufFileSize()? - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Re: Incorrect Assert in BufFileSize()?
Date
Msg-id CAEze2WhCKyX=Rd6N-w7OH5gPDUki4oUcfjVcmXAfb9FXCzHQEQ@mail.gmail.com
Whole thread Raw
In response to Re: Incorrect Assert in BufFileSize()?  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Wed, 3 Jul 2024 at 08:06, David Rowley <dgrowleyml@gmail.com> wrote:
>
> On Fri, 17 May 2024 at 19:19, David Rowley <dgrowleyml@gmail.com> wrote:
> >
> > On Thu, 16 May 2024 at 07:20, Peter Geoghegan <pg@bowt.ie> wrote:
> > > Notice that comments above BufFileSize() say "Return the current
> > > fileset based BufFile size". There are numerous identical assertions
> > > at the start of several other functions within the same file.
> >
> > hmm, unfortunately the comment and existence of numerous other
> > assertions does not answer my question. It just leads to more.  The
> > only Assert I see that looks like it might be useful is
> > BufFileExportFileSet() as fileset is looked at inside extendBufFile().
> > It kinda looks to me that it was left over fragments from the
> > development of a patch when it was written some other way?
> >
> > Looking at the other similar Asserts in BufFileAppend(), I can't
> > figure out what those ones are for either.
>
> I've attached an updated patch which updates the comments and also
> removes the misplaced Asserts from BufFileAppend.
>
> If there are no objections or additional feedback, I'll push this patch soon.

Finding this thread after reviewing [0], this does explain why the
Assert was changed in that patch.

LGTM.


Kind regards,

Matthias van de Meent
Neon (https://neon.tech)

[0] https://www.postgresql.org/message-id/flat/CAApHDvp5Py9g4Rjq7_inL3-MCK1Co2CRt_YWFwTU2zfQix0p4A%40mail.gmail.com



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: What is a typical precision of gettimeofday()?
Next
From:
Date:
Subject: RE: Doc: fix track_io_timing description to mention pg_stat_io