On Sat, Jun 3, 2017 at 8:53 AM, Peter Eisentraut <peter.eisentr...@2ndquadrant.com> wrote: > On 6/2/17 15:08, Peter Eisentraut wrote: >> On 5/30/17 23:10, Peter Eisentraut wrote: >>> Here is a proposed solution that splits bgw_name into bgw_type and >>> bgw_name_extra. bgw_type shows up in pg_stat_activity.backend_type. >>> Uses of application_name are removed, because they are no longer >>> necessary to identity the process type. >>> >>> This code appears to be buggy because I sometimes get NULL results of >>> the backend_type lookup, implying that it couldn't find the background >>> worker slot. This needs another look. >> AFAICU, when we register a background worker using RegisterDynamicBackgroundWorker, it's not included in BackgroundWorkerList(which is postmaster's list of registered background workers, in private memory). Instead, we use only BackgroundWorkerSlots. Perhaps, this is the reason that backend_type is NULL for parallel workers.
-- Thanks & Regards, Kuntal Ghosh EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers