Re: [HACKERS] Problems w/ LO - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Problems w/ LO
Date
Msg-id 199905312138.RAA03495@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Problems w/ LO  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> I think the problem here is that inv_create is done with the palloc
> memory context set to the private memory context created by lo_open
> ... and this memory context is never cleaned out as long as the backend
> survives.  So whatever junk data might get palloc'd and not freed during
> the index creation step will just hang around indefinitely.  And that
> code is far from leak-free.
> 
> What I propose doing about it is modifying lo_commit to destroy
> lo_open's private memory context.  This will mean going back to the
> old semantics wherein large object descriptors are not valid across
> transactions.  But I think that's the safest thing anyway.  We can
> detect the case where someone tries to use a stale LO handle if we
> zero out the LO "cookies" array as a side-effect of lo_commit.

Makes sense.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Problems w/ LO
Next
From: "Brandon Palmer"
Date:
Subject: Re: [HACKERS] Problems w/ LO