Thread: Help with PostgreSQL Upgrade

Help with PostgreSQL Upgrade

From
SMITH Matt
Date:

Classified as: {OPEN}

Hi,

 

We currently have a database hosted in pg 13.1 (with PostGIS 3.1.1) and we are keen to move to pg 15.3 (with PostGIS 3.3.3) all running on Windows 10.

 

I installed pg15 without issue. The pgAdmin 4 utility (bundled with postgres 15) connects okay.

 

Then I used the pg_upgrade.exe utility to successfully migrate our db to the new pg15 server.

 

pg_upgrade.exe --old-datadir "D:\PostgreSQL\13\data" --new-datadir "D:\PostgreSQL\15\data" --old-bindir "C:\Program Files\PostgreSQL\13\bin" --new-bindir "C:\Program Files\PostgreSQL\15\bin" --username=super_user

 

Our apps and services seem happy with the new pg15 database.

 

However, using the pg_upgrade.exe utility to migrate our db has resulted in some sort of issue whereby pgAdmin (the version bundled with 15) will no longer access our server.

 

Starting the newer pgAdmin results a timeout error on the UI and the following errors in the pgAdmin log file

 

2023-09-12 15:04:03,159: WARNING    werkzeug:    WebSocket transport not available. Install simple-websocket for improved performance.

2023-09-12 15:04:03,159: WARNING    werkzeug:    Werkzeug appears to be used in a production deployment. Consider switching to a production web server instead.

2023-09-12 15:04:12,182: ERROR    pgadmin:    Exception when checking for update

Traceback (most recent call last):

  File "urllib\request.py", line 1348, in do_open

  File "http\client.py", line 1282, in request

  File "http\client.py", line 1328, in _send_request

  File "http\client.py", line 1277, in endheaders

  File "http\client.py", line 1037, in _send_output

  File "http\client.py", line 975, in send

  File "http\client.py", line 1447, in connect

  File "http\client.py", line 941, in connect

  File "socket.py", line 845, in create_connection

  File "socket.py", line 833, in create_connection

TimeoutError: timed out

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):

  File "C:\Program Files\pgAdmin 4\v7\web\pgadmin\browser\__init__.py", line 435, in check_browser_upgrade

    response = urlopen(url, data, 5)

  File "urllib\request.py", line 216, in urlopen

  File "urllib\request.py", line 519, in open

  File "urllib\request.py", line 536, in _open

  File "urllib\request.py", line 496, in _call_chain

  File "urllib\request.py", line 1391, in https_open

  File "urllib\request.py", line 1351, in do_open

urllib.error.URLError: <urlopen error timed out>

2023-09-12 15:04:46,062: ERROR    pgadmin:    Could not connect to server(#3) - 'PostgreSQL 15'.

Error: connection timeout expired

 

I have installed the latest pgAdmin4 (v7.6) but this gives the same error.

 

Any suggestions as to a solution would be appreciated.

 

Regards,

 

Matt

 

{OPEN}

The information contained in this e-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. If you have received this e-mail in error, please inform the originator immediately and delete it and all copies from your system.

Thales UK Limited. A company registered in England and Wales. Registered Office: 350 Longwater Avenue, Green Park, Reading, Berks RG2 6GF. Registered Number: 868273

Please consider the environment before printing a hard copy of this e-mail.

Re: Help with PostgreSQL Upgrade

From
Daniel Gustafsson
Date:
> On 14 Sep 2023, at 12:50, SMITH Matt <Matt.SMITH@uk.thalesgroup.com> wrote:
>
> Starting the newer pgAdmin results a timeout error on the UI and the following errors in the pgAdmin log file

Are you absolutely sure you are connecting to the right instance with the right
connection parameters (hostname, port, TLS settings, etc)?  If you apps and
other clients like psql can connect to the database it seems unlikely that a
pgAdmin wouldn't.  It has a smell of trying to connect somewhere where nothing
is listening.

--
Daniel Gustafsson




Re: Help with PostgreSQL Upgrade

From
Adrian Klaver
Date:
On 9/14/23 03:50, SMITH Matt wrote:
> Classified as: {OPEN}
> 
> 
> Hi,
> 
> We currently have a database hosted in pg 13.1 (with PostGIS 3.1.1) and 
> we are keen to move to pg 15.3 (with PostGIS 3.3.3) all running on 
> Windows 10.
> 
> I installed pg15 without issue. The pgAdmin 4 utility (bundled with 
> postgres 15) connects okay.
> 

> Our apps and services seem happy with the new pg15 database.
> 
> However, using the pg_upgrade.exe utility to migrate our db has resulted 
> in some sort of issue whereby pgAdmin (the version bundled with 15) will 
> no longer access our server.
> 

> 2023-09-12 15:04:12,182: ERROR    pgadmin:    Exception when checking 
> for update

This seems to an internal pgAdmin4 issue with what looks to be it's 
internal update check trying to call home. Is there a firewall that 
prevents that on your network?

You might have more luck with getting a complete answer on the 
pgAdmin-support list:

https://www.postgresql.org/list/pgadmin-support/

-- 
Adrian Klaver
adrian.klaver@aklaver.com




RE: Help with PostgreSQL Upgrade

From
SMITH Matt
Date:
Classified as: {OPEN}

Hi,

Thanks for the messages. It looks like the problem lay in spurious "junk" on the path environment variable.
Tidying that up results in pgAdmin being perfectly happy post migration.

Matt


{OPEN}

-----Original Message-----
From: Adrian Klaver <adrian.klaver@aklaver.com>
Sent: 14 September 2023 16:25
To: SMITH Matt <Matt.SMITH@uk.thalesgroup.com>; pgsql-general@postgresql.org
Subject: [EXTERNAL EMAIL] Re: Help with PostgreSQL Upgrade

On 9/14/23 03:50, SMITH Matt wrote:
> Classified as: {OPEN}
>
>
> Hi,
>
> We currently have a database hosted in pg 13.1 (with PostGIS 3.1.1)
> and we are keen to move to pg 15.3 (with PostGIS 3.3.3) all running on
> Windows 10.
>
> I installed pg15 without issue. The pgAdmin 4 utility (bundled with
> postgres 15) connects okay.
>

> Our apps and services seem happy with the new pg15 database.
>
> However, using the pg_upgrade.exe utility to migrate our db has
> resulted in some sort of issue whereby pgAdmin (the version bundled
> with 15) will no longer access our server.
>

> 2023-09-12 15:04:12,182: ERROR    pgadmin:    Exception when checking
> for update

This seems to an internal pgAdmin4 issue with what looks to be it's internal update check trying to call home. Is there
afirewall that prevents that on your network?
 

You might have more luck with getting a complete answer on the pgAdmin-support list:

https://www.postgresql.org/list/pgadmin-support/

--
Adrian Klaver
adrian.klaver@aklaver.com
The information contained in this e-mail is confidential. It is intended only for the stated addressee(s) and access to
itby any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any
otherway use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. If you have
receivedthis e-mail in error, please inform the originator immediately and delete it and all copies from your system.
 

Thales UK Limited. A company registered in England and Wales. Registered Office: 350 Longwater Avenue, Green Park,
Reading,Berks RG2 6GF. Registered Number: 868273
 

Please consider the environment before printing a hard copy of this e-mail.