Clarifying "server starting" messaging in pg_ctl start without --wait

From: Ryan Murphy <ryanfmurphy(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Clarifying "server starting" messaging in pg_ctl start without --wait
Date: 2016-12-20 20:31:50
Message-ID: CAHeEsBfGB4Xnv-1LUXYok8ApFQa7w0KrU3gKp214GOfja=k5JQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Postgres Devs,

I had a suggestion regarding the output pg_ctl gives when you use it to
start the postgres server. At first I was going to write a patch, but then
I decided to just ask you guys first to see what you think.

I had an issue earlier where I was trying to upgrade my postgres database
to a new major version and incidentally a new pg_catalog version, and
therefore the new code could no longer run the existing data directory
without pg_upgrade or pg_dump (I ended up needing pg_dump). Initially I
was very confused because I tried running "pg_ctl -D datadir -l logfile
start" like normal, and it just said "server starting", yet the server was
not starting. It took me a while to realize that I needed to use the
"--wait" / "-w" option to actually wait and test whether the server was
really starting, at which point it told me there was a problem and to check
the log.

I'm concerned some new users may not understand this behavior of pg_ctl, so
I wanted to suggest that we add some additional messaging after "server
starting" - something like:

$ pg_ctl -D datadir -l logfile start
server starting
(to wait for confirmation that server actually started, try pg_ctl again
with --wait)

What do you guys think? Is it important to keep pg_ctl output more terse
than this? I do think something like this could help new users avoid
frustration.

I'm happy to write a patch for this if it's helpful, though it's such a
simple change that if one of the core devs wants this s/he can probably
more easily just add it themselves.

Cheers,
Ryan

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-12-20 20:32:19 Re: pgsql: Add pg_sequence system catalog
Previous Message Tom Lane 2016-12-20 20:22:12 Re: Rethinking our fulltext phrase-search implementation