Re: bg worker: patch 1 of 6 - permanent process

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markus Wanner <markus@bluegap.ch>
Cc: Robert Haas <robertmhaas@gmail.com>, Itagaki Takahiro <itagaki.takahiro@gmail.com>, PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>
Date: 2010-08-26T19:22:22Z
Lists: pgsql-hackers
Markus Wanner <markus@bluegap.ch> writes:
> On 08/26/2010 02:44 PM, Robert Haas wrote:
>> On the more general topic of imessages, I had one other thought that
>> might be worth considering.  Instead of using shared memory, what
>> about using a file that is shared between the sender and receiver?

> What would that buy us?

Not having to have a hard limit on the space for unconsumed messages?

> The current approach uses plain spinlocks, which are more efficient. 

Please note the coding rule that says that the code should not execute
more than a few straight-line instructions while holding a spinlock.
If you're copying long messages while holding the lock, I don't think
spinlocks are acceptable.

			regards, tom lane