Re: allow online change primary_conninfo

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Sergei Kornilov <sk(at)zsrv(dot)org>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, "david(at)pgmasters(dot)net" <david(at)pgmasters(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: allow online change primary_conninfo
Date: 2020-03-27 19:27:45
Message-ID: 20200327192745.GA30004@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Mar-27, Sergei Kornilov wrote:

> Hello
>
> > I realized that the reason the tests broke after Sergei's patch is that
> > recovery/t/001_stream_rep.pl's get_slot_xmins() is broken for temp
> > walreceiver slots, since it's using the non-temp name it tries to give
> > to the slot, rather than the temp name under which it is actually
> > created. The workaround proposed by 0002 is to edit standby_1's config
> > to set walreceiver's slot to be non-temp.
>
> This is bug in behavior, not in tests.
> We need walrcv->is_temp_slot = false; somewhere in RequestXLogStreaming to works correctly.
>
> HEAD is not affected since primary_slot_name cannot be changed online.

I pushed the wal_receiver_create_temp_slot bugfix, because I realized
after looking for long enough at WalReceiverMain() that the code was
beyond saving. I'll be pushing the rest of this later today.

Thanks,

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-03-27 19:29:02 Re: backup manifests
Previous Message Tom Lane 2020-03-27 19:27:01 Re: BUG #16040: PL/PGSQL RETURN QUERY statement never uses a parallel plan