Re: ToDo: API for SQL statement execution other than SPI - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ToDo: API for SQL statement execution other than SPI
Date
Msg-id CA+Tgmoa3iPz-AJTtka+ZQCetqojhp0w6bBvK_=Fd0AUSFz9x1A@mail.gmail.com
Whole thread Raw
In response to ToDo: API for SQL statement execution other than SPI  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: ToDo: API for SQL statement execution other than SPI  (Vibhor Kumar <vibhor.kumar@enterprisedb.com>)
List pgsql-hackers
On Wed, Jun 29, 2016 at 1:55 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> I am writing two background workers - autoreindex and scheduler. In Both I
> need to execute queries from top level. I had to wrote redundant code
> https://github.com/okbob/autoreindex/blob/master/utils.c
> autoreindex_execute_sql_command .Same code is in pglogical. Some statements
> - like VACUUM or REINDEX CONCURRENTLY is not possible call from SPI.
>
> Can be nice to have this function in core.

pg_background handles this.  Somebody might want to resurrect that patch.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Postgres_fdw join pushdown - wrong results with whole-row reference
Next
From: Robert Haas
Date:
Subject: Re: fixing consider_parallel for upper planner rels