Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1faePu-0005Dk-2q for pgadmin-support@arkaria.postgresql.org; Wed, 04 Jul 2018 09:49:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1faePq-00011I-De for pgadmin-support@arkaria.postgresql.org; Wed, 04 Jul 2018 09:49:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1faePq-00011B-0B for pgadmin-support@lists.postgresql.org; Wed, 04 Jul 2018 09:49:38 +0000 Received: from mail.bertschi.com ([194.147.70.69]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1faePl-0002aD-Q7 for pgadmin-support@postgresql.org; Wed, 04 Jul 2018 09:49:36 +0000 Received: from mail.bertschi.com ([172.20.32.161]) by mail.bertschi.com with ESMTP id w649nTZk017852-w649nTZm017852 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=CAFAIL) for ; Wed, 4 Jul 2018 11:49:30 +0200 Received: from dueexs11.bertschi.domain (172.20.32.161) by dueexs11.bertschi.domain (172.20.32.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 4 Jul 2018 11:49:29 +0200 Received: from dueexs11.bertschi.domain ([fe80::e4c2:7a17:4a03:74f5]) by dueexs11.bertschi.domain ([fe80::e4c2:7a17:4a03:74f5%14]) with mapi id 15.01.1261.035; Wed, 4 Jul 2018 11:49:29 +0200 From: Boblitz John To: "pgadmin-support@postgresql.org" Subject: Unable to Connect to DB Instance Thread-Topic: Unable to Connect to DB Instance Thread-Index: AdQTejBVULp2/Uy8T82feBz5yIoplw== Date: Wed, 4 Jul 2018 09:49:29 +0000 Message-ID: Accept-Language: en-US, de-CH Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.250.230] Content-Type: multipart/alternative; boundary="_000_d51ff9e4d1604541a7bbe635cbc97367bertschicom_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_d51ff9e4d1604541a7bbe635cbc97367bertschicom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Good Morning, Beginning yesterday morning, users have been unable to fully connect to our= DB Instance. 1. At the time of the initial report - I was connected to the DB via = pgAdmin and could perform queries without problem. 2. Users reported messages similar to "could not open file "global/11= 801": No such file or directory" 3. At that time, connection logging was turned off and there were no = messages in the log files. 4. As this is a development environment, I turned logging on in the c= onfig and restarted the DB 5. After restart, neither I, nor the Users could fully reconnect. 6. I have performed a SYS Level backup (tar of the whole postgres dir= ectory tree) 7. I cannot perform a DB level Backup (same errors occur) System Details Linux Debian 7.11 Postgres 9.1 (9.1.24lts-0+d) It appears that we can connect to the DB Server itself as I get "connection= received" and "connection authorized" - but when trying to access the DB i= tself, several errors are raised (see below). I am assuming that some internals are no longer consistent - the file "glob= al/11801" for instance really does not exist on the system. Questions: 1. Is there any way to recover from this (backup is unfortunately rat= her old) 2. What are possible causes? I'd like to prevent this from happening= on my production servers. ** I am aware that we are on older releases, and yes, we plan to migrate to= more current releases "soon" (tm) ... Thanks in advance. John Boblitz Exceprt from Log: 2018-07-04 09:15:13 CEST 192.168.250.50(28559) [unknown]LOG: connection re= ceived: host=3D192.168.250.50 port=3D28559 2018-07-04 09:15:14 CEST 192.168.250.50(28559) postgresLOG: connection aut= horized: user=3Ddbadmin database=3Dpostgres 2018-07-04 09:15:14 CEST 192.168.250.50(28559) postgresERROR: could not op= en file "global/11801": No such file or directory 2018-07-04 09:15:14 CEST 192.168.250.50(28559) postgresSTATEMENT: SELECT u= secreatedb, usesuper, CASE WHEN usesuper THEN pg_postmaster_start_time() EL= SE NULL END as upsince, CASE WHEN usesuper THEN pg_conf_load_time() ELSE NU= LL END as confloadedsince, CASE WHEN usesuper THEN pg_is_in_recovery() ELSE= NULL END as inrecovery, CASE WHEN usesuper THEN pg_last_xlog_receive_locat= ion() ELSE NULL END as receiveloc, CASE WHEN usesuper THEN pg_last_xlog_rep= lay_location() ELSE NULL END as replayloc, CASE WHEN usesuper THEN pg_last_= xact_replay_timestamp() ELSE NULL END as replay_timestamp, CASE WHEN usesup= er AND pg_is_in_recovery() THEN pg_is_xlog_replay_paused() ELSE NULL END as= isreplaypaused FROM pg_user WHERE usename=3Dcurrent_user 2018-07-04 09:15:19 CEST 192.168.250.50(28559) postgresERROR: could not op= en file "global/11801": No such file or directory 2018-07-04 09:15:19 CEST 192.168.250.50(28559) postgresSTATEMENT: SELECT r= olcreaterole, rolcreatedb FROM pg_roles WHERE rolname =3D current_user; 2018-07-04 09:15:22 CEST 192.168.250.50(28561) [unknown]LOG: connection re= ceived: host=3D192.168.250.50 port=3D28561 2018-07-04 09:15:22 CEST 192.168.250.50(28561) g11BaseLOG: connection auth= orized: user=3Ddbadmin database=3Dg11Base 2018-07-04 09:15:23 CEST 192.168.250.50(28561) g11BaseERROR: could not ope= n file "pg_tblspc/24579/PG_9.1_201105231/24580/11866": No such file or dire= ctory 2018-07-04 09:15:23 CEST 192.168.250.50(28561) g11BaseSTATEMENT: SELECT CA= SE WHEN nspname LIKE E'pg\\_temp\\_%' THEN 1 WHEN (nspname LIKE E'pg\\_%') THEN 0 ELSE 3 END AS nsptyp, nsp.nspname, nsp.oid, pg_get_userbyid(nspowner) AS n= amespaceowner, nspacl, description, has_schema_privilege(nsp.oid, 'CR= EATE') as cancreate, (SELECT array_agg(label) FROM pg_seclabels sl1 WHERE sl1.ob= joid=3Dnsp.oid) AS labels, (SELECT array_agg(provider) FROM pg_seclabels sl2 WHERE sl2= .objoid=3Dnsp.oid) AS providers FROM pg_namespace nsp LEFT OUTER JOIN pg_description des ON (des.objoid=3Dnsp.o= id AND des.classoid=3D'pg_namespace'::regclass) WHERE NOT ((nspname =3D 'pg_catalog' AND EXISTS (SELECT 1 F= ROM pg_class WHERE relname =3D 'pg_class' AND relnamespace =3D nsp.oid LIMI= T 1)) OR (nspname =3D 'pgagent' AND EXISTS (SELECT 1 FROM pg_class W= HERE relname =3D 'pga_job' AND relnamespace =3D nsp.oid LIMIT 1)) OR (nspname =3D 'information_schema' AND EXISTS (SELECT 1 FROM= pg_class WHERE relname =3D 'tables' AND relnamespace =3D nsp.oid LIMIT 1))= OR (nspname LIKE '_%' AND EXISTS (SELECT 1 FROM pg_proc WHERE = proname=3D'slonyversion' AND pronamespace =3D nsp.oid LIMIT 1)) ) AND nspname NOT LIKE E'pg\\_temp\\_%'AND nspname NOT LIK= E E'pg\\_toast_temp\\_%' ORDER BY 1, nspname --_000_d51ff9e4d1604541a7bbe635cbc97367bertschicom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Good Morning,

 

Beginning yesterday morning, users have been unable = to fully connect to our DB Instance.

 

1.     &= nbsp; At the time of the initial report – I was con= nected to the DB via pgAdmin and could perform queries without problem.

2.     &= nbsp; Users reported messages similar to “could not= open file "global/11801": No such file or directory”<= /o:p>

3.     &= nbsp; At that time, connection logging was turned off and= there were no messages in the log files.

4.     &= nbsp; As this is a development environment, I turned logg= ing on in the config and restarted the DB

5.     &= nbsp; After restart, neither I, nor the Users could fully= reconnect.

6.     &= nbsp; I have performed a SYS Level backup (tar of the who= le postgres directory tree)

7.     &= nbsp; I cannot perform a DB level Backup (same errors occ= ur)

 

System Details

        &nbs= p;       Linux Debian    =   7.11

        &nbs= p;       Postgres     &nb= sp;        9.1 (9.1.24lts-0+d)<= /o:p>

 

It appears that we can connect to the DB Server itse= lf as I get “connection received” and “connection authori= zed” – but when trying to access the DB itself, several errors = are raised (see below).

I am assuming that some internals are no longer cons= istent – the file “global/11801” for instance really does= not exist on the system.

 

Questions:

 

1.     &= nbsp; Is there any way to recover from this (backup is un= fortunately rather old)

2.     &= nbsp; What are possible causes?  I’d like to p= revent this from happening on my production servers.

 

** I am aware that we are on older releases, and yes= , we plan to migrate to more current releases “soon” ™ &#= 8230;

 

 

Thanks in advance.

 

John Boblitz

 

 

Exceprt from Log:

2018-07-04 09:15:13 CEST 192.168.250.50(28559) [unkn= own]LOG:  connection received: host=3D192.168.250.50 port=3D28559=

2018-07-04 09:15:14 CEST 192.168.250.50(28559) postg= resLOG:  connection authorized: user=3Ddbadmin database=3Dpostgres

2018-07-04 09:15:14 CEST 192.168.250.50(28559) postg= resERROR:  could not open file "global/11801": No such file = or directory

2018-07-04 09:15:14 CEST 192.168.250.50(28559) postg= resSTATEMENT:  SELECT usecreatedb, usesuper, CASE WHEN usesuper THEN p= g_postmaster_start_time() ELSE NULL END as upsince, CASE WHEN usesuper THEN= pg_conf_load_time() ELSE NULL END as confloadedsince, CASE WHEN usesuper THEN pg_is_in_recovery() ELSE NULL END as inrecovery, C= ASE WHEN usesuper THEN pg_last_xlog_receive_location() ELSE NULL END as rec= eiveloc, CASE WHEN usesuper THEN pg_last_xlog_replay_location() ELSE NULL E= ND as replayloc, CASE WHEN usesuper THEN pg_last_xact_replay_timestamp() ELSE NULL END as replay_timestamp, CA= SE WHEN usesuper AND pg_is_in_recovery() THEN pg_is_xlog_replay_paused() EL= SE NULL END as isreplaypaused

        &nbs= p;         FROM pg_user WHERE usename=3D= current_user

2018-07-04 09:15:19 CEST 192.168.250.50(28559) postg= resERROR:  could not open file "global/11801": No such file = or directory

2018-07-04 09:15:19 CEST 192.168.250.50(28559) postg= resSTATEMENT:  SELECT rolcreaterole, rolcreatedb FROM pg_roles WHERE r= olname =3D current_user;

2018-07-04 09:15:22 CEST 192.168.250.50(28561) [unkn= own]LOG:  connection received: host=3D192.168.250.50 port=3D28561=

2018-07-04 09:15:22 CEST 192.168.250.50(28561) g11Ba= seLOG:  connection authorized: user=3Ddbadmin database=3Dg11Base<= /o:p>

2018-07-04 09:15:23 CEST 192.168.250.50(28561) g11Ba= seERROR:  could not open file "pg_tblspc/24579/PG_9.1_201105231/2= 4580/11866": No such file or directory

2018-07-04 09:15:23 CEST 192.168.250.50(28561) g11Ba= seSTATEMENT:  SELECT CASE WHEN nspname LIKE E'pg\\_temp\\_%' THEN 1

        &nbs= p;             =       WHEN (nspname LIKE E'pg\\_%') THEN 0

        &nbs= p;             =       ELSE 3 END AS nsptyp,

        &nbs= p;             = nsp.nspname, nsp.oid, pg_get_userbyid(nspowner) AS namespaceowner, nspacl,= description,       has_schema_privilege(nsp.= oid, 'CREATE') as cancreate,

        &nbs= p;       (SELECT array_agg(label) FROM pg_sec= labels sl1 WHERE sl1.objoid=3Dnsp.oid) AS labels,

        &nbs= p;       (SELECT array_agg(provider) FROM pg_= seclabels sl2 WHERE sl2.objoid=3Dnsp.oid) AS providers

        &nbs= p;         FROM pg_namespace nsp

        &nbs= p;         LEFT OUTER JOIN pg_descriptio= n des ON (des.objoid=3Dnsp.oid AND des.classoid=3D'pg_namespace'::regclass)=

        &nbs= p;       WHERE NOT ((nspname =3D 'pg_catalog'= AND EXISTS (SELECT 1 FROM pg_class WHERE relname =3D 'pg_class' AND relnam= espace =3D nsp.oid LIMIT 1)) OR

        &nbs= p;       (nspname =3D 'pgagent' AND EXISTS (S= ELECT 1 FROM pg_class WHERE relname =3D 'pga_job' AND relnamespace =3D nsp.= oid LIMIT 1)) OR

        &nbs= p;       (nspname =3D 'information_schema' AN= D EXISTS (SELECT 1 FROM pg_class WHERE relname =3D 'tables' AND relnamespac= e =3D nsp.oid LIMIT 1)) OR

        &nbs= p;       (nspname LIKE '_%' AND EXISTS (SELEC= T 1 FROM pg_proc WHERE proname=3D'slonyversion' AND pronamespace =3D nsp.oi= d LIMIT 1))

        &nbs= p;       )  AND nspname NOT LIKE E'pg\\_= temp\\_%'AND nspname NOT LIKE E'pg\\_toast_temp\\_%' ORDER BY 1, nspname

--_000_d51ff9e4d1604541a7bbe635cbc97367bertschicom_--