pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: g.hintermayer@inode.at
To: pgsql-interfaces@postgresql.org
Subject: Re: still memory leaks with libpgtcl
Date: 16 Jan 2003 01:34:06 -0800
Message-ID: <bd4db85f.0301160134.499958fb@posting.google.com> (raw)
References: <as0da6$2njk$1@news.hub.org>
	<auhq8v$2iuo$1@news.hub.org>
	<auj41k$f4v$1@news.hub.org>
	<avf32e$rep$1@news.hub.org>
	<avg4mq$1ikp$1@news.hub.org>

ljb <lbayuk@mindspring.com> wrote in message 
> [...]
> (This is for PostgreSQL-7.3.1)
> 
> --- src/interfaces/libpgtcl/pgtclId.c.bak	2002-10-17 10:53:32.000000000 -0400
> +++ src/interfaces/libpgtcl/pgtclId.c	2003-01-07 21:51:53.000000000 -0500
> @@ -300,12 +300,10 @@
>  	 * small) amount of memory taken for the channel state representation.
>  	 * Note we are not leaking a socket, since libpq closed that already.
>  	 */
> -#ifdef NOT_USED
>  #if TCL_MAJOR_VERSION >= 8
> -	if (connid->notifier_channel != NULL)
> +	if (connid->notifier_channel != NULL && interp != NULL)
>  		Tcl_UnregisterChannel(NULL, connid->notifier_channel);
>  #endif
> -#endif
>  
>  	/*
>  	 * We must use Tcl_EventuallyFree because we don't want the connid

Your patch does indeed fix the memory leakage but seems to introduce
another problem. Every once in a while I do get segfaults, when I
enter the event loop after pg_disconnect-ing (well, it looks like that
to me). I have to say, that this is the only script, where the error
occurs. All others (~500) work with no problem at all. I was trying to
reproduce that in a short script, but - no way. I am not even sure, if
this is postgreSQL related. I did build a static wish with
--enable-symbols=all and --enable-memory to track the error down. Hope
I'll see more then.

Gerhard



view thread (15+ messages)  latest in thread

Message-ID: <bd4db85f.0301160134.499958fb@posting.google.com>
Permalink:  ../bd4db85f.0301160134.499958fb@posting.google.com/
Also on:    postgresql.org/message-id/bd4db85f.0301160134.499958fb@posting.google.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: g.hintermayer@inode.at
  Subject: Re: still memory leaks with libpgtcl
  In-Reply-To: <bd4db85f.0301160134.499958fb@posting.google.com>

* 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