RE: Important 7.0.* fix to ensure buffers are released - Mailing list pgsql-patches

From Hiroshi Inoue
Subject RE: Important 7.0.* fix to ensure buffers are released
Date
Msg-id 001701c01716$733beb80$2801007e@tpf.co.jp
Whole thread Raw
In response to Re: Important 7.0.* fix to ensure buffers are released  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Important 7.0.* fix to ensure buffers are released  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
> -----Original Message-----
> From: Tom Lane
>
> t-ishii@sra.co.jp writes:
> > Interesting thing is that 6.5.x does not have the problem. Is it new
> > one for 7.0.x?
>
> I think the bug has been there for a long time.  It is easier to see

One of the reason why we see the bug often in 7.0 seems to be
the following change which was applied to temprel.c before 7.0.
remove_all_temp_relations() always called AbortOutAnyTransaction()
before the change. remove_all_temp_relations() has been called from
shmem_exit() and accidentally(I don't think it had been intensional)
proc_exit() always called AbortOutAnyTransaction().

@@ -79,6 +79,9 @@
     List       *l,
                *next;

+    if (temp_rels == NIL)
+        return;
+
     AbortOutOfAnyTransaction();
     StartTransactionCommand();


Regards.

Hiroshi Inoue

pgsql-patches by date:

Previous
From: William Webber
Date:
Subject: Charset encoding patch to JDBC driver
Next
From: Tom Lane
Date:
Subject: Re: Important 7.0.* fix to ensure buffers are released