server closed the connection unexpectedly during upgrade
Hi all,
Thank you for your explain for previous question. But I met another error log when running pg_upgrade check from PostgreSQL 8.3 to PostgreSQL 9.4.5:
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is a superuser ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for invalid "name" user columns connection to database failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
This issue don't reproduces regularly on windows Server 2012. The error log only reproduces in a few cases, but I need to fix this issue. Can you tell me the reasons for this error.
Best Regards,
Leo
-----Original Message-----
From: Michael Paquier [mailto:michael.paquier@gmail.com]
Sent: 2015年12月16日 14:28
To: Yang, Leo
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] "pg_upgrade" cannot write to log file pg_upgrade_internal.log
On Tue, Dec 15, 2015 at 6:54 PM, Yang, Leo <leo.yang@hp.com> wrote:
I run “pg_upgrade -xx” fromPostgreSQL8.3 to PostgreSQL9.4.5 on window
server 2008. It will show some wrong information:cannot write to log file pg_upgrade_internal.log
Failure, exiting.
It seems that the upgrade can be successful on window 7. It seems to
be a permissions problem. I get some information about restricting
privileges from source code, and I find the changes “Run pg_upgrade
and pg_resetxlog with restricted privileges on Windows, so that they
don't fail when run by an administrator (refer to
http://www.postgresql.org/docs/9.4/static/release-9-4-2.html )” for
release 9.4.2. Why did you do this?
The original commit regarding the use of restricted permissions is that:
commit: 2366761bf9eb8e9aa3820b9f3491bcfc48b8188f
author: Andrew Dunstan <andrew@dunslane.net>
date: Mon, 30 Mar 2015 17:16:57 -0400
Run pg_upgrade and pg_resetxlog with restricted token on Windows
And that's a problem that has been discussed here to correct the fact that pg_upgrade cannot run with a user that has administrator rights on Windows:
/messages/by-id/CAEB4t-NpXGiP5Bqvv3P+d+x=V4BqE+Awg+G7ennBn8icPXep_g@mail.gmail.com
Note that pg_upgrade_internal.log gets opened *before* the restricted token is taken for the process running pg_upgrade when the options are parsed, so it seems hard to believe that your problem and this fix are related.
How can I solve this problem? I hope you can help me.
I think that you should first check if the user under which you are running the upgrade has sufficient permissions to write those log files. As far as I can see, there is nothing to blame from the code.
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
On Wed, Dec 16, 2015 at 4:34 PM, Yang, Leo <leo.yang@hp.com> wrote:
Hi all,
Thank you for your explain for previous question. But I met another error log when running pg_upgrade check from PostgreSQL 8.3 to PostgreSQL 9.4.5:
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is a superuser ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for invalid "name" user columns connection to database failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
This issue don't reproduces regularly on windows Server 2012. The error log only reproduces in a few cases, but I need to fix this issue. Can you tell me the reasons for this error.
There is no way to know what actually happened without the server
logs, that's where the problem visibly happened..
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
But the issue not reproducing regularly can affect our upgrade project. The attached log files shows log error. Sometimes the issue reproduces when run pg_upgrade check from PostgreSQL 8.3 to PostgreSQL 9.4.5, but it will succeed sometimes.
Regards,
Leo
-----Original Message-----
From: Michael Paquier [mailto:michael.paquier@gmail.com]
Sent: 2015年12月16日 15:58
To: Yang, Leo
Cc: pgsql-bugs@postgresql.org
Subject: Re: server closed the connection unexpectedly during upgrade
On Wed, Dec 16, 2015 at 4:34 PM, Yang, Leo <leo.yang@hp.com> wrote:
Hi all,
Thank you for your explain for previous question. But I met another error log when running pg_upgrade check from PostgreSQL 8.3 to PostgreSQL 9.4.5:
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is a superuser ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for invalid "name" user columns connection to database failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
This issue don't reproduces regularly on windows Server 2012. The error log only reproduces in a few cases, but I need to fix this issue. Can you tell me the reasons for this error.
There is no way to know what actually happened without the server logs, that's where the problem visibly happened..
--
Michael