Re: Incorrect Assert in BufFileSize()?

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Incorrect Assert in BufFileSize()?
Date: 2024-05-15 19:19:39
Message-ID: CAH2-WzksXG0Qz1AW3xRSaJAEo9tfV=ziOi-5_zqXnYjYtJVqwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 14, 2024 at 6:58 AM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> On Fri, 3 May 2024 at 16:03, David Rowley <dgrowleyml(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2024-05-15 19:22:59 Re: add function argument names to regex* functions.
Previous Message walther 2024-05-15 19:18:41 Re: [PATCH] Add --syntax to postgres for SQL syntax checking