Re: Pgbasebackup help

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>, John R Pierce <pierce(at)hogranch(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Pgbasebackup help
Date: 2015-12-03 23:47:40
Message-ID: 5660D49C.5040308@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2015-12-03 23:53:53 Re: Can row level security policies also be implemented for views?
Previous Message Jeff Janes 2015-12-03 23:37:34 Re: json indexing and data types