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

From Peter Geoghegan
Subject Re: Incorrect Assert in BufFileSize()?
Date
Msg-id CAH2-WzksXG0Qz1AW3xRSaJAEo9tfV=ziOi-5_zqXnYjYtJVqwA@mail.gmail.com
Whole thread Raw
In response to Re: Incorrect Assert in BufFileSize()?  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Incorrect Assert in BufFileSize()?
List pgsql-hackers
On Tue, May 14, 2024 at 6:58 AM David Rowley <dgrowleyml@gmail.com> wrote:
> On Fri, 3 May 2024 at 16:03, David Rowley <dgrowleyml@gmail.com> wrote:
> > I'm trying to figure out why BufFileSize() Asserts that file->fileset
> > isn't NULL, per 1a990b207.
>
> I was hoping to get some feedback here.

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.

I'm not sure what it would take for this function to support
OpenTemporaryFile()-based BufFiles -- possibly not very much at all. I
assume that that's what you're actually interested in doing here (you
didn't say). If it is, you'll need to update the function's contract
-- just removing the assertion isn't enough.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: walther@technowledgy.de
Date:
Subject: Re: [PATCH] Add --syntax to postgres for SQL syntax checking
Next
From: Chapman Flack
Date:
Subject: Re: add function argument names to regex* functions.