Re: FDW Foreign Table Access: strange LOG message

From: Albrecht Dreß <albrecht(dot)dress(at)arcor(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: FDW Foreign Table Access: strange LOG message
Date: 2018-03-23 20:58:37
Message-ID: YVI42U3L.KUGXVHOJ.W6BU5GKM@ULTJ4BD2.CC66IOQE.PJRMLTGY
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_fdw locally: 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 explicitly stating

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 probably get accepted.

Knowing the background and the workarounds above, I agree with you that it's basically noise. It would be nice if there was 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 by default. 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message legrand legrand 2018-03-23 21:30:48 pg_stat_statements: password in command is not obfuscated
Previous Message Alessandro Aste 2018-03-23 19:22:50 Re: Postgresql 10.3 , query never completes if LIMIT clause is specified and paralle processing is on