Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away
От
Bharath Rupireddy
Тема
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away
Дата
Msg-id
CALj2ACU4yGdJ_a5ikuq_VdX4uJBph2S_bWE1bNhXNPEn-MCV0w@mail.gmail.com
Ответ на
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away (Fujii Masao)
Список
Дерево обсуждения
Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
On Thu, Oct 1, 2020 at 8:10 PM Fujii Masao wrote: > > pg_stat_clear_snapshot() can be used to reset the entry. > Thanks. I wasn't knowing it. > > + EXIT WHEN proccnt = 0; > + END LOOP; > > Isn't it better to sleep here, to avoid th busy loop? > +1. > > So what I thought was something like > > CREATE OR REPLACE PROCEDURE wait_for_backend_termination() > LANGUAGE plpgsql > AS $$ > BEGIN > LOOP > PERFORM * FROM pg_stat_activity WHERE application_name = 'fdw_retry_check'; > EXIT WHEN NOT FOUND; > PERFORM pg_sleep(1), pg_stat_clear_snapshot(); > END LOOP; > END; > $$; > Changed. Attaching v8 patch, please review it.. Both make check and make check-world passes on v8. I have another question not related to this patch: though we have wait_pid() function, we are not able to use it like pg_terminate_backend() in other modules, wouldn't be nice if we can make it generic under the name pg_wait_pid() and usable across all pg modules? With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления
От: Konstantin Knizhnik
Дата:
От: Anastasia Lubennikova
Дата: