Re: Determine if postgresql cluster running is primary or not

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: Raul Kaubi <raulkaubi(at)gmail(dot)com>
Cc: Thomas Kellerer <shammat(at)gmx(dot)net>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Determine if postgresql cluster running is primary or not
Date: 2020-11-20 10:54:35
Message-ID: 49797E6F-74C6-4DE9-81F8-30BD1B37732E@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Raul,

> On 20. Nov, 2020, at 11:45, Raul Kaubi <raulkaubi(at)gmail(dot)com> wrote:
>
> Hmm, ok.
>
> But how is this possible..?
>
> when b.sender>0 and c.receiver>0 then
> 'Primary+Replica'
>
> Raul

this happens for example if you have a primary a and replica b running as a normal cluster (we use Patroni for automatic failover) and then add another replica c to the existing replica b, effectively replicating: a => b => c In this case, b would be the replica of a, but also be the primary for c.

It's called cascading replication.

Cheers,
Paul

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raul Kaubi 2020-11-20 11:00:45 Re: Determine if postgresql cluster running is primary or not
Previous Message Raul Kaubi 2020-11-20 10:45:10 Re: Determine if postgresql cluster running is primary or not