pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: Sékine Coulibaly <scoulibaly@gmail.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: "no-slave yet" early CREATE TABLE transaction gets blocked when synchronous replication
Date: Wed, 25 Mar 2015 14:31:47 +0000 (UTC)
Message-ID: <1904087945.1280154.1427293907628.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <CAD8n-Frk1Sb5Sgd9P_H7+QR4m=6kGZBSkcZdpcGA_KLhAxJ6fw@mail.gmail.com>
References: <CAD8n-Frk1Sb5Sgd9P_H7+QR4m=6kGZBSkcZdpcGA_KLhAxJ6fw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Sékine Coulibaly <scoulibaly@gmail.com> wrote:

> synchronous replication. When a transaction is received by the
> master before the slave is up and running, the transaction seems
> blocked forever on the backend.

This is not a bug.  The promise made for synchronous replication is
that when a commit returns an indication of success, the
transaction has been persisted on at least two clusters.  If you
don't want that promise yet, don't turn on synchronous replication
yet.  If you want that guarantee but you want the primary to be
able to continue to commit transactions when there is a failure of
a synchronous replica, then provide more than one synchronous
replica.

There was discussion of supporting a "don't actually provide that
guarantee, but kinda try when it's responding fast enough", but
that was rejected as being so close to asynchronous replication as
to not really add any value.  All it would do is stall the
successful return of a commit request without actually giving you
any stronger guarantee than asynchronous replication.  Effectively,
any product that behaves that way is just giving you a false sense
of security.  If you don't need the guarantee of a second copy of
the transaction having been persisted to a second cluster, use
asynchronous replication.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (4+ messages)  latest in thread

Message-ID: <1904087945.1280154.1427293907628.JavaMail.yahoo@mail.yahoo.com>
Permalink:  ../1904087945.1280154.1427293907628.JavaMail.yahoo@mail.yahoo.com/
Also on:    postgresql.org/message-id/1904087945.1280154.1427293907628.JavaMail.yahoo@mail.yahoo.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: kgrittn@ymail.com, scoulibaly@gmail.com
  Subject: Re: "no-slave yet" early CREATE TABLE transaction gets blocked when synchronous replication
  In-Reply-To: <1904087945.1280154.1427293907628.JavaMail.yahoo@mail.yahoo.com>
  References: <CAD8n-Frk1Sb5Sgd9P_H7+QR4m=6kGZBSkcZdpcGA_KLhAxJ6fw@mail.gmail.com> <1904087945.1280154.1427293907628.JavaMail.yahoo@mail.yahoo.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