Re: [HACKERS] Problems w/ LO

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: t-ishii(at)sra(dot)co(dot)jp, "hackers(at)postgreSQL(dot)org" <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Problems w/ LO
Date: 1999-05-31 21:38:28
Message-ID: 199905312138.RAA03495@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Brandon Palmer 1999-05-31 23:02:18 Re: [HACKERS] Problems w/ LO
Previous Message Tom Lane 1999-05-31 21:25:48 Re: [HACKERS] Problems w/ LO