Re: Incorrect Assert in BufFileSize()?

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-07-03 06:05:50
Message-ID: CAApHDvqj5dpGSWhXjiU8CiFEKWPxrwXVL_no4xhd-rSFHjq-rA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 17 May 2024 at 19:19, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> On Thu, 16 May 2024 at 07:20, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> > 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've attached an updated patch which updates the comments and also
removes the misplaced Asserts from BufFileAppend.

If there are no objections or additional feedback, I'll push this patch soon.

David

Attachment Content-Type Size
remove_bogus_Assert_from_BufFileSize_v2.patch application/octet-stream 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-07-03 06:15:53 Re: speed up a logical replica setup
Previous Message Dilip Kumar 2024-07-03 05:59:25 Re: Conflict Detection and Resolution