Re: How to turn autovacuum prevent wrap around run faster?

From: "marc(dot)hsiao" <marc(dot)hsiao(at)cobrasonic(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: How to turn autovacuum prevent wrap around run faster?
Date: 2011-01-12 08:21:12
Message-ID: 002d01cbb231$ac7a29e0$056e7da0$@hsiao@cobrasonic.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi All:

My Server list below

postgres=# select version();
version

----------------------------------------------------------------------------
---------------------------------------
PostgreSQL 8.4.2 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
4.1.2 20080704 (Red Hat 4.1.2-44), 64-bit
(1 row)

I use another way to solve this issue.
The table is partition table, I will create this partition table before
insert data.
The freezemaxid will be smaller than others, so that the partition table
will be last one that been vacuum.

Use this sql to check
SELECT relname, age(relfrozenxid) FROM pg_class WHERE relkind = 'r' order by
2;

I also adjust the postgresql.conf three parameters.
This will cause that my partition table will not reach the max_age in a
short time.

autovacuum_freeze_max_age = 2000000000
vacuum_freeze_min_age = 10000000
vacuum_freeze_table_age = 150000000

As far as now that my partition table drop run normal, without autovacuum
prevent wraparound interrupt.

Regards
Marc

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org
[mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of marc.hsiao
Sent: Friday, January 07, 2011 4:15 PM
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] How to turn autovacuum prevent wrap around run
faster?

Hi All:

The autovacuum (prevent wraparound) still run more than 36 hours, I can not
drop the partition table after adjust the autovacuum parameters.

If a table is running autovacuum (prevent wraparound), can I purge this
table?
If not, what else I can do for clean this partition table?

If the table is running autovacuum (prevent wraparound), can I use pg_dump
to backup it?
Will the Transaction ID Wraparound Failures happen while table has been
restored into new DB?

Regards
Marc

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Laszlo Nagy 2011-01-12 12:14:22 Slow query + why bitmap index scan??
Previous Message Divakar Singh 2011-01-12 06:54:10 Performance test of Oracle and PostgreSQL using same binary