termination of backend waiting for sync rep generates a junk log message

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: termination of backend waiting for sync rep generates a junk log message
Date: 2011-10-17 10:53:53
Message-ID: CAHGQGwEuTzg=Ar0riK9aQSYFPtu4V4z=GZ1NyX9oCoqcFiidvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

In 9.1, the following procedure writes a junk message into the server log;

$ initdb -D data
$ cat << EOF >> data/postgresql.conf
wal_level = hot_standby
max_wal_senders = 1
synchronous_standby_names = '*'
EOF
$ pg_ctl -D data start
$ psql -c "create table t (i int)" &
$ pg_ctl -D data -m fast stop

WARNING: canceling the wait for synchronous replication and
terminating connection due to administrator command
DETAIL: The transaction has already committed locally, but might not
have been replicated to the standby.
backend> FATAL: terminating connection due to administrator command

The above is the server log messages that I got when I did the procedure.
"backend> " is a junk. If a backend is terminated while it's waiting for
synchronous replication, whereToSendOutput is set to DestNone. Then,
whereToSendOutput=DestNone makes ReadCommand() call
InteractiveBackend() which outputs "backend> ".

This junk message might mess up the server log monitoring tools. I think
it should be removed.

The simple fix is to change InteractiveBackend() so that it calls
CHECK_FOR_INTERRUPTS() before it outputs "backend> ". Thought?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-10-17 13:44:30 Re: Pushing ScalarArrayOpExpr support into the btree index AM
Previous Message Florian Pflug 2011-10-17 09:48:38 Re: Underspecified window queries in regression tests