Re: PG equivalent of "mysqlhotcopy"?

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Subject: Re: PG equivalent of "mysqlhotcopy"?
Date: 2009-07-30 14:25:25
Message-ID: 4ec1cf760907300725r7f6bf3ch6bbadad8e8b4226c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I know about pg_dumpall, which creates a humongous SQL file, but is
> there something equivalent in the postgresql world, like a
> "pgsqlhotcopy" which copies data folders in a similar way as
> mysqlhotcopy?

If you're lucky enough to be using a filesystem which supports atomic
snapshotting of directories (LVM and ZFS, I believe), you could just take
a snapshot of your entire Postgres data directory. See e.g.
http://lethargy.org/~jesus/archives/92-PostgreSQL-warm-standby-on-ZFS-crack.html

Note that mysqlhotcopy essentially works by forcibly locking all tables while
the copy is going on -- for any moderately big and busy server, this is a
huge problem.

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2009-07-30 14:30:15 Re: Clients disconnect but query still runs
Previous Message Tom Lane 2009-07-30 14:20:48 Re: Clients disconnect but query still runs