Обсуждение: Master-Slave error: the database system is starting up

Поиск
Список
Период
Сортировка

Master-Slave error: the database system is starting up

От
Сергей Злобин
Дата:
Hello, 

I was advised to write a letter to you

Windows Server 2012 
Postgres 9.6 
I made a replication with the master server. On the slave server service 
postgres is running, but in log files slave's server "FATAL:  the database 
system is starting up" message will continue. 

when I try from the command line run the command 

psql.exe -U postgres` 
writes the following error: 

psql: ... Connection refused (0x0000274D/10061) ... 
My postgresql.conf configuration is on the slave server: 

listen_addresses = 'ip slave adress' 
hot_standby = on 
wal_receiver_status_interval = 0 
hot_standby_feedback = on 
My recovery.conf configuration is on the slave server: 

standby_mode = 'on' 
primary_conninfo = 'host=ip master server port=5432 user=postgres' 
primary_slot_name = 'slot_1' 
trigger_file = 'D:\Postgres Data\Start_master' 
Could you please to fix this issue? I don't understand what could be the 
problem. I've made shutdown the server, the problem is not resolved.

Thenk you very much

Re: Master-Slave error: the database system is starting up

От
Andreas Kretschmer
Дата:

Am 01.02.2018 um 15:43 schrieb Сергей Злобин:
> Hello,
>
> I was advised to write a letter to you
>
> Windows Server 2012
> Postgres 9.6
> I made a replication with the master server. On the slave server service
> postgres is running, but in log files slave's server "FATAL:  the database
> system is starting up" message will continue.
>
> when I try from the command line run the command
>
> psql.exe -U postgres`
> writes the following error:
>
> psql: ... Connection refused (0x0000274D/10061) ...
> My postgresql.conf configuration is on the slave server:
>
> listen_addresses = 'ip slave adress'
> hot_standby = on
> wal_receiver_status_interval = 0
> hot_standby_feedback = on
> My recovery.conf configuration is on the slave server:
>
> standby_mode = 'on'
> primary_conninfo = 'host=ip master server port=5432 user=postgres'
> primary_slot_name = 'slot_1'
> trigger_file = 'D:\Postgres Data\Start_master'
> Could you please to fix this issue? I don't understand what could be the
> problem. I've made shutdown the server, the problem is not resolved.
>
> Thenk you very much
>
> http://www.postgresql-archive.org/Master-Slave-error-the-database-system-is-starting-up-td6004044.html

please execute "select * from pg_stat_replication;" and "select * from 
pg_replication_slots ;" on the master and show us the output.
Please check also the logs on the standby.

Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com



Re: Master-Slave error: the database system is starting up

От
Sargez
Дата:
Hello

Thenk you very much fot your interest! I am very grateful!

There are my results:

postgres=# select * from pg_stat_replication;
 pid  | usesysid | usename  | application_name | client_addr |
client_hostname | client_port |
   backend_start         | backend_xmin |   state   | sent_location |
write_location | flush_locatio
n | replay_location | sync_priority | sync_state
------+----------+----------+------------------+-------------+-----------------+-------------+------
-------------------------+--------------+-----------+---------------+----------------+--------------
--+-----------------+---------------+------------
 4372 |       10 | postgres | walreceiver      | ip-slave |
|       57344 | 2018-
02-01 23:08:49.729755+03 |              | streaming | A/E7CE29F0    |
A/E7CE2878     | A/E7CE2878
  | A/E7CE2878      |             0 | async
(1 строка)

postgres=# select * from pg_replication_slots;
 slot_name | plugin | slot_type | datoid | database | active | active_pid |
xmin | catalog_xmin | re
start_lsn | confirmed_flush_lsn
-----------+--------+-----------+--------+----------+--------+------------+------+--------------+---
----------+---------------------
 slot_1    |        | physical  |        |          | t      |       4372 |
|              | A/
E7CE3CD0  |
(1 строка)

I'll wait for your reply, in log file the same the same error when trying to
connect to postgres
"the database system is starting up"



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html


Re: Master-Slave error: the database system is starting up

От
Daniel Westermann
Дата:
> http://www.postgresql-archive.org/Master-Slave-error-the-database-system-is-starting-up-td6004044.html
>
>please execute "select * from pg_stat_replication;" and "select * from
>pg_replication_slots ;" on the master and show us the output.
>Please check also the logs on the standby.

Did you set hot_standby=on on the slave as well. 

Regards
Daniel

Re: Master-Slave error: the database system is starting up

От
Sargez
Дата:
Hello

on slave hot_standby is on

hot_standby = on            # "on" allows queries during recovery



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html