From: Michael Paquier <michael@paquier.xyz>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Arseny Sher <a.sher@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Flaky vacuum truncate test in reloptions.sql
Date: Thu, 1 Apr 2021 13:28:19 +0900
Message-ID: <YGVL46GoetxG08LF@paquier.xyz> (raw)
In-Reply-To: <CAD21AoAV221s7tuQ6=jLoxhCwZ_8iR6z-CLOwtgr8=77pvxJpA@mail.gmail.com>
References: <87tuotr2hh.fsf@ars-thinkpad>
<YGLOWsO2bV7KLvh7@paquier.xyz>
<78aad736-c653-92fd-45ac-4482729459c6@postgrespro.ru>
<CAD21AoB+qb-sOY2QeTnGirjh-UvFJj8eANVwQ4CV-r+t1AhxDA@mail.gmail.com>
<d5dd7eaf-0ba1-a18b-1ef2-552196f36a71@postgrespro.ru>
<CAD21AoBrNFeBRT-AkVyMybr=bmUbiAcpZPsD61Q_tgvAUqUuHQ@mail.gmail.com>
<87sg4ar9ar.fsf@ars-thinkpad>
<CAD21AoAV221s7tuQ6=jLoxhCwZ_8iR6z-CLOwtgr8=77pvxJpA@mail.gmail.com>
On Thu, Apr 01, 2021 at 12:52:21PM +0900, Masahiko Sawada wrote:
> Just to be clear the context, I’m mentioning the following test case:
(Coming back a couple of emails later, where indeed I forgot about the
business with lazy_check_needs_freeze() that could cause a page to be
skipped even if DISABLE_PAGE_SKIPPING is used.)
> What I meant is that without FREEZE option, there are two possible
> cases where the table is not truncated (i.g.,
> pg_relation_size('reloptions_test') > 0 is true): the page got empty
> by vacuum but is not truncated because of vacuum_truncate = false, and
> the page could not be vacuumed (i.g., tuples remain in the page)
> because the page is skipped due to conflict on cleanup lock on the
> page. This test is intended to test the former case. I guess adding
> FREEZE will prevent the latter case.
What you are writing here makes sense to me. Looking at the test, it
is designed to test vacuum_truncate, aka that the behavior we want to
stress (your former case here) gets stressed all the time, so adding
the options to avoid the latter case all the time is an improvement.
And this, even if the latter case does not actually cause a diff and
it has a small chance to happen in practice.
It would be good to add a comment explaining why the options are
added (aka just don't skip any pages).
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../YGVL46GoetxG08LF@paquier.xyz/2-signature.asc)
download
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: michael@paquier.xyz, sawada.mshk@gmail.com, a.sher@postgrespro.ru, pgsql-hackers@lists.postgresql.org
Subject: Re: Flaky vacuum truncate test in reloptions.sql
In-Reply-To: <YGVL46GoetxG08LF@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