>> Merge into WAL writer?
> Uh.. that would mean you'd loose parallelism between WAL writing to disk and
> WAL shipping via network. That does not sound appealing to me.
That depends on the order of WAL writing and WAL shipping.
How about the following order?
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.
>> I guess we could invent a new semaphore-like primitive at the same layer
>> as LWLocks using spinlock and PGPROC directly...
> Sure, but in what way would that differ from what I do with imessages?
The timing of the process's receiving a signal is dependent on the scheduler
of kernel. The scheduler does not always handle a signal immediately.
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center