postgresql


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[16120]: Disconnected from Upstart
Mar 22 22:37:55 ip-xxx upstart-socket-bridge[16123]: 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

Related Links

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

Categories

HOME
asp.net
stanford-nlp
jenkins-pipeline
gaussian
magento-1.9.2.1
crash
terminal
perl6
powerquery
ephesoft
oms
dynamics-crm-2011
osclass
websharper
adroitlogic
reportlab
md2
orange
keystone
webgl-earth
fibonacci
concatenation
advertising
handle
ithit-webdav-server
apdu
core-animation
priority-queue
my.cnf
rancher
custom-fields
csproj
request-uri
kundera
ds-5
mobile-development
selenium3
spring-oauth2
angularjs-resource
border-layout
maven-2
observer-pattern
ui-grid
directadmin
amazon-fire-tv
niagara-ax
spring-webflow-2
emacs24
px4
typewriter
blackberry
access-violation
joystick
boost-range
konakart
qtruby
audiorecord
transaction-isolation
factorization
web-performance
imageicon
textblob
perfect-scrollbar
connection-timeout
dockerpy
applinks
qxorm
conditional-comments
parsefloat
cocos2d-x-2.x
selenium-grid2
fscanf
time-frequency
nest-initiative
dayofweek
internet-radio
cvi
ojb
stringstream
leap-year
google-checkout
system.transactions
database-restore
algol
junit-rule
netbiscuits
waveout
sessiontracking
norton
marathontesting
fxcopcmd
glassfish-embedded
mysql-pconnect
qlibrary
stackless

Resources

Encrypt Message