pg_ctl -D PGDATA stop -m fast gets the following message 57P03 FATAL: the database system is shutting down

From: AYahorau(at)ibagroup(dot)eu
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_ctl -D PGDATA stop -m fast gets the following message 57P03 FATAL: the database system is shutting down
Date: 2018-05-15 15:36:07
Message-ID: OFCA523F90.7499E22F-ON4325828E.005573C4-4325828E.0055B412@iba.by
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello PostgreSQL Community!

Sorry, I have cancelled the previous message, so I am sending it once
again.

Master DB server hangs during stopping in two nodes Suse Linux Enterprise
Sever 12 (SLES12) cluster.
The problem is reproducible on PostgreSQL 9.6.8 and PostgreSQL 10.4.
PosgreSQL 10.4 faces with such a problem more frequently than 9.6.8.

PostgreSQL 10.4 was downloaded from https://www.postgresql.org/ftp/source/
, configured and installed on SLES 12 system as follows:
./configure –prefix=usr
Make
Make install

psql --version
psql (PostgreSQL) 10.4

Our configuration:
I have configured 2-nodes database cluster( master (node01) and standby (
node02)).
The database on the master node was configured as follows:

initdb -D /var/PostgresDb
pg_ctl -D /var/PostgresDb start -w
createdb -U dbuser -O dbuser dbname

and on the standby node as follows:
1) the recovery.conf was created
2) the pg_basebackup comand was called:

pg_basebackup -h node01 -U dbuser -D /var/PostgresDb -p 5432 -w
pg_ctl -D /var/PostgresDb start -w

Configuration files postgresql.conf and pg_hba.conf from the master and
standby nodes have been attached to the mail.
I was able to get some information about the replication by the following
sql queries:

select * from pg_stat_replication # on master node
select * from pg_stat_wal_receiver # on standby node

In order to stop database server on master node I invoked the command at
07:15:49:

pg_ctl –D /var/PostgresDb stop –m fast.

The most of the postgres processes were terminated but some of them
remained to be working.
Here is the list of postgres processes on the master node:

ps -ef|grep postgres
postgres 8418 1 0 14:14 ? 00:00:00 postgres -D
/var/PostgresDb
postgres 8428 8418 9 14:14 ? 00:02:30 postgres: logger process
postgres 8593 8418 28 14:14 ? 00:07:20 postgres: wal sender
process dbuser 10.1.4.48(41137) streaming 0/50341D0

Here is the list of postgres processes on the standby node:

ps -ef|grep postgres
postgres 28578 1 0 14:14 ? 00:00:00 postgres -D
/var/PostgresDb
postgres 28588 28578 9 14:14 ? 00:02:33 postgres: logger process
postgres 28593 28578 0 14:14 ? 00:00:00 postgres: startup process
recovering 000000050000000000000005
postgres 28594 28578 0 14:14 ? 00:00:00 postgres: checkpointer
process
postgres 28595 28578 0 14:14 ? 00:00:00 postgres: writer process
postgres 28596 28578 0 14:14 ? 00:00:00 postgres: stats collector
process
postgres 28597 28578 25 14:14 ? 00:06:50 postgres: wal receiver
process
postgres 28605 28578 0 14:14 ? 00:00:02 postgres: dbuser dbname
10.1.4.48(42893) idle

The logs from pg_log directory on master node are overfilled with the
following messages:

57P03 FATAL: the database system is shutting down
DEBUG: write 0/50341D0 flush 0/5034208 apply 0/5034208
DEBUG: sending replication keepalive

The log level for log_min_messages and log_min_error_statement was
deliberately set to debug5 in order to collect as more information as
possible.

The contents of pg_log directory has been attached from the both nodes.

Could you please clarify this issue? Is it a bug or an incorrect
configuration, usage or anything else?

Thank You in advance,
Andrei

Attachment Content-Type Size
master_configuration.zip application/zip 8.6 KB
pg_log_master.zip application/zip 514.5 KB
pg_log_standby.zip application/zip 2.9 MB
standby_configuration.zip application/zip 8.8 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Chris Pacejo 2018-05-15 16:14:22 Inconsistencies restoring public schema ownership from pg_dump
Previous Message Alexey Bashtanov 2018-05-15 14:06:28 Re: Cannot create an aggregate function with variadic parameters and enabled for parallel execution