Re: FDW Foreign Table Access: strange LOG message - Mailing list pgsql-general

From Albrecht Dreß
Subject Re: FDW Foreign Table Access: strange LOG message
Date
Msg-id YVI42U3L.KUGXVHOJ.W6BU5GKM@ULTJ4BD2.CC66IOQE.PJRMLTGY
Whole thread Raw
In response to Re: FDW Foreign Table Access: strange LOG message  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: FDW Foreign Table Access: strange LOG message
List pgsql-general
Hi Tom:

Am 22.03.18 23:55 schrieb(en) Tom Lane:
> It finally occurred to me what is a likely explanation for why you're seeing these messages but I don't when I test
postgres_fdwlocally: probably, you are encrypting connections to the foreign server with SSL. 

I can confirm that the confusing LOG messages go away when I disable SSL in the server definition, i.e. either by
explicitlystating 

CREATE SERVER ext_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (
    dbname 'ext_db', host 'localhost', sslmode 'disable', updatable 'false');

or by just saying

CREATE SERVER ext_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (
    dbname 'ext_db', updatable 'false');

Linking different data bases on the same machine using the FDW may be a special use case, though…

> Anyway, it's clearly not very nice that postgres_fdw makes no attempt to do a graceful shutdown of its remote
connection. I don't know that this rises to the level of a bug, exactly, but if somebody wanted to send in a patch it'd
probablyget accepted. 

Knowing the background and the workarounds above, I agree with you that it's basically noise.  It would be nice if
therewas a note about it in the documentation, though – other users might stumble over it, too. 

A different, confusing point (which is closer to a “bug” IMHO) is that connections to localhost are actually encrypted
bydefault.  This is basically useless and just a waste of cpu cycles – if a malicious user may somehow tap (tcpdump)
lo,there is a different problem which can not be mitigated by encryption… 

Thank you so much for your help and insights!

Cheers,
Albrecht.
Attachment

pgsql-general by date:

Previous
From: Alessandro Aste
Date:
Subject: Re: Postgresql 10.3 , query never completes if LIMIT clause isspecified and paralle processing is on
Next
From: legrand legrand
Date:
Subject: pg_stat_statements: password in command is not obfuscated