5

I have a table in my database (postgres), that keeps in it the user accounting trace. I need to create a trigger that will perform a clean up at a given amount of time (let's say 30 minutes.) Is it possible to do that from postgres, or do I need to use something else? (By something else I mean C or Java or any other programming language that can sleep for a given time).

2
  • You can use pgAgent for event scheduling. Commented Mar 21, 2012 at 12:50
  • Thanks for link, but I don't know how to insatll pgAgent in my machine (I'm running Centos6.2) Commented Mar 21, 2012 at 13:00

1 Answer 1

3

Without PgAgent, things like this can be done using a cron script.

In both cases the periodic thing will be running from a different context (database owner, superuser, postgres), and in a separate transaction, obviously.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.