Search Postgresql Archives

Re: FW: Setting up streaming replication problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you mind me bumping the issue?

Zitat von "Thiemo Kellner, NHC Barhufpflege" <thiemo.kellner@xxxxxxxxxxxxxxxxxxxx>:

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.





--
+49 (0)1578-772 37 37
+41 (0)78 947 36 21
Öffentlicher PGP-Schlüssel: http://pgp.mit.edu/pks/lookup?op=get&search=0x8F70EFD2D972CBEF

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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux