public inbox for [email protected]
help / color / mirror / Atom feedConfusing message on server install
2+ messages / 1 participants
[nested] [flat]
* Confusing message on server install
@ 2019-10-18 10:19 Alexander Lakhin <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Lakhin @ 2019-10-18 10:19 UTC (permalink / raw)
To: pgsql-pkg-debian
Hello,
While installing the postgresql-12 server package on Debian Buster I see
the following output:
# apt-get install postgresql-12
...
Creating new PostgreSQL cluster 12/main ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main
--auth-local peer --auth-host md5
...
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctlcluster 12 main start
Ver Cluster Port Status Owner Data directory Log file
12 main 5432 down postgres /var/lib/postgresql/12/main
/var/log/postgresql/postgresql-12-main.log
update-alternatives: using
/usr/share/postgresql/12/man/man1/postmaster.1.gz to provide
/usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Processing triggers for systemd (241-5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
root@debian10:/home/test# pg_ctlcluster 12 main status
pg_ctl: server is running (PID: 2733)
/usr/lib/postgresql/12/bin/postgres "-D" "/var/lib/postgresql/12/main"
"-c" "config_file=/etc/postgresql/12/main/postgresql.conf"
So I see the message "Success. You can now start the database server
using:", but in fact the server is running.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Confusing message on server install
@ 2019-10-29 07:00 Alexander Lakhin <[email protected]>
parent: Alexander Lakhin <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Lakhin @ 2019-10-29 07:00 UTC (permalink / raw)
To: pgsql-pkg-debian; Christoph Berg <[email protected]>
Hello,
18.10.2019 13:19, Alexander Lakhin wrote:
> While installing the postgresql-12 server package on Debian Buster I see
> the following output:
> # apt-get install postgresql-12
> ...
> Creating new PostgreSQL cluster 12/main ...
> /usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main
> --auth-local peer --auth-host md5
> ...
> performing post-bootstrap initialization ... ok
> syncing data to disk ... ok
>
> Success. You can now start the database server using:
>
> pg_ctlcluster 12 main start
> So I see the message "Success. You can now start the database server
> using:", but in fact the server is running.
Please look at the proposed improvement that suppresses this confusing
message.
Best regards,
Alexander
Author: Christoph Berg <[email protected]>
Description: Debian-specific cluster startup message from initdb
Forwarded: No, Debian specific
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -3361,9 +3361,10 @@
/* translator: This is a placeholder in a shell command. */
appendPQExpBuffer(start_db_cmd, " -l %s start", _("logfile"));
- printf(_("\nSuccess. You can now start the database server using:\n\n"
+ if (!getenv("CLUSTER_START_COMMAND") || strlen(getenv("CLUSTER_START_COMMAND")) > 0)
+ printf(_("\nSuccess. You can now start the database server using:\n\n"
" %s\n\n"),
- start_db_cmd->data);
+ getenv("CLUSTER_START_COMMAND") ? getenv("CLUSTER_START_COMMAND") : start_db_cmd->data);
destroyPQExpBuffer(start_db_cmd);
Attachments:
[text/x-patch] pg_createcluster.diff (610B, 2-pg_createcluster.diff)
download | inline diff:
--- a/pg_createcluster 2019-07-09 16:57:45.000000000 +0300
+++ b/pg_createcluster 2019-10-29 06:16:00.935081461 +0300
@@ -351,7 +351,9 @@
} else {
print "Creating new PostgreSQL cluster $version/$cluster ...\n";
# ask initdb to print a different cluster start command (Debian patch)
- $ENV{CLUSTER_START_COMMAND} = "pg_ctlcluster $version $cluster start";
+ if (!defined $ENV{CLUSTER_START_COMMAND}) {
+ $ENV{CLUSTER_START_COMMAND} = "pg_ctlcluster $version $cluster start";
+ }
init_db $version, $datadir, $owneruid, $ownergid, \@initdb_opts_from_cli;
$newcluster = 1;
}
[text/x-patch] maintscripts-functions.diff (543B, 3-maintscripts-functions.diff)
download | inline diff:
--- a/maintscripts-functions 2018-09-20 17:02:06.000000000 +0300
+++ b/maintscripts-functions 2019-10-29 07:41:55.892583740 +0300
@@ -86,6 +86,7 @@
create=$(pg_conftool /etc/postgresql-common/createcluster.conf show -bs create_main_cluster || :)
if [ -z "$2" ] && [ "$create" != "off" ]; then
set_system_locale
+ export CLUSTER_START_COMMAND=""
pg_createcluster -u postgres $VERSION main ||
echo "Error: could not create default cluster. Please create it manually with
[text/plain] initdb-startup-message (767B, 4-initdb-startup-message)
download | inline diff:
Author: Christoph Berg <[email protected]>
Description: Debian-specific cluster startup message from initdb
Forwarded: No, Debian specific
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -3361,9 +3361,10 @@
/* translator: This is a placeholder in a shell command. */
appendPQExpBuffer(start_db_cmd, " -l %s start", _("logfile"));
- printf(_("\nSuccess. You can now start the database server using:\n\n"
+ if (!getenv("CLUSTER_START_COMMAND") || strlen(getenv("CLUSTER_START_COMMAND")) > 0)
+ printf(_("\nSuccess. You can now start the database server using:\n\n"
" %s\n\n"),
- start_db_cmd->data);
+ getenv("CLUSTER_START_COMMAND") ? getenv("CLUSTER_START_COMMAND") : start_db_cmd->data);
destroyPQExpBuffer(start_db_cmd);
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-10-29 07:00 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 10:19 Confusing message on server install Alexander Lakhin <[email protected]>
2019-10-29 07:00 ` Alexander Lakhin <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox