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

Re: memory leaks? using savepoint

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Tatsuhito Kasahara <kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: memory leaks? using savepoint
Date: 2010-12-22 04:09:51
Message-ID: 24071.1292990991@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Are you saying that this problem does not exist in 8.3.0 but does
> exist in later 8.3.x revs?

I believe it dates from

Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Branch: master Release: REL8_4_BR [c98a92378] 2008-12-13 02:00:20 +0000
Branch: REL8_3_STABLE Release: REL8_3_6 [8d1d6019d] 2008-12-13 02:00:30 +0000
Branch: REL8_2_STABLE Release: REL8_2_12 [7ae3c0f67] 2008-12-13 02:00:53 +0000

    Fix failure to ensure that a snapshot is available to datatype input functions
    when they are invoked by the parser.  We had been setting up a snapshot at
    plan time but really it needs to be done earlier, before parse analysis.
    Per report from Dmitry Koterov.
    
    Also fix two related problems discovered while poking at this one:
    exec_bind_message called datatype input functions without establishing a
    snapshot, and SET CONSTRAINTS IMMEDIATE could call trigger functions without
    establishing a snapshot.
    
    Backpatch to 8.2.  The underlying problem goes much further back, but it is
    masked in 8.1 and before because we didn't attempt to invoke domain check
    constraints within datatype input.  It would only be exposed if a C-language
    datatype input function used the snapshot; which evidently none do, or we'd
    have heard complaints sooner.  Since this code has changed a lot over time,
    a back-patch is hardly risk-free, and so I'm disinclined to patch further
    than absolutely necessary.

So if we take the complaint seriously, we'd better patch 8.2 as well.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Robert HaasDate: 2010-12-22 04:22:48
Subject: Re: BUG #5798: Some weird error with pl/pgsql procedure
Previous:From: Robert HaasDate: 2010-12-22 03:58:30
Subject: Re: memory leaks? using savepoint

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