Re: Strange issues with 9.2 pg_basebackup & replication

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Joshua Berkus <josh(at)agliodbs(dot)com>
Cc: Jim Nasby <jim(at)nasby(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Ants Aasma <ants(at)cybertec(dot)at>
Subject: Re: Strange issues with 9.2 pg_basebackup & replication
Date: 2012-05-18 15:04:28
Message-ID: CAHGQGwHR-boPR4FBNpYPQ6rfaP0RckSgJ7T7nzYOmuOBjPbGzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 18, 2012 at 3:57 AM, Joshua Berkus <josh(at)agliodbs(dot)com> wrote:
> Yeah, I don't know how I produced the crash in the first place, because of course the self-replica should block all writes, and retesting it I can't get it to accept a write.  Not sure how I did it in the first place.
>
> So the bug is just that you can connect a server to itself as its own replica.  Since I can't think of any good reason to do this, we should simply error out on startup if someone sets things up that way.  How can we detect that we've connected streaming replication to the same server?

It might be easy to detect the situation where the standby has
connected to itself,
e.g., by assigning ID for each instance and checking whether IDs of two servers
are the same. But it seems not easy to detect the circularly-connected
two or more
standbys.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chander Ganesan 2012-05-18 15:08:05 LISTEN/NOTIFY Security and the docs
Previous Message Jaime Casanova 2012-05-18 13:51:22 Re: temporal support patch