Re: FW: Setting up streaming replication problems - Mailing list pgsql-general

From Thiemo Kellner, NHC Barhufpflege
Subject Re: FW: Setting up streaming replication problems
Date
Msg-id 20180123083607.20137iwa16pu6y8s@www.gelassene-pferde.biz
Whole thread Raw
In response to Setting up streaming replication problems  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Responses Re: FW: Setting up streaming replication problems  (Martin Goodson <kaemaril@googlemail.com>)
Re: FW: Setting up streaming replication problems  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
List pgsql-general
Andreas, thanks for your reply.

>> I try to set up synchronous streaming replication as try-out. I use my
>> laptop with Debian 9 and PostgreSQL package 10+189.pgdg90+1. And of
>> this PostgreSQL installation I have two clusters main (master) and
>> main2 (hot standby). I tried with Rigg's book and the PostgreSQL
>> documentation and some pages on the web, but fail miserably.
>
> you have one cluster with 2 nodes ;-)

Ähm, right. Been more in a hurry than I thought as it shows below as well.

> Note: it's a bad idea to build a synchronous cluster with only 2 nodes,
> you need at least 3 nodes

I am aware that synchronous clustering might deadlock the master. To
have a hot standby on the same metal does not make much sense either.
This is just a try out though. The proof of me being stupid, so to
speak. ;-)

> that's the recovery.conf, not pg_hba.conf. And you don't need it on the
> master.

Copy paste blunder (see above ;-))

>> standby_mode = 'off'
>> primary_conninfo = 'host=localhost user=repuser port=5433
>> password=<md5 value of password>'
>> restore_command = 'false'
>
> why that?

Uhm, cannot remember *blush*, I removed it but it made no difference.

> master or standby? confused...

C&p blunder again. Standby.

>> standby_mode = 'on'
>> primary_conninfo = 'host=localhost user=repuser port=5433
>> password=<md5 value of password>'
>
> the same port as above?

I keep repeating myself: C&p blunder again: nope

>> 1) I am not sure whether to put the md5 value of the repuser password
>> into primary conninfo or the plain one. I don't feel the documentation
>> or the book is clear on that.

Anyone two dimes on that?

>> 2) Starting the clusters, I do not see any attempt of the hot standby
>> to connect to the master.

I put logging back to more sane info as debug did not give me any
useful information on that (maybe due to my noobdom). But I cannot see
any connection attempt...

> are the 2 nodes running on different ports?

Yes, 5432 master, 5433 standby

> You need only 1 recovery.conf, on the standby.

But does it hurt? I just had the idea that role change would be
easier. master <-> standby

> restore_command = 'false'
> is useless, i'm guessing that's the reason that the standby doesn't
> connect to the master.

Uhm, is it useless or does it prevent connection? Anyway, I removed it
and it did not make a difference.

> Greetings from Dresden, Andreas

:-) Greetings from Bannholz@Hochrhein :-D

--
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu/pks/lookup?op=get&search=0x8F70EFD2D972CBEF

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


pgsql-general by date:

Previous
From: Michael Krüger
Date:
Subject: Re: Slow alter sequence with PG10.1
Next
From: Olleg Samoylov
Date:
Subject: Re: Using random() in update produces same random value for all