vibhorkum / pg_background

pg_background
GNU General Public License v3.0
136 stars 35 forks source link

Function pg_background_discard_result does not exist in pg_background version 1.2 #55

Open epolkerman opened 4 weeks ago

epolkerman commented 4 weeks ago

Installed pg_background version 1.1 and created the extension in a PostgreSQL 15 database. Running following commands works with version 1.1 of the extension:

postgres=# SELECT pg_background_launch('select firstname from name');
pg_background_launch 
----------------------
                1109
(1 row)

postgres=# select * from pg_background_discard_result(1109);
pg_background_discard_result 
------------------------------

(1 row)

The next step is that I have installed pg_background version 1.2 and in the database I updated the extension. Running the above commands will return a failure that the function pg_background_discard_result() does not exist anymore:

postgres-# alter extension pg_background update;
ALTER EXTENSION
postgres=# \dx
                       List of installed extensions
     Name      | Version |   Schema   |            Description            
---------------+---------+------------+-----------------------------------
 pg_background | 1.2     | postgres   | Run SQL queries in the background
 plpgsql       | 1.0     | pg_catalog | PL/pgSQL procedural language 
(2 rows)

postgres=# SELECT pg_background_launch('select firstname from name');
pg_background_launch 
----------------------
                 1142
(1 row)

postgres=# select * from pg_background_discard_result(1142);
ERROR:  could not find function "pg_background_discard_result" in file "/usr/pgpure/postgres/15/lib/pg_background.so"

It looks like the function does not exist anymore in version 1.2. But in the update script from version 1.1 to 1.2 there is not drop of this function

vibhorkumar123 commented 2 weeks ago

We never released these functions in version 1.1. @rjuju added the code to the main branch, but it was not included in the release. I reverted the changes due to warnings and issues observed with Postgres 15.

epolkerman commented 2 weeks ago

Oke, it is clear to me. Probably we had build it from the master during release 1.1 and as side-effect the function added by rjuju was incorporated in the build