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