pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove incorrect Asserts in buffile.c
Date: Wed, 03 Jul 2024 21:45:08 +0000
Message-ID: <E1sP7mk-000Cnk-T1@gemulon.postgresql.org> (raw)

Remove incorrect Asserts in buffile.c

Both BufFileSize() and BufFileAppend() contained Asserts to ensure the
given BufFile(s) had a valid fileset.  A valid fileset isn't required in
either of these functions, so remove the Asserts and adjust the
comments accordingly.

This was noticed while work was being done on a new patch to call
BufFileSize() on a BufFile without a valid fileset.  It seems there's
currently no code in the tree which could trigger these Asserts, so no
need to backpatch this, for now.

Reviewed-by: Peter Geoghegan, Matthias van de Meent, Tom Lane
Discussion: https://postgr.es/m/CAApHDvofgZT0VzydhyGH5MMb-XZzNDqqAbzf1eBZV5HDm3%2BosQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4331a11c62eca7426ad4472be051fe512a04fc80

Modified Files
--------------
src/backend/storage/file/buffile.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)



Message-ID: <E1sP7mk-000Cnk-T1@gemulon.postgresql.org>
Permalink:  ../E1sP7mk-000Cnk-T1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sP7mk-000Cnk-T1@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove incorrect Asserts in buffile.c
  In-Reply-To: <E1sP7mk-000Cnk-T1@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox