Synch Rep: communication between backends and walsender

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Synch Rep: communication between backends and walsender
Дата
Msg-id 3f0b79eb0906160450n7680bb4se35255d330464ee8@mail.gmail.com
обсуждение исходный текст
Ответы Re: Synch Rep: communication between backends and walsender  (Greg Stark <stark@enterprisedb.com>)
Re: Synch Rep: communication between backends and walsender  (Markus Wanner <markus@bluegap.ch>)
Список pgsql-hackers
http://archives.postgresql.org/pgsql-hackers/2008-12/msg00448.php

One of the major complaints about the current synch rep patch is that
signals are used for communication between backends and walsender.
On some platforms, a signal doesn't interrupt sleep (i.e. poll or select
system call), which would increase the performance overhead of
replication.

So I'd like to propose using the UDP socket and the semaphores
instead of signals for communication from backends to walsender
and vice versa, respectively.

The UDP socket is used for backends to request walsender to send
WAL records. Semaphores cannot be used for this purpose because
walsender must wait for the request from backends and the reply from
the standby server concurrently. Some UDP packets might get lost,
but that doesn't matter because the important data is communicated
via the shared memory and walsender wakes up periodically without
receiving that request. This UDP socket can be created like that for
statistics collector.

On the other hand, the semaphores are used for backends to wait
for the reply from walsender. The backend registers its semaphore
on the shared memory before sleeping, then walsender wakes it up
by using that semaphore.

Comments? Do you have another better approach?

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] backend: compare word-at-a-time in bcTruelen