Re: flock user defined function - Mailing list pgsql-general

From Tom Lane
Subject Re: flock user defined function
Date
Msg-id 23898.1087944545@sss.pgh.pa.us
Whole thread Raw
In response to flock user defined function  (Chris Goughnour <cgoughnour@hotp.com>)
Responses Re: flock user defined function
List pgsql-general
Chris Goughnour <cgoughnour@hotp.com> writes:
> Any suggestions? Thanks in advance.

I believe locks are associated with file descriptors (what you're
miscalling a handle).  The unlock function cannot release a lock
that is held via a different descriptor.  What it needs to be doing
is closing the descriptor that lockFile opened.  This would also
solve the rather serious descriptor-leak problem you've got.

            regards, tom lane

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Connection gets into state where all queries fail
Next
From: Doug McNaught
Date:
Subject: Re: flock user defined function