Discussion:
Upgrade and Single User
(too old to reply)
Tom Browder
2012-09-19 16:33:11 UTC
Permalink
I want to upgrade my existing installation and would like to ensure
the db is not modified until I get the new installation running.

Is there any way to restart into a single user mode so that a
pg_dumpall works as the superuser? Or am I limited to a stop, fiddle
with pg_hba.conf, restart, pg_dumpall, etc.?

Thanks,

-Tom
--
Sent via pgsql-novice mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Bartosz Dmytrak
2012-09-21 14:38:42 UTC
Permalink
Post by Tom Browder
I want to upgrade my existing installation and would like to ensure
the db is not modified until I get the new installation running.
Is there any way to restart into a single user mode so that a
pg_dumpall works as the superuser? Or am I limited to a stop, fiddle
with pg_hba.conf, restart, pg_dumpall, etc.?
Thanks,
-To
m
Hi
according to doc (
http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html):
"*If you edit the file on an active system, you will need to signal the
postmaster (using pg_ctl reload or kill -HUP)*"

so, again according to doc (
http://www.postgresql.org/docs/9.2/static/app-pg-ctl.html):
"*reload mode simply sends the postgres process a SIGHUP signal, causing it
to reread its configuration files (postgresql.conf, pg_hba.conf, etc.).
This allows changing of configuration-file options that do not require a
complete restart to take effect*."

One advise:
1. change pg_hba.conf;
2. kill all user sessions (or kindly ask them to disconect);
3. reload configuration;
4. You're ready to updgrade.

Regards,
Bartek
Tom Browder
2012-09-21 15:03:06 UTC
Permalink
Post by Bartosz Dmytrak
Post by Tom Browder
I want to upgrade my existing installation and would like to ensure
the db is not modified until I get the new installation running.
Is there any way to restart into a single user mode so that a
pg_dumpall works as the superuser? Or am I limited to a stop, fiddle
with pg_hba.conf, restart, pg_dumpall, etc.?
Thanks,
-To
m
Hi
according to doc
"If you edit the file on an active system, you will need to signal the
postmaster (using pg_ctl reload or kill -HUP)"
so, again according to doc
"reload mode simply sends the postgres process a SIGHUP signal, causing it
to reread its configuration files (postgresql.conf, pg_hba.conf, etc.). This
allows changing of configuration-file options that do not require a complete
restart to take effect."
1. change pg_hba.conf;
2. kill all user sessions (or kindly ask them to disconect);
3. reload configuration;
4. You're ready to updgrade.
Thanks, Bartek, that's what I was afraid of.

It would be nice to have such a postgres mode though for just such
things as an upgrade.

Best,

-Thanks
--
Sent via pgsql-novice mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Josh Kupershmidt
2012-09-21 17:42:39 UTC
Permalink
Post by Tom Browder
It would be nice to have such a postgres mode though for just such
things as an upgrade.
Exactly such a feature, for launching a standalone backend for pg_dump
or other clients to talk to without worrying about other clients
interfering, is being discussed for 9.3:
http://archives.postgresql.org/message-id/12511.1346631791%40sss.pgh.pa.us

Josh
--
Sent via pgsql-novice mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Tom Browder
2012-09-21 18:04:27 UTC
Permalink
Post by Josh Kupershmidt
Post by Tom Browder
It would be nice to have such a postgres mode though for just such
things as an upgrade.
Exactly such a feature, for launching a standalone backend for pg_dump
or other clients to talk to without worrying about other clients
http://archives.postgresql.org/message-id/12511.1346631791%40sss.pgh.pa.us
Thanks, Josh, interesting link!

Best,

-Tom
--
Sent via pgsql-novice mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Loading...