Eine Datenbank nicht mehr sichtbar

Hallo zusammen,

aus irgendeinem Grund wird plötzlich eine Datenbank “central_db” nicht mehr im PgAdmin 4 v3.5 angezeigt. Die Datenbank selbst ist allerdings noch da und scheint auch ohne schwierigkeiten zu funktionieren. Die Anmeldung am PostgreSQL Server erfolgt mit dem user “postgres”, dieser ist / hat SuperUser Rechte. :confused:

Könnt ihr bitte helfen.

Vielen Dank im voraus
muku

$ sudo -u postgres psql -d central_db
could not change directory to "/home/dsmn": Permission denied
psql (9.4.15)
Type "help" for help.

central_db=# \l
                                  List of databases
    Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
------------+----------+----------+-------------+-------------+-----------------------
 central_db | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +
            |          |          |             |             | dwh_etl=c/postgres   +
            |          |          |             |             | central=CTc/postgres
 dma_live   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +
            |          |          |             |             | postgres=CTc/postgres
 postgres   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
            |          |          |             |             | postgres=CTc/postgres
 template1  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | postgres=CTc/postgres+
            |          |          |             |             | =c/postgres
(5 rows)



central_db=# SELECT grantee, privilege_type
FROM information_schema.role_table_grants
WHERE table_name='transaction_billing';
 grantee | privilege_type
---------+----------------
 central | INSERT
 central | SELECT
 central | UPDATE
 central | DELETE
 central | TRUNCATE
 central | REFERENCES
 central | TRIGGER
(7 rows)



central_db=# \dt
                    List of relations
 Schema |             Name             | Type  |  Owner
--------+------------------------------+-------+----------
 public | billing_text                 | table | central
 public | client_organization          | table | central
 public | external_service_call_status | table | postgres
 public | processing_file              | table | central
 public | scoring_log                  | table | central
 public | scoring_log_param            | table | central
 public | scoring_log_slot             | table | central
 public | transaction_billing          | table | central
 public | transaction_billing_movement | table | central
(9 rows)

ist die db via psql -l sichtbar?

kommen Fehler im Log der DB?

Hallo akretschmer,

ja die DB ist über psql -l sichtbar.

$ sudo -u postgres psql -l
                                  List of databases
    Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
------------+----------+----------+-------------+-------------+-----------------------
 central_db | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +
            |          |          |             |             | dwh_etl=c/postgres   +
            |          |          |             |             | central=CTc/postgres
 dma_live   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +
            |          |          |             |             | postgres=CTc/postgres
 postgres   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
            |          |          |             |             | postgres=CTc/postgres
 template1  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | postgres=CTc/postgres+
            |          |          |             |             | =c/postgres
(5 rows)

Logauszug vom Freitag:

< 2018-11-23 11:14:13.329 CET >FATAL:  role "root" does not exist
< 2018-11-23 11:18:39.282 CET >FATAL:  role "root" does not exist
< 2018-11-23 11:20:39.201 CET >LOG:  unexpected EOF on client connection with an open transaction
< 2018-11-23 11:20:39.284 CET >LOG:  unexpected EOF on client connection with an open transaction
< 2018-11-23 11:20:40.319 CET >LOG:  unexpected EOF on client connection with an open transaction
< 2018-11-23 11:20:40.554 CET >LOG:  unexpected EOF on client connection with an open transaction
< 2018-11-23 11:27:09.141 CET >LOG:  unexpected EOF on client connection with an open transaction
< 2018-11-23 11:27:24.295 CET >LOG:  could not send data to client: Connection reset by peer
< 2018-11-23 11:27:24.295 CET >STATEMENT:  COPY public.scoring_log (id, instance_name, uuid, client_ref_id, client_key, customer_group_1, customer_group_2, time_stamp, export_time, dma_product, score_id, data_error, calculation_error, value, traffic_light, score_class, test_class) TO stdout;
< 2018-11-23 11:27:24.295 CET >ERROR:  canceling statement due to user request
< 2018-11-23 11:27:24.295 CET >STATEMENT:  COPY public.scoring_log (id, instance_name, uuid, client_ref_id, client_key, customer_group_1, customer_group_2, time_stamp, export_time, dma_product, score_id, data_error, calculation_error, v$
< 2018-11-23 11:27:24.295 CET >LOG:  could not send data to client: Broken pipe
< 2018-11-23 11:27:24.295 CET >STATEMENT:  COPY public.scoring_log (id, instance_name, uuid, client_ref_id, client_key, customer_group_1, customer_group_2, time_stamp, export_time, dma_product, score_id, data_error, calculation_error, v$
< 2018-11-23 11:27:24.295 CET >FATAL:  connection to client lost
< 2018-11-23 11:27:25.204 CET >ERROR:  canceling statement due to user request
< 2018-11-23 11:27:25.204 CET >STATEMENT:  COPY public.black_list (black_list_id, customer_name, person_id, phone_number, type, file_name_comes_from, insert_date, rollback_date) TO stdout;
< 2018-11-23 11:27:25.206 CET >LOG:  could not receive data from client: Connection reset by peer
< 2018-11-23 11:52:08.020 CET >ERROR:  permission denied for schema public

Viel irritierender finde ich allerdings, dass die DB seit heute Morgen wieder ganz “normal” sichtbar ist. Welche Ursache könnte das haben?

pebkac :wink:

Das glaube ich weniger :wink:

Ich vermute einen Kollegen hinter dem Trick :stuck_out_tongue: