Обсуждение: Re: pgsql: Make archiver process an auxiliary process.

Поиск
Список
Период
Сортировка

Re: pgsql: Make archiver process an auxiliary process.

От
Thomas Munro
Дата:
On Mon, Mar 15, 2021 at 5:14 PM Fujii Masao <fujii@postgresql.org> wrote:
> Make archiver process an auxiliary process.
>
> This commit changes WAL archiver process so that it's treated as
> an auxiliary process and can use shared memory. This is an infrastructure
> patch required for upcoming shared-memory based stats collector patch
> series. These patch series basically need any processes including archiver
> that can report the statistics to access to shared memory. Since this patch
> itself is useful to simplify the code and when users monitor the status of
> archiver, it's committed separately in advance.

I think this needs to handle ProcSignalBarrierPending.  Otherwise,
code that tries to use proc signal barriers (like CF #2962 and #2602)
might hang forever when an archiver is running.



Re: pgsql: Make archiver process an auxiliary process.

От
Fujii Masao
Дата:

On 2021/06/12 19:36, Thomas Munro wrote:
> On Mon, Mar 15, 2021 at 5:14 PM Fujii Masao <fujii@postgresql.org> wrote:
>> Make archiver process an auxiliary process.
>>
>> This commit changes WAL archiver process so that it's treated as
>> an auxiliary process and can use shared memory. This is an infrastructure
>> patch required for upcoming shared-memory based stats collector patch
>> series. These patch series basically need any processes including archiver
>> that can report the statistics to access to shared memory. Since this patch
>> itself is useful to simplify the code and when users monitor the status of
>> archiver, it's committed separately in advance.
> 
> I think this needs to handle ProcSignalBarrierPending.  Otherwise,
> code that tries to use proc signal barriers (like CF #2962 and #2602)
> might hang forever when an archiver is running.

Thanks for the comment! I will investigate this.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



Re: pgsql: Make archiver process an auxiliary process.

От
Fujii Masao
Дата:

On 2021/06/16 13:29, Fujii Masao wrote:
> 
> 
> On 2021/06/12 19:36, Thomas Munro wrote:
>> On Mon, Mar 15, 2021 at 5:14 PM Fujii Masao <fujii@postgresql.org> wrote:
>>> Make archiver process an auxiliary process.
>>>
>>> This commit changes WAL archiver process so that it's treated as
>>> an auxiliary process and can use shared memory. This is an infrastructure
>>> patch required for upcoming shared-memory based stats collector patch
>>> series. These patch series basically need any processes including archiver
>>> that can report the statistics to access to shared memory. Since this patch
>>> itself is useful to simplify the code and when users monitor the status of
>>> archiver, it's committed separately in advance.
>>
>> I think this needs to handle ProcSignalBarrierPending.  Otherwise,
>> code that tries to use proc signal barriers (like CF #2962 and #2602)
>> might hang forever when an archiver is running.
> 
> Thanks for the comment! I will investigate this.

Attached patch changes archiver so that it also handles barrier events.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Вложения

Re: pgsql: Make archiver process an auxiliary process.

От
Thomas Munro
Дата:
On Thu, Jun 17, 2021 at 11:28 PM Fujii Masao
<masao.fujii@oss.nttdata.com> wrote:
> Attached patch changes archiver so that it also handles barrier events.

LGTM.  Thanks!



Re: pgsql: Make archiver process an auxiliary process.

От
Fujii Masao
Дата:

On 2021/06/17 20:32, Thomas Munro wrote:
> On Thu, Jun 17, 2021 at 11:28 PM Fujii Masao
> <masao.fujii@oss.nttdata.com> wrote:
>> Attached patch changes archiver so that it also handles barrier events.
> 
> LGTM.  Thanks!

Pushed. Thanks!

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION