Re: Synchronous Log Shipping Replication

Поиск
Список
Период
Сортировка
От Markus Wanner
Тема Re: Synchronous Log Shipping Replication
Дата
Msg-id 48C5418D.9030401@bluegap.ch
обсуждение исходный текст
Ответ на Re: Synchronous Log Shipping Replication  ("Fujii Masao" <masao.fujii@gmail.com>)
Список pgsql-hackers
Hi,

Fujii Masao wrote:
> 1. A backend writes WAL to disk.
> 2. The backend wakes up WAL sender process and sleeps.
> 3. WAL sender process does WAL shipping and wakes up the backend.
> 4. The backend issues sync command.

Right, that would work. But still, the WAL writer process would block 
during writing WAL blocks.

Are there compelling reasons for using the existing WAL writer process, 
as opposed to introducing a new process?

> The timing of the process's receiving a signal is dependent on the scheduler
> of kernel.

Sure, so are pipes or shmem queues.

> The scheduler does not always handle a signal immediately.

What exactly are you proposing to use instead of signals? Semaphores are 
pretty inconvenient when trying to wake up arbitrary processes or in 
conjunction with listening on sockets via select(), for example.

See src/backend/replication/manager.c from Postgres-R for a working 
implementation of such a process using select() and signaling.

Regards

Markus Wanner



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Cleanup of GUC units code
Следующее
От: Jeff Davis
Дата:
Сообщение: Common Table Expressions (WITH RECURSIVE) patch