You are not logged in.

#1 2018-03-06 06:11:50

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,372

[SOLVED] Upgrading PostgreSQL, permission trouble

Hi,

I've been trying this upgrading routine:

...
$ /opt/pgsql-9.6//bin/pg_ctl -D /var/lib/postgres/olddata/ start
pg_ctl: could not open PID file "/var/lib/postgres/olddata/postmaster.pid": Permission denied
$ sudo /opt/pgsql-9.6//bin/pg_ctl -D /var/lib/postgres/olddata/ start
pg_ctl: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.

What is required of me?

Last edited by Llama (2018-03-08 09:36:30)

Offline

#2 2018-03-06 06:23:53

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,145

Re: [SOLVED] Upgrading PostgreSQL, permission trouble

You should login (using su or sudo) as the user that owns the server process. Assuming you haven't changed anything, that's the 'postgres' user. Read the whole wiki page you linked, the first part on installation shows how to log in as the appropriate user.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2018-03-06 07:09:10

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,372

Re: [SOLVED] Upgrading PostgreSQL, permission trouble

Thanks! 'postgres' user is indeed there. I'm still in trouble, though. I forgot the password.

The procedure implies the running daemon, but I can't start it, quite naturally.

Last edited by Llama (2018-03-06 07:14:07)

Offline

#4 2018-03-06 14:38:32

eda2z
Member
From: Woodstock, IL
Registered: 2015-04-21
Posts: 26

Re: [SOLVED] Upgrading PostgreSQL, permission trouble

This may be cheating but I always go "through root" to get to my postgres user -- i.e. after a successful "su" just enter "su - postgres" since you are root it will not ask for a password.

Offline

#5 2018-03-08 09:36:00

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,372

Re: [SOLVED] Upgrading PostgreSQL, permission trouble

Good enough for me. Thanks!

Offline

Board footer

Powered by FluxBB