Re: Make autovacuum sort tables in descending order of xid_age
От | David Kimura |
---|---|
Тема | Re: Make autovacuum sort tables in descending order of xid_age |
Дата | |
Msg-id | CAHnPFjQ-ewHe9kZ40muZ0OP8Y6YQ=tp9sKZQ5J4VmkfrqzOhFQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Make autovacuum sort tables in descending order of xid_age (Mark Dilger <hornschnorter@gmail.com>) |
Список | pgsql-hackers |
On Tue, Jan 7, 2020 at 12:47 PM David Fetter <david@fetter.org> wrote: > Per a suggestion Christophe made, please find attached a patch to > $Subject: Curious, what's the benefit of autovacuum handling the oldest tables first? If there is a related thread with the discussion, I couldn't find it. > Apart from carefully fudging with pg_resetwal, and short of running in > production for a few weeks, what would be some good ways to test this? Greenplum tests autovacuum using a fault injection framework, which was once proposed by Asim [1] and a function to consume xids [2]. If that isn't an option, maybe you could acquire a vacuum blocking lock on a table, for example by creating index on it inside a dangling transaction. Then after autovacuum worker blocks, in a separate session you could check that a previously older table is now younger. Does that suffice? Thanks, David [1] https://www.postgresql.org/message-id/CANXE4TdxdESX1jKw48xet-5GvBFVSq=4cgNeioTQff372KO45A@mail.gmail.com [2] https://github.com/greenplum-db/gpdb/blob/5feccaae6838e68b1443e46ed39d162613c5ece8/src/test/regress/regress_gp.c#L2003
В списке pgsql-hackers по дате отправления: