Re: Incorrect Assert in BufFileSize()?

2024-07-03 Thread David Rowley
On Thu, 4 Jul 2024 at 04:19, Tom Lane wrote: > - * Return the current fileset based BufFile size. > + * Returns the size if the given BufFile in bytes. > > "Returns the size of", no doubt? Yes, thanks. > A shade less nit-pickily, I wonder if "size" is sufficient. > It's not really obvious that t

Re: Incorrect Assert in BufFileSize()?

2024-07-03 Thread Tom Lane
David Rowley writes: > 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. - * Return the current fileset based BufFile size. + * Returns the size if

Re: Incorrect Assert in BufFileSize()?

2024-07-03 Thread Matthias van de Meent
On Wed, 3 Jul 2024 at 08:06, David Rowley wrote: > > On Fri, 17 May 2024 at 19:19, David Rowley wrote: > > > > On Thu, 16 May 2024 at 07:20, Peter Geoghegan wrote: > > > Notice that comments above BufFileSize() say "Return the current > > > fileset based BufFile size". There are numerous identic

Re: Incorrect Assert in BufFileSize()?

2024-07-02 Thread David Rowley
On Fri, 17 May 2024 at 19:19, David Rowley wrote: > > On Thu, 16 May 2024 at 07:20, Peter Geoghegan 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 with

Re: Incorrect Assert in BufFileSize()?

2024-05-17 Thread David Rowley
On Thu, 16 May 2024 at 07:20, Peter Geoghegan wrote: > > On Tue, May 14, 2024 at 6:58 AM David Rowley wrote: > > On Fri, 3 May 2024 at 16:03, David Rowley wrote: > > > I'm trying to figure out why BufFileSize() Asserts that file->fileset > > > isn't NULL, per 1a990b207. > > > > I was hoping to g

Re: Incorrect Assert in BufFileSize()?

2024-05-15 Thread Peter Geoghegan
On Tue, May 14, 2024 at 6:58 AM David Rowley wrote: > On Fri, 3 May 2024 at 16:03, David Rowley 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

Re: Incorrect Assert in BufFileSize()?

2024-05-14 Thread David Rowley
On Fri, 3 May 2024 at 16:03, David Rowley 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. Here's a patch to remove the Assert(). Changing it to Assert(file->files != NULL); doesn't do anything us

Incorrect Assert in BufFileSize()?

2024-05-02 Thread David Rowley
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