Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Support ALTER TABLESPACE name SET/RESET ( tablespace_options ).

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Support ALTER TABLESPACE name SET/RESET ( tablespace_options ).
Date: 2010-01-07 03:00:08
Message-ID: 603c8f071001061900l77475439l1f444cffc09b64a3@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
On Wed, Jan 6, 2010 at 6:11 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 3. Invoking tablespace_reloptions while switched into
> CacheMemoryContext.  This isn't a crasher, but it strikes me as a bad
> idea because if reloptions.c happens to leak anything, that'll represent
> a permanent (session-lifespan) memory leak.  And it's complicated enough
> that being sure it doesn't leak anything is hard.

What tools do we have for identifying memory leaks?

> I think you should
> invoke tablespace_reloptions in the caller's memory context, and then if
> it succeeds, copy the result into CacheMemoryContext.  That would
> probably require fixing the problem you noted earlier today about
> making TableSpaceOpts be a valid bytea value, so that it'll be easy to
> copy (then you can use datumCopy, for instance).

I think I'll just copy Alvaro's existing pattern in relcache.c, which
just uses palloc0 and memcpy.

...Robert

In response to

Responses

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2010-01-07 03:00:30
Subject: Re: Testing with concurrent sessions
Previous:From: Robert HaasDate: 2010-01-07 02:49:38
Subject: Re: Testing with concurrent sessions

pgsql-committers by date

Next:From: Tom LaneDate: 2010-01-07 03:13:44
Subject: Re: [COMMITTERS] pgsql: Support ALTER TABLESPACE name SET/RESET ( tablespace_options ).
Previous:From: Robert HaasDate: 2010-01-07 02:41:16
Subject: pgsql: Improve a couple of comments relating to large object snapshot

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group