Re: ToDo: API for SQL statement execution other than SPI

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ToDo: API for SQL statement execution other than SPI
Date: 2016-07-01 15:39:02
Message-ID: CA+Tgmoa3iPz-AJTtka+ZQCetqojhp0w6bBvK_=Fd0AUSFz9x1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 29, 2016 at 1:55 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-07-01 15:53:29 Re: fixing consider_parallel for upper planner rels
Previous Message Robert Haas 2016-07-01 15:32:25 Re: Postgres_fdw join pushdown - wrong results with whole-row reference