Excluding a table from pg_dump

From: Kari Lavikka <tuner(at)bdb(dot)fi>
To: pgsql-general(at)postgresql(dot)org
Subject: Excluding a table from pg_dump
Date: 2006-08-15 09:08:40
Message-ID: Pine.HPX.4.62.0608151136390.4397@purple.bdb.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

I think there has been some talk about this missing feature since 2001,
but anyway..

I have a database which contains about 500M rows and the nightly dump
takes about six hours. Size of the compressed dump is ~30GB.

The biggest tables are:
relname | reltuples
---------------------------------+-------------
comment_archive | 2.45995e+08
comment | 1.68875e+08

Comments are messages written by users and they are "partitioned" into two
tables. New messages are always written to "comment" and once a month the
oldest messages are moved to "comment_archive". For performance reasons
neither of these tables have foreign keys.

Contents of "comment_archive" are quite static. It's frequently read but
rarely written. Backup each night is quite useless and it steals time from
other essential maintenance tasks.

The database contains several schemas and excluding "comment_archive" by
moving it to different schema doesn't sound very convenient. pg_dump
doesn't have an option to dump multiple schemas at once.

Are there any working "-X" patches for pg_dump or does anyone have other
possible solutions?

|\__/|
( oo ) Kari Lavikka - tuner(at)bdb(dot)fi - (050) 380 3808
__ooO( )Ooo_______ _____ ___ _ _ _ _ _ _ _
""

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-08-15 10:22:32 Re: Explain returns extremely high cost
Previous Message Andrii Vasyliev 2006-08-15 07:14:49 Explain returns extremely high cost