Re: Strange issues with 9.2 pg_basebackup & replication

From: Joshua Berkus <josh(at)agliodbs(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(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-17 18:57:33
Message-ID: 1148453484.342123.1337281053265.JavaMail.root@mail-1.01.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

----- Original Message -----
> On Thu, May 17, 2012 at 10:42 PM, Ants Aasma <ants(at)cybertec(dot)at>
> wrote:
> > On Thu, May 17, 2012 at 3:42 PM, Joshua Berkus <josh(at)agliodbs(dot)com>
> > wrote:
> >> Even more fun:
> >>
> >> 1) Set up a server as a cascading replica (e.g. max_wal_senders =
> >> 3, standby_mode = on )
> >>
> >> 2) Connect the server to *itself* as a replica.
> >>
> >> 3) This will work and report success, up until you do your first
> >> write.
> >>
> >> 4) Then ... segfault!
> >
> > I cannot reproduce this.
>
> Me, neither.
>
> Josh, could you show me the more detail procedure to reproduce the
> problem?
>
> Regards,
>
> --
> Fujii Masao
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2012-05-17 20:12:45 Re: psql bug
Previous Message Jeff Janes 2012-05-17 18:53:51 Re: Why is indexonlyscan so darned slow?