pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedQuestion about postgres replication construction
4+ messages / 3 participants
[nested] [flat]
* Question about postgres replication construction
@ 2021-10-29 08:37 MARIANE K <mskiesewetter@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: MARIANE K @ 2021-10-29 08:37 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Hi everyone,
I need some advice.
I need to set up a 3 node postgres 12 cluster.
The primary postgres server with a streaming replication hot standby which
is managed with repmgr.
Besides these 2 servers I need to create another standby server which will
be synced with wal files that are copied to the server.
This third node does not have any connection with the other two nodes and
will only be updated through the wal files.
The third node will be created by taking a base backup of the primary node
and restoring it to the PGDATA directory.
repmgr is not configured for node 3 because it has no connection with the
other two nodes.
The primary connection parameter is uncommented in the postgresql.conf.
This construction works until I perform a switchover from node 1 to node 2
with repmgr, making node 2 the new primary and node 1 the new standby.
The standby on node 3 does not pick up the switch.
My question is: Does anyone have an idea in how to approach this? Is this a
valid construction?
I know I'm missing something essential but at this moment I can't seem to
see it.
Thanks in advance.
Regards
Marian
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Question about postgres replication construction
@ 2021-10-29 10:06 Vijaykumar Jain <vijaykumarjain.github@gmail.com>
parent: MARIANE K <mskiesewetter@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Vijaykumar Jain @ 2021-10-29 10:06 UTC (permalink / raw)
To: MARIANE K <mskiesewetter@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On Fri, 29 Oct 2021 at 14:07, MARIANE K <mskiesewetter@gmail.com> wrote:
> Hi everyone,
>
>
>
> I need some advice.
>
> I need to set up a 3 node postgres 12 cluster.
>
> The primary postgres server with a streaming replication hot standby which
> is managed with repmgr.
>
> Besides these 2 servers I need to create another standby server which will
> be synced with wal files that are copied to the server.
>
> This third node does not have any connection with the other two nodes and
> will only be updated through the wal files.
>
> The third node will be created by taking a base backup of the primary node
> and restoring it to the PGDATA directory.
>
> repmgr is not configured for node 3 because it has no connection with the
> other two nodes.
>
> The primary connection parameter is uncommented in the postgresql.conf.
>
>
>
> This construction works until I perform a switchover from node 1 to node 2
> with repmgr, making node 2 the new primary and node 1 the new standby.
>
> The standby on node 3 does not pick up the switch.
>
> My question is: Does anyone have an idea in how to approach this? Is this
> a valid construction?
>
> I know I'm missing something essential but at this moment I can't seem to
> see it.
>
>
>
>
>
C.2. repmgr
<https://repmgr.org/docs/current/faq-repmgr.html#FAQ-REPMGR-CLONE-OTHER-SOURCE;
<https://repmgr.org/docs/current/faq-repmgr.html#FAQ-REPMGR-CLONE-OTHER-SOURCE>you
would want to register the new standby to the cluster.
--
Thanks,
Vijay
Mumbai, India
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Question about postgres replication construction
@ 2021-10-29 11:49 MARIANE K <mskiesewetter@gmail.com>
parent: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: MARIANE K @ 2021-10-29 11:49 UTC (permalink / raw)
To: Vijaykumar Jain <vijaykumarjain.github@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Hi Vijay,
Thanks for the reply.
The new standby does not have access to the other two nodes. I'm not aware
of being able to register it to the cluster.
By the way I've found my error. I forgot to change the archive_command on
node 2. After changing that it worked like a charm.
However i'm interested if anyone has other (better) ideas in how to tackle
this.
thanks in advance.
regards
Marian
Op vr 29 okt. 2021 om 12:06 schreef Vijaykumar Jain <
vijaykumarjain.github@gmail.com>:
> On Fri, 29 Oct 2021 at 14:07, MARIANE K <mskiesewetter@gmail.com> wrote:
>
>> Hi everyone,
>>
>>
>>
>> I need some advice.
>>
>> I need to set up a 3 node postgres 12 cluster.
>>
>> The primary postgres server with a streaming replication hot standby
>> which is managed with repmgr.
>>
>> Besides these 2 servers I need to create another standby server which
>> will be synced with wal files that are copied to the server.
>>
>> This third node does not have any connection with the other two nodes and
>> will only be updated through the wal files.
>>
>> The third node will be created by taking a base backup of the primary
>> node and restoring it to the PGDATA directory.
>>
>> repmgr is not configured for node 3 because it has no connection with the
>> other two nodes.
>>
>> The primary connection parameter is uncommented in the postgresql.conf.
>>
>>
>>
>> This construction works until I perform a switchover from node 1 to node
>> 2 with repmgr, making node 2 the new primary and node 1 the new standby.
>>
>> The standby on node 3 does not pick up the switch.
>>
>> My question is: Does anyone have an idea in how to approach this? Is this
>> a valid construction?
>>
>> I know I'm missing something essential but at this moment I can't seem to
>> see it.
>>
>>
>>
>>
>>
> C.2. repmgr
> <https://repmgr.org/docs/current/faq-repmgr.html#FAQ-REPMGR-CLONE-OTHER-SOURCE;
>
> <https://repmgr.org/docs/current/faq-repmgr.html#FAQ-REPMGR-CLONE-OTHER-SOURCE>you
> would want to register the new standby to the cluster.
>
>
> --
> Thanks,
> Vijay
> Mumbai, India
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Question about postgres replication construction
@ 2021-10-29 12:07 Johannes Truschnigg <johannes@truschnigg.info>
parent: MARIANE K <mskiesewetter@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Truschnigg @ 2021-10-29 12:07 UTC (permalink / raw)
To: MARIANE K <mskiesewetter@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Hi Marian,
On Fri, Oct 29, 2021 at 01:49:30PM +0200, MARIANE K wrote:
> [...]
>
> By the way I've found my error. I forgot to change the archive_command on
> node 2. After changing that it worked like a charm.
> However i'm interested if anyone has other (better) ideas in how to tackle
> this.
I think it's going to be very hard to try suggesting something, since you
never told us about the actual goal of your implementation. What do actually
hope to achieve with the setup you described earlier in this thread? What
properties and qualities should your system exhibit, and which shortcomings
does it need and try to avoid?
If you elaborate on that, someone might be able to come up with improvements,
or at least comments on, your current architecture and implementation.
--
with best regards:
- Johannes Truschnigg ( johannes@truschnigg.info )
www: https://johannes.truschnigg.info/
phone: +436502133337
xmpp: johannes@truschnigg.info
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-10-29 12:07 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 08:37 Question about postgres replication construction MARIANE K <mskiesewetter@gmail.com>
2021-10-29 10:06 ` Vijaykumar Jain <vijaykumarjain.github@gmail.com>
2021-10-29 11:49 ` MARIANE K <mskiesewetter@gmail.com>
2021-10-29 12:07 ` Johannes Truschnigg <johannes@truschnigg.info>
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