Re: BufFileRead() error signalling
Ibrar Ahmed <ibrar.ahmad@gmail.com>
From: Ibrar Ahmed <ibrar.ahmad@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Thomas Munro <thomas.munro@gmail.com>
Date: 2019-12-10T13:06:19Z
Lists: pgsql-hackers
You are checking file->dirty twice, first before calling the function and within the function too. Same for the Assert. For example.
size_t
BufFileRead(BufFile *file, void *ptr, size_t size)
{
size_t nread = 0;
size_t nthistime;
if (file->dirty)
{
BufFileFlush(file);
Assert(!file->dirty);
}
static void
BufFileFlush(BufFile *file)
{
if (file->dirty)
BufFileDumpBuffer(file);
Assert(!file->dirty);
The new status of this patch is: Waiting on Author
Commits
-
Make BufFileWrite() void.
- f5d18862bbb3 14.0 landed
-
Fix buffile.c error handling.
- 89020a92fb62 9.5.23 landed
- 02b71f06be75 9.6.19 landed
- 95647a1c7d29 10.14 landed
- 9c14d6024365 11.9 landed
- 28ee12669944 12.4 landed
- 3e0b08c404b2 13.0 landed
- 7897e3bb902c 14.0 landed
-
Adjust WAL code so that checkpoints truncate the xlog at the previous
- 1173344e74f7 7.2.1 cited