Re: PG equivalent of "mysqlhotcopy"? - Mailing list pgsql-general

From Josh Kupershmidt
Subject Re: PG equivalent of "mysqlhotcopy"?
Date
Msg-id 4ec1cf760907300725r7f6bf3ch6bbadad8e8b4226c@mail.gmail.com
Whole thread Raw
In response to PG equivalent of "mysqlhotcopy"?  (Phoenix Kiula <phoenix.kiula@gmail.com>)
List 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.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Clients disconnect but query still runs
Next
From: Greg Stark
Date:
Subject: Re: Clients disconnect but query still runs