Re: [HACKERS] Proposal : For Auto-Prewarm. - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS] Proposal : For Auto-Prewarm.
Date
Msg-id CAA4eK1+RdASBimnEtn8ML7DD1xRsnZ_8k5ZPygHazk07D_kemg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Proposal : For Auto-Prewarm.  (Mithun Cy <mithun.cy@enterprisedb.com>)
Responses Re: [HACKERS] Proposal : For Auto-Prewarm.  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Feb 7, 2017 at 10:44 AM, Mithun Cy <mithun.cy@enterprisedb.com> wrote:
>
> ==================
> One problem now I have kept it open is multiple "auto pg_prewarm dump"
> can be launched even if already a dump/load worker is running by
> calling launch_pg_prewarm_dump. I can avoid this by dropping a
> lock-file before starting the bgworkers. But, if there is an another
> method to avoid launching bgworker on a simple method I can do same.
>

How about keeping a variable in PROC_HDR structure to indicate if
already one dump worker is running, then don't allow to start a new
one?

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Proposal : For Auto-Prewarm.
Next
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] IF [NOT] EXISTS for replication slots