Re: Synchronous Log Shipping Replication - Mailing list pgsql-hackers

From Markus Wanner
Subject Re: Synchronous Log Shipping Replication
Date
Msg-id 48C7D5EE.20808@bluegap.ch
Whole thread Raw
In response to Re: Synchronous Log Shipping Replication  ("Fujii Masao" <masao.fujii@gmail.com>)
Responses Re: Synchronous Log Shipping Replication  ("Fujii Masao" <masao.fujii@gmail.com>)
List pgsql-hackers
Hi,

Fujii Masao wrote:
> On Tue, Sep 9, 2008 at 10:55 PM, Markus Wanner <markus@bluegap.ch> wrote:
>> Hi,
>>
>> ITAGAKI Takahiro wrote:
>>> Signals and locking, borrewed from Postgres-R, are now studied
>>> for the purpose in the log shipping,
>> Cool. Let me know if you have any questions WRT this imessages stuff.
> 
> If you're sure it's all right, I have a trivial question.

Well, I know it works for me and I think it could work for you, too. 
That's all I'm saying.

> Which signal should we use for the notification to the backend from
> WAL sender? The notable signals are already used.

I'm using SIGUSR1, see src/backend/storage/ipc/imsg.c from Postgres-R, 
line 232. That isn't is use for backends or the postmaster, AFAIK.

> Or, since a backend don't need to wait on select() unlike WAL sender,
> ISTM that it's not so inconvenient to use a semaphore for that notification.

They probably could, but not the WAL sender.

What's the benefit of semaphores? It seems pretty ugly to set up a 
semaphore, lock that on the WAL sender, then claim it on the backend to 
wait for it, and then release it on the WAL sender to notify the backend.

If all you want to do is to signal the backend, why not use signals ;-)  But maybe I'm missing something?

Regards

Markus Wanner



pgsql-hackers by date:

Previous
From: "Fujii Masao"
Date:
Subject: Re: Synchronous Log Shipping Replication
Next
From: Zdenek Kotala
Date:
Subject: Re: using hash index when BETWEEN is specified