pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: Tatsuhito Kasahara <kasahara.tatsuhito@oss.ntt.co.jp>
Cc: pgsql-bugs@postgresql.org
Subject: Re: memory leaks? using savepoint
Date: Tue, 21 Dec 2010 23:09:51 -0500
Message-ID: <24071.1292990991@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTin6qOkYr-UBGX88414aPwhrgK6esijx_EkP0Fau@mail.gmail.com>
References: <4D09BB92.6080309@oss.ntt.co.jp>
	<15534.1292538442@sss.pgh.pa.us>
	<AANLkTinhr5JedDB5qBs7xdOg35MtZOg7S+BoSmq3tPua@mail.gmail.com>
	<AANLkTin6qOkYr-UBGX88414aPwhrgK6esijx_EkP0Fau@mail.gmail.com>

Robert Haas <robertmhaas@gmail.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@sss.pgh.pa.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



view thread (9+ messages)  latest in thread

Message-ID: <24071.1292990991@sss.pgh.pa.us>
Permalink:  ../24071.1292990991@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24071.1292990991@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, masao.fujii@gmail.com, kasahara.tatsuhito@oss.ntt.co.jp
  Subject: Re: memory leaks? using savepoint
  In-Reply-To: <24071.1292990991@sss.pgh.pa.us>
  References: <4D09BB92.6080309@oss.ntt.co.jp> <15534.1292538442@sss.pgh.pa.us> <AANLkTinhr5JedDB5qBs7xdOg35MtZOg7S+BoSmq3tPua@mail.gmail.com> <AANLkTin6qOkYr-UBGX88414aPwhrgK6esijx_EkP0Fau@mail.gmail.com> <24071.1292990991@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox