Re: BUG #15067: Documentation or behaviour bug with autovacuum thresholds?

From: Jim Nasby <jim(dot)nasby(at)openscg(dot)com>
To: Greg Clough <greg(dot)clough(at)ipreo(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15067: Documentation or behaviour bug with autovacuum thresholds?
Date: 2018-03-03 19:40:24
Message-ID: fef7ed62-fe27-0b83-1857-27e09e9c44c8@openscg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2018-03-03 19:55:41 Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column
Previous Message Tom Lane 2018-03-03 17:33:44 Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identity column