Re: testing hot standby

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: testing hot standby
Date: 2010-04-13 16:06:18
Message-ID: 4BC4967A.8020007@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jaime Casanova wrote:
> On Mon, Apr 12, 2010 at 8:32 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> But when I did one more restart of the primary and standby, I was
>> able to observe the problem. If this is the same as you encountered,
>> it would be the "can't start hot standby from a shutdown checkpoint"
>> issue that Heikki pointed out. So it's very helpful to check whether
>> the posted patch fixes your problem or not.
>> http://archives.postgresql.org/pgsql-hackers/2010-04/msg00407.php
>
> this patch seems to fix the problem for me...

Committed, thanks for the testing.

> i will read it on the morning and the thread where it is, something
> that seems strange to me is that the patch touch twophase.c and
> twophase.h, why?

When you start hot standby from an online checkpoint, the XIDs of any
two-phase transactions are included in the running-xacts record, just
like any other in-progress transactions. At a shutdown checkpoint, we
know that no regular transactions are in-progress, but there can be
transactions in prepared state, which need to be considered as
in-progress in the standby, but there's no information about them in the
shutdown record. So we scan pg_twophase to discover them.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2010-04-13 16:08:08 Re: testing hot standby
Previous Message Heikki Linnakangas 2010-04-13 15:56:00 Re: Streaming replication and a disk full in primary