Re: PostmasterContext survives into parallel workers!?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostmasterContext survives into parallel workers!?
Date: 2016-08-02 18:38:19
Message-ID: 758.1470163099@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Tom Lane wrote:
>> It looks to me like the reason for it is simply not having bothered to
>> copy the rw->rw_worker data to somewhere that would survive deletion
>> of the PostmasterContext. I wonder though if anyone remembers a more
>> fundamental reason? Surely the bgworker is not supposed to touch any
>> of the rest of the BackgroundWorkerList?

> I just checked BDR, which is the more complex code using workers I know
> of, and I don't see any reason why this cannot be changed.

The attached patch passes "make check-world" for me. Can you check it
against BDR?

(I'd be hesitant to back-patch it in any case, but I think it's okay for
HEAD unless we can easily find something it breaks.)

regards, tom lane

Attachment Content-Type Size
no-postmaster-context-in-bgworkers.patch text/x-diff 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karan Sikka 2016-08-02 18:45:10 Re: TODO item: Implement Boyer-Moore searching in LIKE queries
Previous Message Alvaro Herrera 2016-08-02 18:36:42 Re: Increasing timeout of poll_query_until for TAP tests