Re: PostgreSQL intenal scheduler? - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: PostgreSQL intenal scheduler?
Date
Msg-id b39bfe6a-c7ab-3ff7-f1c4-f2297f4626cb@gmx.net
Whole thread Raw
In response to PostgreSQL intenal scheduler?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Responses Re: PostgreSQL intenal scheduler?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
List pgsql-general
Thiemo Kellner schrieb am 05.09.2018 um 17:06:
> I am designing a framework for historisation implementation (SCD).
> One feature I would like to provide is a table in that the actual
> state of an entity is put and if this is complete, this history table
> is "updated":
> 
>       ------------         -------------
> ==>  | ENTITY_ACT |  ==>  | ENTITY_HIST |
>       ------------         -------------
> 

> I plan to use instead-of-triggers on the hist table that read the
> actual table and perfoms all necessary inserts und updates on the
> history table. If I want the termination of a record version
> (actually the record of a specific business key with a specific
> payload) to get propagated up and/or down referential integrities (no
> overlapping validities) I have to make sure that only one of those
> processes is modifying a table. I was thinking of a scheduler queue
> where the trigger would put a process request and PostgreSQL would
> work through. Is there a scheduler within PostgreSQL? I read the
> documentation and searched the web but could not find a hint. But
> before going another road or implementing something myself, I ask.
> Maybe this design is no good at all.


There is no built-in scheduler, but there is an extension that supplies that

https://github.com/citusdata/pg_cron




pgsql-general by date:

Previous
From: Tim Clarke
Date:
Subject: Re: PostgreSQL intenal scheduler?
Next
From: Thomas Poty
Date:
Subject: Re: increasing HA