From: Chris Hoover <revoohc@sermonaudio.com>
To: PostgreSQL Admin <pgsql-admin@postgresql.org>
Subject: Copying large tables with DBLink
Date: Thu, 24 Mar 2005 13:59:44 -0500
Message-ID: <42430E20.1010600@sermonaudio.com> (raw)
Has anyone had problems with memory exhaustion and dblink? We were
trying to use dblink to convert our databases to our new layout, and had
our test server lock up several times when trying to copy a table that
was significantly larger than our memory and swap.
Basically where were doing an insert into <table> select * from
dblink('dbname=olddb','select * from large_table) as t_large_table(table
column listing);
Does anyone know of a way around this? The problem we were trying to
solve is the fact that due to new column additions that are populated
during the conversion, our db's are doubling in space. This is
requiring lengthy vacuum fulls to reclaim the space and making for a
very long conversion time.
We are very concerned that this system lockup could happen on our
production boxes since we have several db's that are very large and
probably have tables larger than our memory on the systems.
Anyway, any ideas on how to get around this, or how we might speed it up
and not use so much space would be appreciated.
Chris
PG 7.3.4
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: revoohc@sermonaudio.com
Subject: Re: Copying large tables with DBLink
In-Reply-To: <42430E20.1010600@sermonaudio.com>
References: <42430E20.1010600@sermonaudio.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox