pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: De Leeuw Guy <G.De_Leeuw@eurofer.be>
To: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: trigger and pg_fini
Date: Sat, 28 Jul 2007 16:50:44 +0200
Message-ID: <46AB57C4.6050608@eurofer.be> (raw)
In-Reply-To: <20070727133449.X1155@megazone.bigpanda.com>
References: <46AA144F.3010604@eurofer.be>
	<20070727133449.X1155@megazone.bigpanda.com>

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
unloaded.
> 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 context.data
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 ?

Regards

Guy



view thread (4+ messages)  latest in thread

Message-ID: <46AB57C4.6050608@eurofer.be>
Permalink:  ../46AB57C4.6050608@eurofer.be/
Also on:    postgresql.org/message-id/46AB57C4.6050608@eurofer.be

 · 

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-admin@postgresql.org
  Cc: G.De_Leeuw@eurofer.be, sszabo@megazone.bigpanda.com
  Subject: Re: trigger and pg_fini
  In-Reply-To: <46AB57C4.6050608@eurofer.be>

* 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