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

From: Vibhor Kumar <vibhor(dot)kumar(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ToDo: API for SQL statement execution other than SPI
Date: 2016-07-01 16:51:54
Message-ID: AEF67E42-C1D1-4F8B-9406-B697513852A4@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On Jul 1, 2016, at 11:39 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Wed, Jun 29, 2016 at 1:55 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com <mailto: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 <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.

Here is the link for that patch, which works with 9.5
https://github.com/vibhorkum/pg_background <https://github.com/vibhorkum/pg_background>

Thanks & Regards,
Vibhor Kumar
(EDB) EnterpriseDB Corporation
EnterpriseDB
Blog:http://vibhork.blogspot.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2016-07-01 17:15:43 TLC for EXPLAIN ANALYZE (parallel query and loops)
Previous Message Alvaro Herrera 2016-07-01 16:45:06 Re: EXISTS clauses not being optimized in the face of 'one time pass' optimizable expressions