Postgres queue table
Phil (OmnisList)
phil at pgpotter.co.uk
Thu Oct 22 07:18:43 EDT 2020
Hi Jim,
Have you looked at pg_background?
https://github.com/vibhorkum/pg_background
That might do what you want.
regards
Phil Potter
Based in Chester in the UK.
On 22/10/2020 11:43, Jim Pistrang wrote:
> Hi all,
>
> Apologies for putting a Postgres question here, but I'm having a difficult time getting a clear answer from stackoverflow and the other usual sources.
>
> I have a trigger in a Postgres table that executes a function after a value in a specific column in the table is increased. It works, but the function is rather complex, and in Postgres the transaction that updates the table is not complete until the function is executed. I want to have the trigger simply insert a row into a queue table, and have another process in Postgres poll the queue table, grab a row that has not been processed, and execute the function.
>
> I will not be dealing with a huge volume of transactions - a process that polls the queue table every 5 or 10 seconds will be more than adequate. I see a number of 3rd party solutions out there, but I would like to do this strictly in the Postgres environment. Is there a way to do this?
>
> Jim
>
More information about the omnisdev-en
mailing list