Unix Technical Forum

The trigger can be specified to fire on time condition?

This is a discussion on The trigger can be specified to fire on time condition? within the Pgsql Performance forums, part of the PostgreSQL category; --> Hi All, I ' m using the postgresql datbase to stores cookies. Theses cookies become invalid after 30 mn ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 08:12 AM
Jamal Ghaffour
 
Posts: n/a
Default The trigger can be specified to fire on time condition?

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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 08:12 AM
Alvaro Herrera
 
Posts: n/a
Default Re: The trigger can be specified to fire on time condition?

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.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 08:12 AM
Chris Browne
 
Posts: n/a
Default Re: The trigger can be specified to fire on time condition?

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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com