send query in background

From: ml(at)ft-c(dot)de
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: send query in background
Date: 2020-10-09 04:34:25
Message-ID: cc035e78-a4b3-6d0f-8484-0e1d48ce6252@ft-c.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hallo,

I have one pg function (a long running sql query), it is running few
minutes. I start it from webserver via PHP.

My question: Is there a possibility, that this function runs in
background. PG send back a immidiately return and do the work after this
answer.

like linux/bash commands with an ampersand "&" at the and of the line.
The user get a prompt and can prozess his work.

When the user push the button on the website to start the sql-script, he
can process his work.

I work with v11.8, but it is possible to update to v12.
(google found some answers, but these a 10 years old)

Franz

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tatsuo Ishii 2020-10-09 04:40:21 Re: send query in background
Previous Message Franz Timmer 2020-10-09 04:31:49 send query in background