pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Michael Paquier <michael@paquier.xyz>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: rootcause000@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18146: Rows reappearing in Tables after Auto-Vacuum Failure in PostgreSQL on Windows
Date: Tue, 24 Dec 2024 14:50:57 +0900
Message-ID: <Z2pLwQGNaKq2_JTk@paquier.xyz> (raw )
In-Reply-To: <CA+hUKGJ4jqhJVTnwiMFbmVonSMn+E9MW3YDZ+JEz9ov_h19RNA@mail.gmail.com >
References: <Zt6h7y308oXttagv@paquier.xyz >
<CA+hUKGKvb3Dxs1NrfW4_cDZ7LMw4inSMqET5wceswnetWUZVqA@mail.gmail.com >
<CA+hUKGK+tzjU-vqLr_zA8REzPUyiKNmpxk32Jw5AFR0DZNaXfg@mail.gmail.com >
<ZyCTXqPG_uGvLJtZ@paquier.xyz >
<CA+TgmobP2AEjS5qzfEVGugfQw1H+7DF283udewzTDPO3-2G-Kg@mail.gmail.com >
<CA+hUKGJSOEZWx9zRFFfOfDj9zbVmMbWKRq+ZzMCXftHcO1UYQQ@mail.gmail.com >
<CA+TgmoZj9dJhHQokHioXB8dyDZz5gjzyg7SbUrG=At-uShq7yA@mail.gmail.com >
<Z2TcN-ypscC4Jomj@paquier.xyz >
<CA+hUKG+Thae6x6+jmQiuALQBT2Ae1ChjMh1=kMvJ8y_SBJZrvA@mail.gmail.com >
<CA+hUKGJ4jqhJVTnwiMFbmVonSMn+E9MW3YDZ+JEz9ov_h19RNA@mail.gmail.com >
On Sat, Dec 21, 2024 at 12:15:56PM +1300, Thomas Munro wrote:
> Here. Better/tidier ideas welcome.
Indeed, the state of back-branches is incorrect this way. I don't
know of any out-of-core callers of smgrtruncate(), but well, the world
is a wide place.
extern void smgrtruncate(SMgrRelation reln, ForkNumber *forknum, int nforks,
- BlockNumber *old_nblocks,
BlockNumber *nblocks);
+extern void smgrtruncate2(SMgrRelation reln, ForkNumber *forknum, int nforks,
+ BlockNumber *old_nblocks,
+ BlockNumber *nblocks);
Please don't rely on my naming sense, still I'm OK with what you are
using here.
Some inconsistent notes in the code with smgrtruncate2() in place:
src/backend/access/heap/visibilitymap.c:
* otherwise the caller is responsible for calling smgrtruncate()
src/backend/catalog/storage.c:
* Second, the call to smgrtruncate() below will in turn call
src/backend/access/heap/vacuumlazy.c:
* processed the smgr invalidation that smgrtruncate sent out ... but
That's not really critical, so leaving them as they are is equally OK
for me. Looks good to me, otherwise.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
view thread (45+ messages) latest in thread
Message-ID: <Z2pLwQGNaKq2_JTk@paquier.xyz>
Permalink: ../Z2pLwQGNaKq2_JTk@paquier.xyz/
Also on: postgresql.org/message-id/Z2pLwQGNaKq2_JTk@paquier.xyz
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-bugs@postgresql.org
Cc: michael@paquier.xyz, thomas.munro@gmail.com, robertmhaas@gmail.com, hlinnaka@iki.fi, exclusion@gmail.com, tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, rootcause000@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18146: Rows reappearing in Tables after Auto-Vacuum Failure in PostgreSQL on Windows
In-Reply-To: <Z2pLwQGNaKq2_JTk@paquier.xyz>
* 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