Re: autovacuum_freeze_max_age on append-only tables - Mailing list pgsql-general

From Senor
Subject Re: autovacuum_freeze_max_age on append-only tables
Date
Msg-id DM8PR01MB701673B76E3C89B0729D3833F7F79@DM8PR01MB7016.prod.exchangelabs.com
Whole thread Raw
In response to Re: autovacuum_freeze_max_age on append-only tables  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: autovacuum_freeze_max_age on append-only tables  (Peter Geoghegan <pg@bowt.ie>)
Re: autovacuum_freeze_max_age on append-only tables  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Thank you both Laurenz and Peter.

Laurenz - It was an article you posted a couple years ago introducing 
the V13 feature that got me thinking about the insert-only situation I had.

Peter - I had been improperly holding anti-wraparound and aggressive in 
my mind as related in a way they are not. You cleared that up.

2 last questions (maybe):

Are the autovacuum_vacuum_cost_* settings handled any differently for 
'to avoid wraparound' vacuums? I understand that it won't give up a lock 
but I was expecting it to still back off due to cost and allow the query 
with conflicting lock to proceed.

Is there any benefit to manually running a vacuum every so many inserts 
as opposed to using autovacuum_freeze_max_age. And in this case should 
it be a vacuum freeze. Rows are never updated or deleted except for the 
occasional roll back due to dropped network connections.

Thanks again

-Senor


On 4/21/2022 6:35, Laurenz Albe wrote:
> On Wed, 2022-04-20 at 23:06 +0000, senor wrote:
>> I'm apparently needing an education on how this "to avoid wraparound" vacuum differs from
>> any other. I've seen it referenced as "more aggressive" but I'd like details.
> The difference is twofold, as far as I know:
>
> - it will not skip any pages just because it happens not to get a lock on them
> - it will refuse to die if the lock it holds on the table conflicts with a user lock
>
> Unless you are in the habit of taking strong locks on the table, you shouldn't
> notice a difference.  Anti-wraparound VACUUM is a routine activity and does not
> interfere with DML, just like a normal VACUUM.
>
> Yours,
> Laurenz Albe



pgsql-general by date:

Previous
From: Shaozhong SHI
Date:
Subject: Configuration and performance of Postgres/PostGIS
Next
From: Peter Geoghegan
Date:
Subject: Re: autovacuum_freeze_max_age on append-only tables