dblink_connect fails - Mailing list pgsql-general

From James Sewell
Subject dblink_connect fails
Date
Msg-id CANkGpBuP69NekN+s0nhHV9-J49pOaFMNAP76q2u7XvGQSNWgLg@mail.gmail.com
Whole thread Raw
Responses Re: dblink_connect fails  (Joe Conway <mail@joeconway.com>)
List pgsql-general
Hey all,

I have a Windows PostgreSQL server where dblink_connect fails to pick up the current user as follows:

#psql -h localhost -U postgres ffm

ffm=# select version();
                           version
-------------------------------------------------------------
 PostgreSQL 9.4.5, compiled by Visual C++ build 1800, 64-bit
(1 row)

ffm=#
ffm=# SELECT dblink_connect('master', 'dbname=ffm');
ERROR:  could not establish connection
DETAIL:  FATAL:  role "PRDSWIDEGRID01$" does not exist

ffm=#
ffm=# select user;
 current_user
--------------
 phxowner
(1 row)

ffm=# select session_user;
 session_user
--------------
 postgres
(1 row)

ffm=# SELECT dblink_connect('master', 'dbname=ffm user=postgres');
 dblink_connect
----------------
 OK
(1 row)

Has anyone seen this before? It seems very odd to me, I have another identical machine (except for being on 9.4.0) which this works on.

Cheers,

James Sewell,
Solutions Architect
______________________________________
 

Level 2, 50 Queen St, Melbourne VIC 3000

(+61) 3 8370 8000  W www.lisasoft.com  (+61) 3 8370 8099
 


The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.

pgsql-general by date:

Previous
From: Jim Nasby
Date:
Subject: Re: wal receiver process always start after startup process recovering all WALs and need new WAL?
Next
From: George Neuner
Date:
Subject: Re: Permissions, "soft read failure" - wishful thinking?