Skip site navigation (1) Skip section navigation (2)

Re: trigger and pg_fini

From: De Leeuw Guy <G(dot)De_Leeuw(at)eurofer(dot)be>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: trigger and pg_fini
Date: 2007-07-28 14:50:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hello Stephan

Thanks for you respons.

Stephan Szabo a écrit :
> _PG_fini is called when the file is unloaded, but not at process end,
> according to the documentation, so I don't think it does what you want.
No, I make a small test :
In _PG_fini I create a file and close it (via fopen), I quit pgsql and
the file are never created, bul a small lsof say me that the module are
> What data are you managing? If you can palloc it into an appropriately
> lived context, it might be easier for you to manage.
I manage a small cache. pfree release the memory, but it's not possible
to trigger a special action like "save the cache now".
> What information do you want?
I event like "startBegin", "endBegin", "startCopy", "endCopy" ....
> You can get whether it's a row or transaction event, as well as whether it
> was insertion, update or delete from the
How can I detect (in language C) that the trigger work on a transaction
context or a row context ?
And it is possible to receive an event when this transaction are ended ?



In response to


pgsql-admin by date

Next:From: Stephan SzaboDate: 2007-07-28 15:57:19
Subject: Re: trigger and pg_fini
Previous:From: Devrim GÜNDÜZDate: 2007-07-28 08:06:10
Subject: Re: documentation question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group