pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Duplicating data folder without tablespace, for read access
Date: Tue, 14 Aug 2018 20:28:09 +0200
Message-ID: <20180814182809.2qjtc7oeyshdy4lr@hjp.at> (raw)
In-Reply-To: <CAEv_OHUyxVEL+yt89dLYV5gGPxAkSSNCr=Afxg6S9RuYnags8g@mail.gmail.com>
References: <CAEv_OHUyxVEL+yt89dLYV5gGPxAkSSNCr=Afxg6S9RuYnags8g@mail.gmail.com>

On 2018-08-14 11:57:38 -0400, Jack Cushman wrote:
> I have a large database of text, with a 600GB table and a 100GB table connected
> by a join table. They both see occasional updates throughout the week. Once a
> week I want to "cut a release," meaning I will clone just the 100GB table and
> copy it to a "release" server for read-only web access.
> 
> My procedure would be:
> 
> - keep the 600GB table on a separate tablespace
> - cleanly stop postgres on both servers
> - copy the data folder to the release server
> - delete pg_tblspc/* on the release server
> - start postgres on both servers

If you copy the whole database anyway before deleting the tablespace:

Why don't you just drop the 600 GB table on the release server?

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/;

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (7+ messages)  latest in thread

Message-ID: <20180814182809.2qjtc7oeyshdy4lr@hjp.at>
Permalink:  ../20180814182809.2qjtc7oeyshdy4lr@hjp.at/
Also on:    postgresql.org/message-id/20180814182809.2qjtc7oeyshdy4lr@hjp.at

 · 

reply

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-general@postgresql.org
  Cc: hjp-pgsql@hjp.at
  Subject: Re: Duplicating data folder without tablespace, for read access
  In-Reply-To: <20180814182809.2qjtc7oeyshdy4lr@hjp.at>
  References: <CAEv_OHUyxVEL+yt89dLYV5gGPxAkSSNCr=Afxg6S9RuYnags8g@mail.gmail.com> <20180814182809.2qjtc7oeyshdy4lr@hjp.at>

* 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