From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Rich Shepard <rshepard@appl-ecosys.com>
To: pgsql-general@postgresql.org
Subject: Re: Need to fix one more glitch in upgrade to -10.2
Date: Sat, 17 Feb 2018 16:31:33 -0800
Message-ID: <ac08305f-d664-4353-23f6-9e71be6babae@aklaver.com> (raw)
In-Reply-To: <alpine.LNX.2.20.1802171551100.19982@salmo.appl-ecosys.com>
References: <alpine.LNX.2.20.1802171424460.19982@salmo.appl-ecosys.com>
<b9a2398b-9d62-97fb-2c4e-9b899bba5cd6@aklaver.com>
<alpine.LNX.2.20.1802171551100.19982@salmo.appl-ecosys.com>
On 02/17/2018 03:59 PM, Rich Shepard wrote:
> On Sat, 17 Feb 2018, Adrian Klaver wrote:
>
>> Did pg_upgrade spit out any warnings/errors?
>
> Adrian,
>
> Yes. The uid and gid were mis-matched and, because of that, the
> data/directory and all its files were owned by group user, not group
> postgres.
>
>> In your previous post you showed:
>> # /etc/rc.postgresql reload
>>
>> yet below shows:
>>
>> /etc/rc.d/rc.postgresql
>
> No, the first left off the rc.d/ directory.
>
>> Cut and paste error or not?
>>
>> So are env variables set correctly?
>>
>> Your ps ax output showed a Postgres instance running:
>>
>> postgres -D /var/lib/pgsql/10.2/data
>
> Well, I had 'killall postgres' and the server shut down. Don't know why
> that was displayed.
>
>> Do you know what port it is using and try to connect to it?
>
> The default: /tmp/.s.PGSQL.5432. Everything's shut down now. So I try:
>
> [root@salmo /etc/rc.d]# killall postgres
> [root@salmo /etc/rc.d]# ./rc.postgresql start
> Could not find 'postgres' binary. Maybe PostgreSQL is not installed
> properly?
>
> Yet,
>
> # ll /usr/bin/postgres lrwxrwxrwx 1 root root 35 Feb 17 09:30
> /usr/bin/postgres -> ../lib/postgresql/10.2/bin/postgres*
From a previous post:
POSTGRES=/usr/lib${LIBDIRSUFFIX}/@PRGNAM@/$PG_VERSION/bin/postgres
From here:
http://slackbuilds.org/slackbuilds/14.1/system/postgresql/postgresql.SlackBuild
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686 -DLINUX_OOM_SCORE_ADJ=0"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686 -DLINUX_OOM_SCORE_ADJ=0"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -DLINUX_OOM_SCORE_ADJ=0"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2 -DLINUX_OOM_SCORE_ADJ=0"
LIBDIRSUFFIX=""
fi
So are you on 64bit system? Because then?:
/usr/bin/postgres -> ../lib/postgresql/10.2/bin/postgres*
would be:
/usr/bin/postgres -> ../lib64/postgresql/10.2/bin/postgres*
You could also try using pg_ctl to start the server directly:
https://www.postgresql.org/docs/10/static/app-pg-ctl.html
Just to prove that the install is good.
>
> Hence, my confustion.
>
> Rich
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, rshepard@appl-ecosys.com
Subject: Re: Need to fix one more glitch in upgrade to -10.2
In-Reply-To: <ac08305f-d664-4353-23f6-9e71be6babae@aklaver.com>
References: <alpine.LNX.2.20.1802171424460.19982@salmo.appl-ecosys.com> <b9a2398b-9d62-97fb-2c4e-9b899bba5cd6@aklaver.com> <alpine.LNX.2.20.1802171551100.19982@salmo.appl-ecosys.com> <ac08305f-d664-4353-23f6-9e71be6babae@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox