From: | "Nasby, Jim" <nasbyj(at)amazon(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Sergei Kornilov <sk(at)zsrv(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru |
Date: | 2018-09-24 18:25:46 |
Message-ID: | 0A11E30F-DDDE-422F-B22A-3F6E3AA7A0A2@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
> On Sep 21, 2018, at 12:43 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
>> But as far i can see it is possible have aggressive non-wraparound vacuum. One important difference - regular and aggressive regular can be canceled by backend,.wraparound autovacuum can not. (by checking PROC_VACUUM_FOR_WRAPAROUND in src/backend/storage/lmgr/proc.c )
>
> Yes, without checking the code, they should be different. Aggressive is
> controlled by vacuum_freeze_table_age whereas anti-wrap is controlled by
> autovacuum_freeze_max_age (but also implies aggressive).
Right, except that by the time you get into the vacuum code itself nothing should really care about that difference. AFAICT, the only thing is_wraparound is being used for is to set MyPgXact->vacuumFlags |= PROC_VACUUM_FOR_WRAPAROUND, which prevents the deadlock detector from killing an autovac process that’s trying to prevent a wraparound. I think it’d be clearer to remove is_wraparound and move the check from vacuum_rel() into lazy_vacuum_rel() (which is where the limits for HeapTupleSatisfiesVacuum get determined). Something like the attached.
Attachment | Content-Type | Size |
---|---|---|
anti_wrap.patch | application/octet-stream | 5.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-09-24 18:29:34 | Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru |
Previous Message | Tom Lane | 2018-09-24 15:31:29 | pgsql: Fix over-allocation of space for array_out()'s result string. |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-09-24 18:29:34 | Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru |
Previous Message | Andres Freund | 2018-09-24 18:25:16 | Re: Query is over 2x slower with jit=on |