pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
The trigger can be specified to fire on time condition?
3+ messages / 3 participants
[nested] [flat]

* The trigger can be specified to fire on time condition?
@ 2006-02-27 17:09  Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
  0 siblings, 2 replies; 3+ messages in thread

From: Jamal Ghaffour @ 2006-02-27 17:09 UTC (permalink / raw)
  To: pgsql-performance

Hi All,
I ' m using the postgresql datbase to stores cookies. Theses cookies 
become invalid after  30 mn and have to be deleted. i have defined a 
procedure that will
delete all invalid cookies, but i don't know how to call it in loop way 
(for example each hour).
I think that it  possible  because this behaivor is the same of the 
autovaccum procedure that handle the vaccum process every time (60s in 
default way).
After reading the documentation, it seems  that triggers can't handle 
this stuff .
how can i resolve the problem ?


Thanks

Attachments:

Jamal.Ghaffour.vcf (text/x-vcard, 376B) download begin:vcard fn:Jamal Ghaffour n:Ghaffour;Jamal org:ELIOS Informatique adr;quoted-printable:;;1, sq de ch=C3=AAne Germain,;CESSON SEVIGNE;;35510;FRANCE email;internet:Jamal.Ghaffour@elios-informatique.fr tel;work:(+33) 2.99.63.85.30 tel;fax:(+33) 2.99.63.85.93 tel;home:(+33) 2 99 36 73 96 tel;cell:(+33) 6.21.85.15.91 url:http://www.elios-informatique.fr version:2.1 end:vcard
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: The trigger can be specified to fire on time condition?
@ 2006-02-27 17:10  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
  1 sibling, 0 replies; 3+ messages in thread

From: Alvaro Herrera @ 2006-02-27 17:10 UTC (permalink / raw)
  To: Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>; +Cc: pgsql-performance

Jamal Ghaffour wrote:
> Hi All,
> I ' m using the postgresql datbase to stores cookies. Theses cookies 
> become invalid after  30 mn and have to be deleted. i have defined a 
> procedure that will
> delete all invalid cookies, but i don't know how to call it in loop way 
> (for example each hour).
> I think that it  possible  because this behaivor is the same of the 
> autovaccum procedure that handle the vaccum process every time (60s in 
> default way).
> After reading the documentation, it seems  that triggers can't handle 
> this stuff .
> how can i resolve the problem ?

Use your system's crontab!  (On Windows, "scheduled tasks" or whatever).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: The trigger can be specified to fire on time condition?
@ 2006-02-27 17:30  Chris Browne <cbbrowne@acm.org>
  parent: Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
  1 sibling, 0 replies; 3+ messages in thread

From: Chris Browne @ 2006-02-27 17:30 UTC (permalink / raw)
  To: pgsql-performance

Jamal.Ghaffour@elios-informatique.fr (Jamal Ghaffour) writes:
> Hi All, I ' m using the postgresql datbase to stores cookies. Theses
> cookies become invalid after 30 mn and have to be deleted. i have
> defined a procedure that will delete all invalid cookies, but i
> don't know how to call it in loop way (for example each hour).  I
> think that it possible because this behaivor is the same of the
> autovaccum procedure that handle the vaccum process every time (60s
> in default way).  After reading the documentation, it seems that
> triggers can't handle this stuff .  how can i resolve the problem ?

Time-based event scheduling is done using cron, external to the
database.
-- 
output = reverse("gro.mca" "@" "enworbbc")
http://cbbrowne.com/info/sgml.html
"Even in the  area of anticompetitive conduct, Microsoft  is mainly an
imitator." -- Ralph Nader (1998/11/11)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-02-27 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-27 17:09 The trigger can be specified to fire on time condition? Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
2006-02-27 17:10 ` Alvaro Herrera <alvherre@commandprompt.com>
2006-02-27 17:30 ` Chris Browne <cbbrowne@acm.org>

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