DBLink in PostgreSQL drops DNS name of target (Redshift), but recovers after service restart
I've a (random) problem within PG 9.3. I have stored procedures, that create a dblink connection to a redshift instance. It used to work fine, but recently it stopped. Setup: AWS EC2 instance (ubuntu) with PostgreSQL 9.3 installed AWS Redshift as the target Query: SELECT dblink_connect('host=xxx.redshift.amazonaws.com port=5432 dbname=xxx user=xxx password=xxx'); [Other commands] SELECT dblink_disconnect(); It works on one day. The next day, I get the following error ERROR: could not establish connection DETAIL: could not translate host name "xxx.redshift.amazonaws.com" to address: Name or service not known But it works via IP. And it works via the name, if I run psql via the command line psql -h xxx.redshift.amazonaws.com port=5432 -d xxx -U xxx As soon as I restart the postgresql service, it's fine again. The postgresql log has no errors in it. From what I can see, there are no connections left open after the procedures finish. The syslog shows some lines, a couple of hours after the last query, where I'm not sure if they could be related/where they're coming from: Mar 22 22:37:55 ip-xxx upstart-udev-bridge: Disconnected from Upstart Mar 22 22:37:55 ip-xxx upstart-socket-bridge: Disconnected from Upstart Mar 22 22:37:55 ip-xxx kernel: [801531.255841] init: upstart-udev-bridge main process (16120) terminated with status 1 Mar 22 22:37:55 ip-xxx kernel: [801531.255861] init: upstart-udev-bridge main process ended, respawning Mar 22 22:37:55 ip-xxx kernel: [801531.256172] init: upstart-socket-bridge main process (16123) terminated with status 1 Mar 22 22:37:55 ip-xxx kernel: [801531.256185] init: upstart-socket-bridge main process ended, respawning Mar 22 22:37:55 ip-xxx kernel: [801531.256399] init: upstart-file-bridge main process (16126) terminated with status 1 Mar 22 22:37:55 ip-xxx kernel: [801531.256413] init: upstart-file-bridge main process ended, respawning
Returning PostgreSQL aggregations to a HashMap using MyBatis
Refresh materialized views with concurrency
Cannot do anything with my tables in postgresql 9.6?
Pivot Row on PostgreSQL
Insert POINT into postgres database
Why table size doesn't change after vacuum full?
Unable to start postgresql.service?
Can we consider AWS RDS read replica as Backup?
I can't run postgresql server after I change ssl = on in postgresql.conf in Windows Server 2012.
postgres default values are applying on update, not just at create
Explicit type conversion in postgreSQL
How do I count the number of users with a higher score than [userID]?
PostgreSQL - order randomly, but with NULLs first
in an insert can postgres either return the id of the new row or an existing row on a unique index?
function not found in trigger function postgres_fdw
Transaction wrap around issue in Postgresql