pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
On-line backup and point-in-time recovery (PITR) 3+ messages / 3 participants [nested] [flat]
* On-line backup and point-in-time recovery (PITR) @ 2005-08-19 02:34 Enzo D'addario <enzo@pienetworks.com> 0 siblings, 1 reply; 3+ messages in thread From: Enzo D'addario @ 2005-08-19 02:34 UTC (permalink / raw) To: pgsql-admin Hi All, I have a couple of questions regarding On-line backup and point-in-time recovery (PITR) in the postgres documentation: 1.How is it that we can create a tar file of the PG Data directory whilst postgres is running? 2.What happens with any DB inserts, updates, deletes etc that occur between the SELECT pg_start_backup() and the end of the tar? They would be already logged in the WAL files and already applied in the tarball, do they then get duplicated during log replay in the recover process? Thanks In Advance Enzo D'Addario... pieNETWORK's Ltd... ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: On-line backup and point-in-time recovery (PITR) @ 2005-08-19 03:01 Bruce Momjian <pgman@candle.pha.pa.us> parent: Enzo D'addario <enzo@pienetworks.com> 0 siblings, 1 reply; 3+ messages in thread From: Bruce Momjian @ 2005-08-19 03:01 UTC (permalink / raw) To: Enzo D'addario <enzo@pienetworks.com>; +Cc: pgsql-admin Enzo D'addario wrote: > Hi All, > > I have a couple of questions regarding On-line backup and point-in-time > recovery (PITR) in the postgres documentation: > > 1.How is it that we can create a tar file of the PG Data directory > whilst postgres is running? Whe pg_xlog archived files contain information to recover any inconsistency in the backup tar file. > 2.What happens with any DB inserts, updates, deletes etc that occur > between the SELECT pg_start_backup() and the end of the tar? > They would be already logged in the WAL files and already applied in the > tarball, do they then get duplicated during log replay in the recover > process? No, the recovery is just like crash recovery and everything comes back clean, but you do have to recover to a time _after_ the end of the backup. If you want to recover to a time during the backup you have to use the previous backup and xlog files. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: On-line backup and point-in-time recovery (PITR) @ 2005-08-19 03:13 Alvaro Herrera <alvherre@alvh.no-ip.org> parent: Bruce Momjian <pgman@candle.pha.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2005-08-19 03:13 UTC (permalink / raw) To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Enzo D'addario <enzo@pienetworks.com>; pgsql-admin On Thu, Aug 18, 2005 at 11:01:27PM -0400, Bruce Momjian wrote: > Enzo D'addario wrote: > > 2.What happens with any DB inserts, updates, deletes etc that occur > > between the SELECT pg_start_backup() and the end of the tar? > > They would be already logged in the WAL files and already applied in the > > tarball, do they then get duplicated during log replay in the recover > > process? > > No, the recovery is just like crash recovery and everything comes back > clean, but you do have to recover to a time _after_ the end of the > backup. If you want to recover to a time during the backup you have to > use the previous backup and xlog files. One important detail is that the system is able to detect whether a change registered in WAL was already applied to the data files or not. So if it's already applied, it doesn't need to be applied again. -- Alvaro Herrera (<alvherre[a]alvh.no-ip.org>) "La naturaleza, tan frágil, tan expuesta a la muerte... y tan viva" ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-08-19 03:13 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2005-08-19 02:34 On-line backup and point-in-time recovery (PITR) Enzo D'addario <enzo@pienetworks.com> 2005-08-19 03:01 ` Bruce Momjian <pgman@candle.pha.pa.us> 2005-08-19 03:13 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
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