Hi,

ITAGAKI Takahiro wrote:
Are there any better idea to share one socket connection between
backends (and bgwriter)? The connections could be established after
fork() from postmaster, and number of them could be two or more.
This is one of the most complicated part of synchronous log shipping.
Switching-processes apporach like b) is just one idea for it.

I fear I'm repeating myself, but I've had the same problem for Postgres-R and solved it with an internal message passing infrastructure which I've simply called imessages. It requires only standard Postgres shared memory, signals and locking and should thus be pretty portable.

In simple benchmarks, it's not quite as efficient as unix pipes, but doesn't require as many file descriptors, is independent of the parent-child relations of processes, maintains message borders and it is more portable (I hope). It could certainly be improved WRT efficiency and could theoretically even beat Unix pipes, because it involves less copying of data and less syscalls.

It has not been reviewed nor commented much. I'd still appreciate that.

Regards

Markus Wanner


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to