Re: Pgbasebackup help - Mailing list pgsql-general

From Jim Nasby
Subject Re: Pgbasebackup help
Date
Msg-id 5660D49C.5040308@BlueTreble.com
Whole thread Raw
In response to Re: Pgbasebackup help  (Andreas Kretschmer <andreas@a-kretschmer.de>)
List pgsql-general
Maybe I'm just being picky here, but...

On 12/3/15 3:04 PM, Andreas Kretschmer wrote:
>> If you invoke pg_start_backup()  before the copy, and pg_stop_backup()
>> >after the copy, then a file system copy is consistent.

The filesystem copy is not consistent, but because of how
pg_start/stop_backup works it doesn't matter that it's inconsistent.
Postgres uses the archived WAL files to recover from the inconsistency.

> file system snapshot PLUS transaction logs => consistent backup.

A real filesystem snapshot would always be consistent, and as long as it
included all Postgres files that's all you need. Start Postgres against
that snapshot and it will think the database had crashed and perform a
normal recovery.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: json indexing and data types
Next
From: Jim Nasby
Date:
Subject: Re: Can row level security policies also be implemented for views?