Martijn van Oosterhout <klep...@svana.org> writes: > On Wed, Oct 03, 2012 at 01:57:47PM -0400, Bruce Momjian wrote: >> On Wed, Oct 3, 2012 at 01:53:28PM -0400, Tom Lane wrote: >>> How exactly would a library prevent such problems? In particular, >>> let's see a proposal for how libpq might make it look like a fork >>> was transparent for an open connection.
>> I guess that is impossible. > Well, not quite impossible. A simple solution would be to use > pthread_atfork() to register a handler that puts the socket into an > invalid state in either the parent or the child. That doesn't make it "transparent" --- that merely ensures that we break one of the two currently-working use cases (namely, that either the parent or the child can continue to use the connection as long as the other doesn't touch it). regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers