pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Florian Pflug <fgp@phlo.org>
Cc: Simon Riggs <simon@2ndQuadrant.com>
Cc: Aidan Van Dyk <aidan@highrise.ca>
Cc: Daniel Farina <daniel@heroku.com>
Cc: Chris Redekop <chris@replicon.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Hot Backup with rsync fails at pg_clog if under load
Date: Thu, 27 Oct 2011 11:18:06 +0300
Message-ID: <4EA913BE.2080102@enterprisedb.com> (raw )
In-Reply-To: <4EA900E5.9070905@enterprisedb.com >
References: <CAC2SuRJTtsXL67EuTdd25GThYZBZTcepfG7Z0Vvv2pZQWzJD=w@mail.gmail.com >
<CAAZKuFbUSxOb8x80k9-fD9CsXBRmzTNWutqcDVGaTvwFTvURiQ@mail.gmail.com >
<213AEFBF-479C-4F9E-B0CA-24AAB2C9F4DD@phlo.org >
<CA+U5nMJksETN=sJEmu2FqhWNv2Uv63e_9T5OrZEGmviNnWEC5Q@mail.gmail.com >
<CA+U5nMJfnaay7p_rRzrvWLTyO-aKNEh414czr3jyXT8vhHiJVw@mail.gmail.com >
<1A94CE1A-C3E5-4923-B677-623D41BC273F@phlo.org >
<CA+U5nMKUUoA8kRG=itfsO5nZuE3x_KDJz78EaUN3_FKmq-uMJA@mail.gmail.com >
<6C3D7EDA-573E-46DC-9047-5FEB92876DA8@phlo.org >
<CA+U5nMJLDZ7VP1O3Jdde+p+9-HxuEi8qG+v5+LuoZGSiOvhkxA@mail.gmail.com >
<CAC_2qU_eCUYMY6O5CgAK0pYugd=moApirdAt8G_G2sYKs0DfOQ@mail.gmail.com >
<CA+U5nML+fJgz-NdZrGX+R3m6JKnT1JC=v0iXkkSAsojnsqqPoQ@mail.gmail.com >
<FD57812A-6A9B-44F3-8CDF-3CD2F8D9918E@phlo.org >
<12E895D5-C6D0-4E71-B9C3-85E1BC14E6B8@phlo.org >
<CA+U5nMLyW=S1DTBhswOirf_EZX06epvtyUZN364BGPJBDH _tiA@mail.gmail.com >
<5EDA27FA-963F-413D-9849-874072F317E5@phlo.org >
<4EA900E5.9070905@enterprisedb.com >
On 27.10.2011 09:57, Heikki Linnakangas wrote:
>> My suggestion is to fix the CLOG problem in that same way that you fixed
>> the SUBTRANS problem, i.e. by moving LogStandbySnapshot() to before
>> CheckPointGuts().
>>
>> Here's what I image CreateCheckPoint() should look like:
>>
>> 1) LogStandbySnapshot() and fill out oldestActiveXid
>> 2) Fill out REDO
>> 3) Wait for concurrent commits
>> 4) Fill out nextXid and the other fields
>> 5) CheckPointGuts()
>> 6) Rest
>>
>> It's then no longer necessary for LogStandbySnapshot() do modify
>> the nextXid, since we fill out nextXid after LogStandbySnapshot() and
>> will thus derive a higher value than LogStandbySnapshot() would have.
>
> Hmm, I don't think that fully fixes the problem. Even if you're certain
> that CheckPointGuts() has fsync'd the clog page to disk, VACUUM might
> decide to truncate it away again while the checkpoint is running.
Oh, scratch that. During recovery, we merrily treat missing slru files
as they were filled with zeros.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
view thread (80+ messages) latest in thread
Message-ID: <4EA913BE.2080102@enterprisedb.com>
Permalink: ../4EA913BE.2080102@enterprisedb.com/
Also on: postgresql.org/message-id/4EA913BE.2080102@enterprisedb.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, fgp@phlo.org, simon@2ndQuadrant.com, aidan@highrise.ca, daniel@heroku.com, chris@replicon.com
Subject: Re: Hot Backup with rsync fails at pg_clog if under load
In-Reply-To: <4EA913BE.2080102@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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