Error while upgrading from 8.4 to 9.3

Started by Leonardo M. Raméalmost 12 years ago11 messagesgeneral
Jump to latest
#1Leonardo M. Ramé
l.rame@griensu.com

Hi, we are trying to upgrade from 8.4 to 9.3, but at the end of the
process we've got the error:

command: "/usr/lib/postgresql/9.3/bin/pg_resetxlog" -o 2429057 "/mnt/datos/datos_9.3/main" >> "pg_upgrade_utility.log" 2>&1
pg_resetxlog: lock file «postmaster.pid» exists
Is a server running? If not, delete the lock file and try again.

Our setup is this:
Server: Ubuntu 12.04 – 32 bits
Clusters: Postgresql 8.4 y Postgresql 9.3

The steps we followed are:

1) pg_upgrade using –-check result Ok.
2) pg_upgrade without --check

Everything went ok, data directory was copied without problems.

At the end, we got the error I mentioned at the beggining of this email.

P.S.: pg_upgrade_utility.log attached.

Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877

Attachments:

pg_upgrade_utility.logtext/plain; charset=iso-8859-1Download
#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Leonardo M. Ramé (#1)
Re: Error while upgrading from 8.4 to 9.3

On 05/28/2014 06:19 AM, Leonardo M. Ram� wrote:

Hi, we are trying to upgrade from 8.4 to 9.3, but at the end of the
process we've got the error:

command: "/usr/lib/postgresql/9.3/bin/pg_resetxlog" -o 2429057 "/mnt/datos/datos_9.3/main" >> "pg_upgrade_utility.log" 2>&1
pg_resetxlog: lock file �postmaster.pid� exists
Is a server running? If not, delete the lock file and try again.

Our setup is this:
Server: Ubuntu 12.04 � 32 bits
Clusters: Postgresql 8.4 y Postgresql 9.3

The steps we followed are:

1) pg_upgrade using �-check result Ok.
2) pg_upgrade without --check

Can you show us the complete command with arguments for both 1 & 2 above?

Everything went ok, data directory was copied without problems.

At the end, we got the error I mentioned at the beggining of this email.

P.S.: pg_upgrade_utility.log attached.

Regards,

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#3Claudio Biasatti
c.biasatti@griensu.com
In reply to: Adrian Klaver (#2)
Re: Error while upgrading from 8.4 to 9.3

with check

/usr/lib/postgresql/9.3/bin/pg_upgrade --check -b
/usr/lib/postgresql/8.4/bin/ -B /usr/lib/postgresql/9.3/bin/ -d
/mnt/datos/ -D /mnt/datos/datos_9.3/main/ -o ' -c
config_file=/etc/postgresql/8.4/main/postgresql.conf' -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf'

without check

/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/8.4/bin/ -B
/usr/lib/postgresql/9.3/bin/ -d /mnt/datos/ -D /mnt/datos/datos_9.3/main/ -o
' -c config_file=/etc/postgresql/8.4/main/postgresql.conf' -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf'

----Mensaje original-----
From: Adrian Klaver
Sent: Wednesday, May 28, 2014 11:15 AM
To: "Leonardo M. Ram�" ; PostgreSql-general
Cc: c.biasatti@griensu.com
Subject: Re: [GENERAL] Error while upgrading from 8.4 to 9.3

On 05/28/2014 06:19 AM, Leonardo M. Ram� wrote:

Hi, we are trying to upgrade from 8.4 to 9.3, but at the end of the
process we've got the error:

command: "/usr/lib/postgresql/9.3/bin/pg_resetxlog" -o 2429057
"/mnt/datos/datos_9.3/main" >> "pg_upgrade_utility.log" 2>&1
pg_resetxlog: lock file �postmaster.pid� exists
Is a server running? If not, delete the lock file and try again.

Our setup is this:
Server: Ubuntu 12.04 � 32 bits
Clusters: Postgresql 8.4 y Postgresql 9.3

The steps we followed are:

1) pg_upgrade using �-check result Ok.
2) pg_upgrade without --check

Can you show us the complete command with arguments for both 1 & 2 above?

Everything went ok, data directory was copied without problems.

At the end, we got the error I mentioned at the beggining of this email.

P.S.: pg_upgrade_utility.log attached.

Regards,

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#4Bruce Momjian
bruce@momjian.us
In reply to: Leonardo M. Ramé (#1)
Re: Error while upgrading from 8.4 to 9.3

On Wed, May 28, 2014 at 10:19:24AM -0300, Leonardo M. Ramé wrote:

Hi, we are trying to upgrade from 8.4 to 9.3, but at the end of the
process we've got the error:

command: "/usr/lib/postgresql/9.3/bin/pg_resetxlog" -o 2429057 "/mnt/datos/datos_9.3/main" >> "pg_upgrade_utility.log" 2>&1
pg_resetxlog: lock file «postmaster.pid» exists
Is a server running? If not, delete the lock file and try again.

Our setup is this:
Server: Ubuntu 12.04 – 32 bits
Clusters: Postgresql 8.4 y Postgresql 9.3

The steps we followed are:

1) pg_upgrade using –-check result Ok.
2) pg_upgrade without --check

Everything went ok, data directory was copied without problems.

At the end, we got the error I mentioned at the beggining of this email.

P.S.: pg_upgrade_utility.log attached.

I am not sure what would cause this. At the point where you get this
error, pg_upgrade has already started and stopped the old and new
servers, so I am not sure why the pid file would exist. Is it possible
the file copy was so fast that the new cluster had not fully shut down?
Seems odd because 9.3 has code to detect that the server is fully down.

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

+ Everyone has their own god. +

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

#5Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Claudio Biasatti (#3)
Re: Error while upgrading from 8.4 to 9.3

On 05/28/2014 07:24 AM, Claudio Biasatti wrote:

with check

/usr/lib/postgresql/9.3/bin/pg_upgrade --check -b
/usr/lib/postgresql/8.4/bin/ -B /usr/lib/postgresql/9.3/bin/ -d
/mnt/datos/ -D /mnt/datos/datos_9.3/main/ -o ' -c
config_file=/etc/postgresql/8.4/main/postgresql.conf' -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf'

without check

/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/8.4/bin/
-B /usr/lib/postgresql/9.3/bin/ -d /mnt/datos/ -D
/mnt/datos/datos_9.3/main/ -o ' -c
config_file=/etc/postgresql/8.4/main/postgresql.conf' -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf'

So what are the port numbers in the conf files.

I have not used that option, but is there a chance you are double
starting the servers?

Starting an instance for each using the port numbers from the conf files
and then pg_upgrade is starting them on 50432.

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#6Leonardo M. Ramé
l.rame@griensu.com
In reply to: Adrian Klaver (#5)
Re: Error while upgrading from 8.4 to 9.3

On 2014-05-28 07:39:33 -0700, Adrian Klaver wrote:

On 05/28/2014 07:24 AM, Claudio Biasatti wrote:

with check

/usr/lib/postgresql/9.3/bin/pg_upgrade --check -b
/usr/lib/postgresql/8.4/bin/ -B /usr/lib/postgresql/9.3/bin/ -d
/mnt/datos/ -D /mnt/datos/datos_9.3/main/ -o ' -c
config_file=/etc/postgresql/8.4/main/postgresql.conf' -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf'

without check

/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/8.4/bin/
-B /usr/lib/postgresql/9.3/bin/ -d /mnt/datos/ -D
/mnt/datos/datos_9.3/main/ -o ' -c
config_file=/etc/postgresql/8.4/main/postgresql.conf' -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf'

So what are the port numbers in the conf files.

I have not used that option, but is there a chance you are double
starting the servers?

Starting an instance for each using the port numbers from the conf
files and then pg_upgrade is starting them on 50432.

Sorry guys, one of the in-site tech support guys started the postgresql
service while we were trying to do the upgrade. Looks like this was the
cause of the failure.

Regards,

--
Leonardo M. Ram�
Medical IT - Griensu S.A.
Av. Col�n 636 - Piso 8 Of. A
X5000EPT -- C�rdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877

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

#7Bruce Momjian
bruce@momjian.us
In reply to: Leonardo M. Ramé (#6)
Re: Error while upgrading from 8.4 to 9.3

On Wed, May 28, 2014 at 12:05:54PM -0300, Leonardo M. Ram� wrote:

On 2014-05-28 07:39:33 -0700, Adrian Klaver wrote:

On 05/28/2014 07:24 AM, Claudio Biasatti wrote:

with check

/usr/lib/postgresql/9.3/bin/pg_upgrade --check -b
/usr/lib/postgresql/8.4/bin/ -B /usr/lib/postgresql/9.3/bin/ -d
/mnt/datos/ -D /mnt/datos/datos_9.3/main/ -o ' -c
config_file=/etc/postgresql/8.4/main/postgresql.conf' -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf'

without check

/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/8.4/bin/
-B /usr/lib/postgresql/9.3/bin/ -d /mnt/datos/ -D
/mnt/datos/datos_9.3/main/ -o ' -c
config_file=/etc/postgresql/8.4/main/postgresql.conf' -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf'

So what are the port numbers in the conf files.

I have not used that option, but is there a chance you are double
starting the servers?

Starting an instance for each using the port numbers from the conf
files and then pg_upgrade is starting them on 50432.

Sorry guys, one of the in-site tech support guys started the postgresql
service while we were trying to do the upgrade. Looks like this was the
cause of the failure.

OK. We block users from connecting to our own postmaster by placing the
socket files in the current directory, but that doesn't prevent someone
from starting the server using the default configuration. Not sure how
we could block that.

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

+ Everyone has their own god. +

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

#8Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Bruce Momjian (#7)
Re: Error while upgrading from 8.4 to 9.3

On 05/28/2014 08:15 AM, Bruce Momjian wrote:

On Wed, May 28, 2014 at 12:05:54PM -0300, Leonardo M. Ram� wrote:

Sorry guys, one of the in-site tech support guys started the postgresql
service while we were trying to do the upgrade. Looks like this was the
cause of the failure.

OK. We block users from connecting to our own postmaster by placing the
socket files in the current directory, but that doesn't prevent someone
from starting the server using the default configuration. Not sure how
we could block that.

So for my edification, does that mean -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf' could cause a
problem or that starting Postgres outside pg_upgrade could cause a
problem, or both.

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#9Bruce Momjian
bruce@momjian.us
In reply to: Adrian Klaver (#8)
Re: Error while upgrading from 8.4 to 9.3

On Wed, May 28, 2014 at 04:56:53PM -0700, Adrian Klaver wrote:

On 05/28/2014 08:15 AM, Bruce Momjian wrote:

On Wed, May 28, 2014 at 12:05:54PM -0300, Leonardo M. Ram� wrote:

Sorry guys, one of the in-site tech support guys started the postgresql
service while we were trying to do the upgrade. Looks like this was the
cause of the failure.

OK. We block users from connecting to our own postmaster by placing the
socket files in the current directory, but that doesn't prevent someone
from starting the server using the default configuration. Not sure how
we could block that.

So for my edification, does that mean -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf' could cause a
problem or that starting Postgres outside pg_upgrade could cause a
problem, or both.

Starting Postgres outside pg_upgrade would _certainly_ cause a problem.

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

+ Everyone has their own god. +

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

#10Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#9)
Re: Error while upgrading from 8.4 to 9.3

Bruce Momjian <bruce@momjian.us> writes:

On Wed, May 28, 2014 at 04:56:53PM -0700, Adrian Klaver wrote:

So for my edification, does that mean -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf' could cause a
problem or that starting Postgres outside pg_upgrade could cause a
problem, or both.

Starting Postgres outside pg_upgrade would _certainly_ cause a problem.

It appeared to me that it was failing safely, ie, once somebody had
started a conflicting postmaster, pg_upgrade's attempt to start one
failed without damage.

regards, tom lane

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

#11Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#10)
Re: Error while upgrading from 8.4 to 9.3

On Wed, May 28, 2014 at 11:28:47PM -0400, Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

On Wed, May 28, 2014 at 04:56:53PM -0700, Adrian Klaver wrote:

So for my edification, does that mean -O ' -c
config_file=/etc/postgresql/9.3/main/postgresql.conf' could cause a
problem or that starting Postgres outside pg_upgrade could cause a
problem, or both.

Starting Postgres outside pg_upgrade would _certainly_ cause a problem.

It appeared to me that it was failing safely, ie, once somebody had
started a conflicting postmaster, pg_upgrade's attempt to start one
failed without damage.

Yes, it was. The thing we can't block is an administrator starting the
old or new postmaster while pg_upgrade isn't using it, then shutting it
down before pg_upgrade needs it --- seems unlikely though.

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

+ Everyone has their own god. +

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