From: Jim Nasby <jim.nasby@openscg.com>
To: Greg Clough <greg.clough@ipreo.com>
To: Euler Taveira <euler@timbira.com.br>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15067: Documentation or behaviour bug with autovacuum thresholds?
Date: Sat, 3 Mar 2018 13:40:24 -0600
Message-ID: <fef7ed62-fe27-0b83-1857-27e09e9c44c8@openscg.com> (raw)
In-Reply-To: <MWHPR03MB31332A4E081B486BF4334277F7C60@MWHPR03MB3133.namprd03.prod.outlook.com>
References: <151861949011.1450.18007996621988910831@wrigleys.postgresql.org>
<CAHE3wgiY_RZbNxc+ygZMJqjFf-AS=tbQAabM_8ZwqDaXdcML=A@mail.gmail.com>
<MWHPR03MB31332A4E081B486BF4334277F7C60@MWHPR03MB3133.namprd03.prod.outlook.com>
On 3/1/18 5:13 AM, Greg Clough wrote:
> 1) autovacuum_vacuum_scale_factor = 0
> 2) autovacuum_vacuum_threshold = 500
> 3) Update 500 rows of a 1,000 row table
> 4) Wait 30 seconds
> 5) Update 1 row
> 6) NOTE: "tuples: 1 removed" in the postgres.log, not "tuples: 501 removed".
>
> < 2018-02-14 15:20:08.512 GMT > LOG: automatic vacuum of table "postgres.public.autovacuum_threshold_test": index scans: 0
> pages: 0 removed, 7 remain, 0 skipped due to pins, 0 skipped frozen
> tuples: 1 removed, 1000 remain, 0 are dead but not yet removable
That indicates that the vacuum ran when there were only 1000 rows in the
table, 1 of which had been updated. Obviously that doesn't make sense
given your example, so I'm wondering if you did a single-row update some
time before step 3. Note that after step 3 vacuum should report 1500
tuples, not 1000 (pretty sure that's true regardless of the tuples being
HOT or not).
I suggest posting a complete test script demonstrating the behavior
you're seeing.
--
Jim Nasby, Chief Data Architect, Austin TX
OpenSCG http://OpenSCG.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: jim.nasby@openscg.com, greg.clough@ipreo.com, euler@timbira.com.br
Subject: Re: BUG #15067: Documentation or behaviour bug with autovacuum thresholds?
In-Reply-To: <fef7ed62-fe27-0b83-1857-27e09e9c44c8@openscg.com>
References: <151861949011.1450.18007996621988910831@wrigleys.postgresql.org> <CAHE3wgiY_RZbNxc+ygZMJqjFf-AS=tbQAabM_8ZwqDaXdcML=A@mail.gmail.com> <MWHPR03MB31332A4E081B486BF4334277F7C60@MWHPR03MB3133.namprd03.prod.outlook.com> <fef7ed62-fe27-0b83-1857-27e09e9c44c8@openscg.com>
* 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