Re: FDW Foreign Table Access: strange LOG message
От | Adrian Klaver |
---|---|
Тема | Re: FDW Foreign Table Access: strange LOG message |
Дата | |
Msg-id | 6b34f8c0-4064-1695-8cdf-5e5469ed7ea0@aklaver.com обсуждение исходный текст |
Ответ на | Re: FDW Foreign Table Access: strange LOG message (Albrecht Dreß <albrecht.dress@arcor.de>) |
Ответы |
Re: FDW Foreign Table Access: strange LOG message
|
Список | pgsql-general |
On 03/21/2018 11:15 AM, Albrecht Dreß wrote: > Hi Adrian & Tom: > > Thanks a lot for your input! > > Am 20.03.18 20:38 schrieb(en) Tom Lane: See comments inline below. > > Unfortunately, in my original post, I confused the primary and secondary > (accessed via the FDW) data bases in my example when I anonymised their > identifiers… Sorry for the confusion! The /real/ structure is > > client ---[libpq]--> my_db ---[FDW]--> ext_db > > and the LOG message is actually related to the “internal” connection, > i.e. ext_db (*not* my_db) complains about “could not receive data” after > accessing the table in ext_db through the FDW from my_db. > > The effect is not limited to Python, but happens with psql, too. I.e. > running (ext_table is the foreign table mapped into my_db, and a mapping > exists only for user “user”) > > sudo -u user /usr/lib/postgresql/10/bin/psql my_db <<< "select * from > ext_table limit 1;" > > *also* triggers the LOG message Does it also happen when you open a psql session and do?: psql>select * from ext_table limit 1; > > [time stamp/pid] user@ext_db LOG: could not receive data from client: > Connection reset by peer > >> I don't see any such log messages when testing postgres_fdw here, >> which is odd; why are my results different? > > Yes, that's strange! I have the following deb packages (from the > stretch-pgdg repo) installed: > > postgresql-10 10.3-1.pgdg90+1 amd64 > postgresql-client-10 10.3-1.pgdg90+1 amd64 > postgresql-client-common 190.pgdg90+1 all > postgresql-common 190.pgdg90+1 all > libpq5:amd64 10.3-1.pgdg90+1 amd64 I am not seeing --contrib which is where I would expect postgres_fdw to come from. Is --contrib installed? If not where is postgres_fdw coming from? > >> If these are about the FDW connections, maybe the answer is that >> postgres_fdw ought to establish a backend-exit callback in which it >> can shut down its connections gracefully. > > Hmm, yes, sounds like a sensible explanation. > >> If it's doing that now, I sure don't see where. > > So, if I understand you correctly, this needs to be addressed in > postgres_fdw, and there is nothing I can fix in my setup (except for > suppressing LOG messages) to get rid of the message? > > Thanks again, > Albrecht. -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: