From: | Steve Kehlet <steve(dot)kehlet(at)gmail(dot)com> |
---|---|
To: | Forums postgresql <pgsql-general(at)postgresql(dot)org> |
Subject: | delaying autovacuum freeze via storage params? |
Date: | 2015-05-26 23:53:37 |
Message-ID: | CA+bfosEtMvizBjLaWJp-Zp+LUB2YdEPg4jfQBW8KqMWOve6KyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello, I'd like to postpone an "autovacuum: VACUUM public.mytable (to
prevent wraparound)" and handle it manually at another time. I thought I
could set these storage parameters on the large table in question
("mytable") like this:
ALTER TABLE mytable SET (
autovacuum_freeze_min_age=10000000,
autovacuum_freeze_table_age=800000000,
autovacuum_freeze_max_age=1000000000
);
then kill the running autovacuum process, but unfortunately it just keeps
coming back:
mydb | 22734 | 05/26/2015 23:29:10 | autovacuum: VACUUM public.mytable
(to prevent wraparound)
I also tried setting the toast.autovacuum* storage parameters, as well as a
postgres reload, but neither made any difference.
Here is the table's age:
mydb=> select age(relfrozenxid) from pg_class where oid =
'mytable'::regclass;
age
-----------
203065951
(1 row)
So 203 million, which is just past the 200 million default (which is why I
started looking at this). But it's less than the 1 billion I set the
storage param to.
Here is \d+:
mydb=> \d+ mytable
Table "public.mytable"
Column | Type | Modifiers
| Storage | Stats target | Description
-------------------------+-----------------------------+-----------------------+----------+--------------+-------------
(removed al lthis)
Options: autovacuum_freeze_min_age=10000000,
autovacuum_freeze_table_age=800000000,
autovacuum_freeze_max_age=1000000000, toast.autovacuum_enabled=false,
toast.autovacuum_freeze_min_age=10000000,
toast.autovacuum_freeze_table_age=800000000,
toast.autovacuum_freeze_max_age=1000000000
I'm guessing I'm missing something here, can anyone offer suggestions or
ideas on what I should try next?
Here is my version:
mydb=> SELECT version();
version
---------------------------------------------------------------------------------------------------------------
PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2
20080704 (Red Hat 4.1.2-44), 64-bit
(1 row)
and I put my [custom settings in a gist](
https://gist.github.com/skehlet/bcdbc1ce1f212d3b7bb2)
Thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-05-27 02:27:29 | Re: delaying autovacuum freeze via storage params? |
Previous Message | William Dunn | 2015-05-26 18:18:56 | Re: Can we simulate Oracle Flashback with pg_export_snapshot()? |