From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Incorrect Assert in BufFileSize()? |
Date: | 2024-05-17 07:19:20 |
Message-ID: | CAApHDvo7Kfe7Swx9M2PH5P21AaN65EuP+3oG5E9tX0bkM912xg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 16 May 2024 at 07:20, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>
> 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.
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'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.
I should have explained, I just wasn't quite done with what I was
working on when I sent the original email. In [1] I was working on
adding additional output in EXPLAIN for the "Material" node to show
the memory or disk space used by the tuplestore. The use case there
uses a BufFile with no fileset. Calling BufFileSize(state->myfile)
from tuplestore.c results in an Assert failure.
David
From | Date | Subject | |
---|---|---|---|
Next Message | Yasir | 2024-05-17 07:19:29 | Re: commitfest.postgresql.org is no longer fit for purpose |
Previous Message | Heikki Linnakangas | 2024-05-17 07:03:51 | Re: commitfest.postgresql.org is no longer fit for purpose |