Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 9E0E59F9AE6 for ; Mon, 20 Aug 2007 12:47:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 45476-05 for ; Mon, 20 Aug 2007 12:47:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by postgresql.org (Postfix) with ESMTP id 2EE7D9F98ED for ; Mon, 20 Aug 2007 12:47:13 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id m38so837169waf for ; Mon, 20 Aug 2007 08:47:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=f5Y8cC5kLHR5cYX6lBihaqzu/9mVyt3++k8pZNSRJVrORYezthuSv2SJpJFz1xzPhZD9eo1UvxFTjxCA3gQcZuJepuYVfpRXfn7azzczXzcT13a7XvNoINhHordzNd1u709gKOOOVU+GP5A5fHxQB17Mu0xnxEtNSZTYpbCDaSQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LBfzja8aOLQoJJYbSZl6jq+jWQduFEmy+BipVGENVliK7b73czzypl7oYccqrxmEfoFu5mTjN3zJYRF7Elfif6Ty2krueAg2K7On5RaYvjQgL6Mndn/xyx9IHJbMuHXcSiWHWfKlCnykzy67B/FF5Bcq+AAipH3jcPth4Dic7EU= Received: by 10.114.254.1 with SMTP id b1mr1048829wai.1187624832268; Mon, 20 Aug 2007 08:47:12 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Mon, 20 Aug 2007 08:47:12 -0700 (PDT) Message-ID: <4f4c2a010708200847l3a2c77d4p2d00c2d4f0a36057@mail.gmail.com> Date: Mon, 20 Aug 2007 11:47:12 -0400 From: "Jon Horsman" To: "Tom Lane" Subject: Re: When is a shared library unloaded? Cc: "sql pgsql" In-Reply-To: <4f4c2a010708150616se51de62u3c59d7722c3d5097@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4f4c2a010708141142p70c199ednab3ceffb4ce9f138@mail.gmail.com> <10738.1187120065@sss.pgh.pa.us> <4f4c2a010708150616se51de62u3c59d7722c3d5097@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/158 X-Sequence-Number: 29096 Here is a little more information about my problem. There is a library( that has stored procedures) for processing trigger events. The library is loaded on first access( i.e when there is a trigger event to be sent). Normally, it gets unloaded during a postgres server shutdown but the library seems to be getting unloaded occasionally. We have logs in the _init( ) and _fini( ) of the library and we see that there are times when _fini( ) is getting called when you wouldn't expect it to be. Has anyone else had issues similar to this? Thanks, Jon. On 8/15/07, Jon Horsman wrote: > > "Jon Horsman" writes: > > > I'm randomly having issues with my triggers not firing (it turns out > > > they are getting removed) and when i turned INFO logs on i saw the > > > following > > > > > 2007-08-14 13:41:44.740305500 LOCATION: _fini, medbevent_init.c:129 > > > 2007-08-14 13:41:45.790850500 INFO: 00000: medbeventlib -Unloading > > > library _fini() is called > > > > > Could someone please explain when a shared library gets > > > loaded/unloaded and how this all works? > > > > Are you sure the above doesn't just occur during server process > > termination? AFAIK Postgres never unloads a library, except when you > > specifically command it to load an updated version via the LOAD command. > > > > regards, tom lane > > Yup, the server process is still up and going, i have other clients > connected to postgres that still function when this happens. I'm not > using the LOAD command anywhere so thats not the problem. One of my > colleagues was doing some reading and said he found something that > stating that the fini() function is "unreliable", i'm not sure where > he read that though... > > Jon. >