From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Mithun Cy <mithun(dot)cy(at)gmail(dot)com> |
Cc: | Hans Buschmann <buschmann(at)nidsa(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #15641: Autoprewarm worker fails to start on Windows with huge pages in use Old PostgreSQL community/pgsql-bugs x |
Date: | 2019-03-18 15:31:26 |
Message-ID: | CA+TgmoZV=+=aY3OBFLwH5-Uke=FMS4eppDbjSJJrH5=r-Zh74w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Mon, Mar 18, 2019 at 3:04 AM Mithun Cy <mithun(dot)cy(at)gmail(dot)com> wrote:
> autoprewarm waorker should not be restarted. As per the code @apw_start_database_worker@ master starts a worker per database and wait until it exit by calling WaitForBackgroundWorkerShutdown. The call WaitForBackgroundWorkerShutdown cannot handle the case if the worker was restarted. The WaitForBackgroundWorkerShutdown() get the status BGWH_STOPPED from the call GetBackgroundWorkerPid() if worker got restarted. So master will next detach the shared memory and next restarted worker keep failing going in a unending loop.
Ugh, that seems like a silly oversight. Does it fix the reported problem?
If I understand correctly, the commit message would be something like this:
==
Don't auto-restart per-database autoprewarm workers.
We should try to prewarm each database only once. Otherwise, if
prewarming fails for some reason, it will just keep retrying in an
infnite loop. The existing code was intended to implement this
behavior, but because it neglected to set worker.bgw_restart_time, the
per-database workers keep restarting, contrary to what was intended.
Mithun Cy, per a report from Hans Buschmann
==
Does that sound right?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-03-18 16:33:31 | Re: BUG #15700: PG 10 vs. 11: Large increase in memory usage when selecting BYTEA data (maybe memory leak) |
Previous Message | Tom Lane | 2019-03-18 14:33:01 | Re: pg_upgrade |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2019-03-18 15:35:56 | Re: pg_basebackup ignores the existing data directory permissions |
Previous Message | Paul Ramsey | 2019-03-18 15:06:14 | Re: Compressed TOAST Slicing |