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

From David Rowley
Subject Incorrect Assert in BufFileSize()?
Date
Msg-id CAApHDvofgZT0VzydhyGH5MMb-XZzNDqqAbzf1eBZV5HDm3+osQ@mail.gmail.com
Whole thread Raw
Responses Re: Incorrect Assert in BufFileSize()?
List pgsql-hackers
I'm trying to figure out why BufFileSize() Asserts that file->fileset
isn't NULL, per 1a990b207.

The discussion for that commit is in [1], but I don't see any
explanation of the Assert in the discussion or commit message and
there's no comment explaining why it's there.

The code that comes after the Assert does not look at the fileset
field.  With the code as it is, it doesn't seem possible to get the
file size of a non-shared BufFile and I don't see any reason for that.

Should the Assert be checking file->files != NULL?

David

[1] https://postgr.es/m/CAH2-Wzn0ZNLZs3DhCYdLMv4xn1fnM8ugVHPvWz67dSUh1s_%3D2Q%40mail.gmail.com



pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: cataloguing NOT NULL constraints
Next
From: Kashif Zeeshan
Date:
Subject: Re: Document NULL