From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Markus Wanner <markus(at)bluegap(dot)ch> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Synch Rep: communication between backends and walsender |
Date: | 2009-06-23 06:41:22 |
Message-ID: | 3f0b79eb0906222341u13b38143g48d5a2326e06c3a5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Tue, Jun 23, 2009 at 1:55 AM, Markus Wanner<markus(at)bluegap(dot)ch> wrote:
>> On the other hand, I think that a semaphore should be used instead of a signal
>> at least for backends to wait for walsender. This would turn around
>> the situation
>> on HPUX in some degree. In this case, the remaining problem is that walsender
>> cannot immediately wake up. But, since walsender wakes up periodically and
>> that period can be tweaked (by new GUC wal_sender_delay), the overhead on
>> HPUX might not be actually so big.
>
> Hm.. does the walsender really wake up periodically? IIRC the
> misbehavior discovered on HPUX is that select() gets restarted upon
> signaled with SA_RESTART - with its full timeout, so that a steady rate
> of signals would lock the walsender process within select() completely.
> Or what else do you use for the walsender to wake up periodically?
I was thinking of reducing the number of signals by backends using
the shared flag which indicates whether walsender has already received
it or not. If the flag is true, the backend skips sending the signal because
walsender is going to wake up soon. Otherwise, the signal is sent, then
the signal handler of walsender sets the flag to true. Though I need to
examine it furthermore.
> However, my point is that I think you don't have to solve this problem.
> It should rather be taken care of by core. We can then pick up whatever
> solution is decided on.
Good for me. Does anyone have another thought? If not, I would
remove this task from the TODO list of synch rep.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas 'ads' Scherbaum | 2009-06-23 09:16:38 | Re: Changed error message for blocks by prepared transactions |
Previous Message | Simon Riggs | 2009-06-23 06:20:56 | Re: 8.4 open item: copy performance regression? |