Re: Summary and Plan for Hot Standby

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, simon(at)2ndQuadrant(dot)com, ishii(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Summary and Plan for Hot Standby
Date: 2009-11-19 15:40:56
Message-ID: 4B056708.50803@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> Tatsuo Ishii wrote:
>>> Sorry for confusion. My example is under normal PostgreSQL, not under
>>> HS enabled.
>
>> You get the same result in standby:
>
> AFAICT Tatsuo's example just shows that we might wish to add a check
> for read-only transaction mode before parsing an INSERT/UPDATE/DELETE
> command. But it seems relatively minor in any case --- at the worst
> you'd get an unexpected error message, no?

Right, it's harmless AFAICS. And it might actually be useful to be able
to prepare all queries right after connecting, even though the
connection is in not yet read-write.

It's the documentation (in source code or README) that's lacking, and
perhaps we should add more explicit checks for the "can't happen" cases,
just in case.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2009-11-19 15:47:24 Patch to change a pg_restore message
Previous Message Tom Lane 2009-11-19 15:24:42 Re: Summary and Plan for Hot Standby