From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: PG17 optimizations to vacuum |
Date: | 2024-09-02 20:58:25 |
Message-ID: | 7760d3e3-15cc-4abf-ab33-027008c17d53@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 02/09/2024 23:35, Pavel Luzanov wrote:
> On 02.09.2024 22:23, Melanie Plageman wrote:
>> For some reason I stopped being able to reproduce Pavel's case.
I also cannot reproduce this.
> I repeated the test on another computer, but compared master with v15.
> The results are the same. The test can be simplified as follows:
>
> CREATE TABLE t(id integer) WITH (autovacuum_enabled = off);
> INSERT INTO t SELECT gen.id FROM generate_series(1,3_500_000) gen(id);
> CREATE INDEX t_id ON t(id);
> VACUUM FREEZE t;
> UPDATE t SET id = id + 1;
> VACUUM FREEZE VERBOSE t;
>
> My results (only line with WAL info from the last VACUUM command).
>
> master:
> WAL usage: 119583 records, 37231 full page images, 272631468 bytes
>
> v15:
> WAL usage: 96565 records, 47647 full page images, 217144602 bytes
Can you dump the stats with pg_waldump please. Something like:
CREATE TABLE t(id integer) WITH (autovacuum_enabled = off);
INSERT INTO t SELECT gen.id FROM generate_series(1,3_500_000) gen(id);
CREATE INDEX t_id ON t(id);
SET maintenance_work_mem = '1MB';
UPDATE t SET id = id + 1;
select pg_current_wal_insert_lsn(); -- <<< PRINT WAL POS BEFORE VACUUM
VACUUM FREEZE VERBOSE t;
And then:
pg_waldump -p data/pg_wal/ -s 1/F4474498 --stats=record
where "1/F4474498" is the position printed by the "SELECT
pg_current_wal_insert_lsn()" above.
Do you have any non-default settings? "select name,
current_setting(name), source from pg_settings where setting <>
boot_val;" would show that.
--
Heikki Linnakangas
Neon (https://neon.tech)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2024-09-02 20:58:49 | Re: PG17 optimizations to vacuum |
Previous Message | Pavel Luzanov | 2024-09-02 20:35:04 | Re: PG17 optimizations to vacuum |