Re: [bug fix] Memory leak in dblink - Mailing list pgsql-hackers

From MauMau
Subject Re: [bug fix] Memory leak in dblink
Date
Msg-id 754FA21D1384477EAA86FE5F05004906@maumau
Whole thread Raw
In response to Re: [bug fix] Memory leak in dblink  (Joe Conway <mail@joeconway.com>)
Responses Re: [bug fix] Memory leak in dblink  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
From: "Joe Conway" <mail@joeconway.com>
> Fair enough -- this patch does it at that level in
> materializeQueryResult()

I'm in favor of this.  TBH, I did this at first, but I was afraid this would 
be rejected due to the reason mentioned earlier.

if statement in PG_TRY block is not necessary like this, because sinfo is 
zero-cleared.

  PG_TRY();  {
+   /* Create short-lived memory context for data conversions */
+   sinfo.tmpcontext = AllocSetContextCreate(CurrentMemoryContext,
+            "dblink temporary context",

Regards
MauMau




pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: idle_in_transaction_timeout
Next
From: Andres Freund
Date:
Subject: Re: -DDISABLE_ENABLE_ASSERT