Skip site navigation (1) Skip section navigation (2)

table move across databases

From: Duncan Sargeant <dunc-postgres(at)rcpt(dot)to>
To: pgsql-novice(at)postgresql(dot)org
Subject: table move across databases
Date: 2002-07-23 03:59:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

Is there a way to move a table between databases?

The reason I ask is that I have a growing 'log' table which is only
ever inserted to and no rows are ever deleted, updated and replace.  It
is indexed by the time of insert.  I'd like to archive off this table to
another database so that vacuum and pg_dump don't take so long on the
'live' database.  I'm taking a nightly backup, and this data never
changes so it doesn't need to be archived as often.  If there is a way
to do all this or something similar without rotating the table to a
different database then I would like to hear it (the only other way I
can think of is to use the -t option of pg_dump for each of the other
tables, but that's too ugly)

many thanks in advance


pgsql-novice by date

Next:From: Ron JohnsonDate: 2002-07-23 04:30:38
Subject: Re: table move across databases
Previous:From: Andrew McMillanDate: 2002-07-22 21:05:07
Subject: Re: Memory problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group