pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Melanie Plageman <melanieplageman@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Andres Freund <andres@anarazel.de>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Subject: Re: Why clearing the VM doesn't require registering vm buffer in wal record
Date: Sun, 19 Jul 2026 22:34:29 -0400
Message-ID: <1065814.1784514869@sss.pgh.pa.us> (raw )
In-Reply-To: <CAAKRu_Y9DZ7=AXpUfX+ESgavoHFbS8if_2gmp-B6tP6vJxzXWA@mail.gmail.com >
References: <CAAKRu_bn+e7F4yPFBgFbnP+syJRKyNK092bjD2LKvZW7O4Svag@mail.gmail.com >
<CAEze2Wh7f1zA7xQ8tR4pfuSUj6SuuVOcN5_+PkZP-69f+u-wFQ@mail.gmail.com >
<jfdhsjwcpfk5qbhm2ieopedrmiihdboux3gerzusaeosopxxpq@vsghqvzto7wj >
<oqcsevg35xjan2327x5kdfth6q4fgeqboxfo3v3imeyih2uiny@6sez5dzxl6nt >
<CAAKRu_YAvPWTuEotqN_yHnM0To3igVK_eWh_mRn12odr_20azg@mail.gmail.com >
<66mqpfyti3qhfttcsv6r2lbvqqd32rrmpn6i47ovrsnvguts46@gou54xc5jld3 >
<CAAKRu_Z_KAAZAHtuorifR2MRc_MkEcHf-C_t4b9HZaHpa3nriw@mail.gmail.com >
<CAAKRu_ZvUY2gLTOO9eOPHdoKoBE0JEm6+vUeasXZRb25V7D1vw@mail.gmail.com >
<CA+TgmoY5iW3D6e6ELuZkyORWUm+C6yvJSPG+HzJhVs3j+KPZvw@mail.gmail.com >
<EF2A8B6A-CAA8-4D31-8E6A-683B35DA189C@yandex-team.ru >
<CA+TgmoaUJWiNHS=nvbU6eLsXdi8beDzPMT4t4a716UBfOfrfUQ@mail.gmail.com >
<CAAKRu_ZQVzDGfEmfbe_V1voy5yDwjs8BQEC_wsWEfCzzya2P1g@mail.gmail.com >
<CAAKRu_ZMzhYdADNjpTzJaQbvH4cYr22-wSzuS=atMVtD_+W6yA@mail.gmail.com >
<CAAKRu_aRdQ6RjneKeQh9+RVMFgMrtjTYFX=zDgBdSiQ8JDs6Jg@mail.gmail.com >
<CAHGQGwF_PzOv5y7ucFh7Fqqqa8ar83zYw! vWugqarRD6+7GCtEQ@mail.gmail.com >
<CAAKRu_YmzD3JODw4ZHfvK+R+_12A5sDX8eM=n=4ej1phm+902g@mail.gmail.com >
<CAAKRu_Y9DZ7=AXpUfX+ESgavoHFbS8if_2gmp-B6tP6vJxzXWA@mail.gmail.com >
Melanie Plageman <melanieplageman@gmail.com> writes:
> I've committed this.
Coverity complained about this patch:
/srv/coverity/git/pgsql-git/postgresql/src/backend/access/heap/pruneheap.c: 951 in heap_page_fix_vm_corruption()
945 MarkBufferDirtyHint(prstate->buffer, true);
946 }
947
948 if (do_clear_vm)
949 {
950 LockBuffer(prstate->vmbuffer, BUFFER_LOCK_EXCLUSIVE);
>>> CID 1697133: Error handling issues (CHECKED_RETURN)
>>> Calling "visibilitymap_clear" without checking return value (as is done elsewhere 13 out of 14 times).
951 visibilitymap_clear(prstate->relation->rd_locator, prstate->block,
952 prstate->vmbuffer,
953 VISIBILITYMAP_VALID_BITS);
954 LockBuffer(prstate->vmbuffer, BUFFER_LOCK_UNLOCK);
955 prstate->old_vmbits = 0;
956 }
I think it's right to complain --- if we check for failure everywhere
else, why's it OK to not check here? If it is OK, a comment and an
explicit cast to "(void)" would be appropriate.
regards, tom lane
view thread (57+ messages) latest in thread
Message-ID: <1065814.1784514869@sss.pgh.pa.us>
Permalink: ../1065814.1784514869@sss.pgh.pa.us/
Also on: postgresql.org/message-id/1065814.1784514869@sss.pgh.pa.us
copy link · copy postgr.es
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, melanieplageman@gmail.com, masao.fujii@gmail.com, robertmhaas@gmail.com, x4mmm@yandex-team.ru, andres@anarazel.de, boekewurm+postgres@gmail.com, pgsql-hackers@lists.postgresql.org, hlinnaka@iki.fi
Subject: Re: Why clearing the VM doesn't require registering vm buffer in wal record
In-Reply-To: <1065814.1784514869@sss.pgh.pa.us>
* 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