pgsql: Use DELETE instead of UPDATE to speed up vacuum test

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use DELETE instead of UPDATE to speed up vacuum test
Date: 2024-07-29 19:46:53
Message-ID: E1sYWKb-001mzR-Cw@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use DELETE instead of UPDATE to speed up vacuum test

01e2b7f0fd02a44e introduced a test which generated dead tuples for
vacuum with an UPDATE. The test only required enough dead TIDs for two
rounds of index vacuuming. This can be accomplished with a DELETE
instead of an UPDATE -- which generates about 50% less WAL and makes the
test 20% faster in many cases. The test takes several seconds (more on
slow buildfarm animals) because we need quite a few tuples to trigger
two rounds of index vacuuming; so it is worth a follow-on commit to
speed it up.

Suggested-by: Masahiko Sawada
Discussion: https://postgr.es/m/CAAKRu_bWmMjmqL%2BOZ2duEQ80u7cRvpsExLNZNjzk-pXX5skwMQ%40mail.gmail.com
Backpatch-through: 14, the first version containing this test.

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/571e0ee40ebdaf0c75b11756620c9c9d453cc644

Modified Files
--------------
src/test/recovery/t/043_vacuum_horizon_floor.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2024-07-29 22:18:32 pgsql: Do not return NULL from pg_newlocale_from_collation().
Previous Message Heikki Linnakangas 2024-07-29 19:43:13 pgsql: Detach syslogger from shared memory