From: | Patrick Dung <patrick_dkt(at)yahoo(dot)com(dot)hk> |
---|---|
To: | Kevin Grittner <kgrittn(at)ymail(dot)com>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: several questions about pg_dumpall, pg_start_backup, pg_basebackup and WAL |
Date: | 2013-09-01 09:33:33 |
Message-ID: | 1378028013.14431.YahooMailNeo@web193502.mail.sg3.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
'Crash consistent' is a term I heard in some oracle white papers..
If I am correct, it means the database would be consistent after the crash recovery is done.
>> Which means it is consistent at the time that the pg_start_backup
>> is run.
>No. It will be consistent with the time that pg_stop_backup was
>run, or any later point in time that you choose, as long as you
>have WAL to that point in time.
In the manual, we where told to do three steps:
1) pg_start_backup
2) backup by tar
3) pg_stop_backup
If the backup is consistent when pg_stop_backup is called, I think it worth to mention it in the manual.
Thanks and regards,
Patrick Dung
________________________________
From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Patrick Dung <patrick_dkt(at)yahoo(dot)com(dot)hk>; Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>; "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Sent: Wednesday, August 28, 2013 3:31 AM
Subject: Re: [ADMIN] several questions about pg_dumpall, pg_start_backup, pg_basebackup and WAL
Patrick Dung <patrick_dkt(at)yahoo(dot)com(dot)hk> wrote:
> Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
>> Patrick Dung wrote:
>>> It is possible that there is file changes (added or file size
>>> changed) between the pg_start_backup and pg_stop_backup.
>>
>> Yes.
>>
>>> Is the backup consistent?
>>
>> The tar or snapshot itself will not be consistent, it will have
>> to be recovered at least until the end on the online backup.
>
> I should ask: is the backup crash consistent?
PITR restore procedures will use the crash recovery mechanism to
make the database consistent, if that's what you mean.
> Which means it is consistent at the time that the pg_start_backup
> is run.
No. It will be consistent with the time that pg_stop_backup was
run, or any later point in time that you choose, as long as you
have WAL to that point in time.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | boraldomaster | 2013-09-04 10:55:51 | Re: Postgres 9.1 statistics in pg_stat_database |
Previous Message | françois Figarola | 2013-08-31 05:52:24 | Re: to_timestamp error between postgres version 8.3 and 9.2 |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-09-01 11:06:39 | Re: INSERT...ON DUPLICATE KEY IGNORE |
Previous Message | Amit Kapila | 2013-09-01 07:37:38 | Re: Redesigning checkpoint_segments |