Re:Upgrading a PostgreSQL Cluster Documentation

Started by PG Bug reporting formover 7 years ago2 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/upgrading.html
Description:

https://www.postgresql.org/docs/10/upgrading.html

It would be helpful to make a note for Linux users that you have login
interactively as the postgres user ie. "sudo -u postgres -i" before running
such commands as "pg_dumpall -p 5432 | psql -d postgres -p 5433". Otherwise
you'll receive the template1 error about the user.

Thanks.

#2Bruce Momjian
bruce@momjian.us
In reply to: PG Bug reporting form (#1)
Re: Upgrading a PostgreSQL Cluster Documentation

On Sat, Dec 22, 2018 at 01:26:26PM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/upgrading.html
Description:

https://www.postgresql.org/docs/10/upgrading.html

It would be helpful to make a note for Linux users that you have login
interactively as the postgres user ie. "sudo -u postgres -i" before running
such commands as "pg_dumpall -p 5432 | psql -d postgres -p 5433". Otherwise
you'll receive the template1 error about the user.

Uh, you can do:

pg_dumpall -U postgres -p 5432

which is simpler. The point is that the database user should be
postgres, not necessarily the operating system user, though that also
works.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +