Re: [HACKERS] src/test/subscription/t/002_types.pl hanging onparticular environment - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] src/test/subscription/t/002_types.pl hanging onparticular environment
Date
Msg-id CAMsr+YGUJc+FaReBrga5BB7xjqqDpjE0qne8zdpZzsTXf86Pkg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] src/test/subscription/t/002_types.pl hanging onparticular environment  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses Re: [HACKERS] src/test/subscription/t/002_types.pl hanging on particular environment  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 19 September 2017 at 18:04, Petr Jelinek <petr.jelinek@2ndquadrant.com> wrote:
 

If you are asking why they are not identified by the
BackgroundWorkerHandle, then it's because it's private struct and can't
be shared with other processes so there is no way to link the logical
worker info with bgworker directly. 

I really want BackgroundWorkerHandle to be public, strong +1 from me.

It'd be very beneficial when working with shm_mq, too. Right now you cannot pass a BackgroundWorkerHandle through shmem to another process, either via a static shmem region or via shm_mq. This means you can't supply it to shm_mq_attach and have shm_mq handle lifetime issues for you based on the worker handle.

TBH I think there's a fair bit of work needed in the bgworker infrastructure, but making BackgroundWorkerHandle public is a small and simple start that'd be a big help.

At some point we'll also want to be able to enumerate background workers and get handles for existing workers. Also, let background workers recover from errors without exiting, which means factoring a bunch of stuff out of PostgresMain. But both of those are bigger jobs.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] Creating backup history files for backups taken from standbys
Next
From: Craig Ringer
Date:
Subject: Re: [HACKERS] src/test/subscription/t/002_types.pl hanging onparticular environment