From: | James Coleman <jtc331(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | [DOC] Document auto vacuum interruption |
Date: | 2019-07-25 20:14:48 |
Message-ID: | CAAaqYe-XYyNwML1=f=gnd0qWg46PnvD=BDrCZ5-L94B887XVxQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
We've discussed this internally many times, but today finally decided
to write up a doc patch.
Autovacuum holds a SHARE UPDATE EXCLUSIVE lock, but other processes
can cancel autovacuum if blocked by that lock unless the autovacuum is
to prevent wraparound.This can result in very surprising behavior:
imagine a system that needs to run ANALYZE manually before batch jobs
to ensure reasonable query plans. That ANALYZE will interrupt attempts
to run autovacuum, and pretty soon the table is far more bloated than
expected, and query plans (ironically) degrade further.
Attached is a patch to document that behavior (as opposed to just in
the code at src/backend/storage/lmgr/proc.c:1320-1321).
James Coleman
Attachment | Content-Type | Size |
---|---|---|
autovacuum-interruption-v1.patch | application/octet-stream | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Migowski | 2019-07-25 20:21:06 | Question about MemoryContexts / possible memory leak in CachedPlanSource usage |
Previous Message | Bruce Momjian | 2019-07-25 20:03:43 | Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS) |