> Hello I would like to know if Pg has an interface that would allow a
> LVM with Snapshotting capabilities to know when the DB is in a
> consistent state to allow a snapshot to take place.
If you take a file system level snapshot, the DB will always be in a
consistent state (or never, depending on how you look at it). When you
restore that backup (taken from a LVM snapshot) PostgreSQL will replay
any information in the transaction logs that hasn't been recorded to
disk. Strictly speaking, the DB won't be in a consistent state - but it
will be in a state from which it can bring itself to a consistent
state. If you do this, you don't even need to interact with PostgreSQL
- you can simply perform the snapshot and back it up (the release the
snapshot when you are done).
The only caveat to this is that if you are doing such a thing, be sure
to consider any tablespaces you have off of the file system you are
snapshotting (for example, if you have a tablespace on a different LVM
volume, this snapshotting technique won't be reliable, since you'll only
snapshot part of your database).
Another alternative is to use PostgreSQL's online backup mechanism,
which doesn't require you to shut down the server, but will allow you to
perform an online backup.
We cover all of these topics in our PostgreSQL administration class - if
you're interested in learning more -
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC 27560
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
In response to
pgsql-novice by date
|Next:||From: Garcia, Joshua||Date: 2006-07-14 18:56:06|
|Subject: PQexecParams and PQexecPreparaed|
|Previous:||From: Mike Ellsworth||Date: 2006-07-14 14:35:49|
|Subject: Re: Relational DB's & pics - a long business-related question|