Re: bug in SignalSomeChildren

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug in SignalSomeChildren
Date: 2010-12-17 16:27:23
Message-ID: 1292603114-sup-3671@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Tom Lane's message of vie dic 17 13:18:35 -0300 2010:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Is it possible to save the "is walsender" flag in the Backend struct?
> > That would make it possible to solve the problem very easily.
>
> Yeah, I was wondering about that too, but the problem is that the
> postmaster doesn't know that at the time it forks the child. The
> flag in shared memory will get set later, but it's hard to tell
> how much later.

Yeah, I arrived at the same conclusion. I was wondering if we could
cache the result of the shared mem lookup the first time it was done,
but as you say there would still be a race condition.

> I think what we ought to be looking to do is get rid of the distinction,
> so that the postmaster treats walsenders the same as other children.

I think the problem with this is that walsenders are treated in a very
special way during shutdown -- they need to stay up until after bgwriter
is gone.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2010-12-17 16:28:12 Re: Unnecessary limit on max_standby_streaming_delay
Previous Message Craig Ringer 2010-12-17 16:24:20 Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)