Incorrect Assert in BufFileSize()?
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>,
Peter Geoghegan <pg@bowt.ie>
Date: 2024-05-03T04:03:45Z
Lists: 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
Commits
-
Remove incorrect Asserts in buffile.c
- 4331a11c62ec 18.0 landed