Excluding a table from pg_dump - Mailing list pgsql-general

From Kari Lavikka
Subject Excluding a table from pg_dump
Date
Msg-id Pine.HPX.4.62.0608151136390.4397@purple.bdb.fi
Whole thread Raw
Responses Re: Excluding a table from pg_dump  ("Greg Sabino Mullane" <greg@turnstep.com>)
List 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@bdb.fi - (050) 380 3808
__ooO(  )Ooo_______ _____ ___ _ _  _   _    _      _                  _
       ""

pgsql-general by date:

Previous
From: "Andrii Vasyliev"
Date:
Subject: Explain returns extremely high cost
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Explain returns extremely high cost