[postgis-tickets] [PostGIS] #4186: Unable to upgrade from PostGIS 2.4.3 to 2.4.4
PostGIS
trac at osgeo.org
Fri Nov 2 13:27:26 PDT 2018
#4186: Unable to upgrade from PostGIS 2.4.3 to 2.4.4
-------------------------+----------------------------
Reporter: Rikiar | Owner: pramsey
Type: defect | Status: closed
Priority: blocker | Milestone: PostGIS 2.4.6
Component: postgis | Version: 2.4.x
Resolution: worksforme | Keywords: Upgrade, 2.4.3
-------------------------+----------------------------
Comment (by msakrejdasfdc):
Maybe, but as far as I can tell, the versions of legacy.sql we have don't
involve any changes to `box2d_in`. I just noticed my colleague did not
paste the full error; here are all the relevant pieces:
{{{
LOG: statement: ALTER EXTENSION "postgis" UPDATE;
ERROR: cannot change return type of existing function
HINT: Use DROP FUNCTION box2d_in(cstring) first.
}}}
I checked the metadata about the function on the customer's 2.4.3 install
versus a fresh 2.4.4, and it looks like the differences are pretty
trivial:
Fresh 2.4.4:
{{{
=> \df+ box2d_in
List of functions
-[ RECORD 1 ]-------+----------
Schema | public
Name | box2d_in
Result data type | box2d
Argument data types | cstring
Type | normal
Volatility | immutable
Parallel | safe
Owner | postgres
Security | invoker
Access privileges |
Language | c
Source code | BOX2D_in
Description |
}}}
The 2.4.3 where we see the upgrade issue:
{{{
=> \df+ box2d_in
List of functions
-[ RECORD 1 ]-------+-------------
Schema | public
Name | box2d_in
Result data type | public.box2d
Argument data types | cstring
Type | normal
Volatility | immutable
Parallel | unsafe
Owner | postgres
Security | invoker
Access privileges |
Language | c
Source code | BOX2D_in
Description |
}}}
So basically the only differences are
* schema-qualified return type in the 2.4.3 version (i.e., `public.box2d`
instead of `box2d`)
* Parallel: `unsafe` in 2.4.3 versus `safe` in 2.4.4
Everything else appears identical. I tried running the extension update
again on a copy of the database but I get this error:
{{{
=> begin; alter extension postgis update;
BEGIN
ERROR: cannot create temporary table within security-restricted operation
}}}
I've tried looking up this error, but that led me to this comment in
`tablecmds.c` in Postgres source:
{{{
/*
* Security check: disallow creating temp tables from security-
restricted
* code. This is needed because calling code might not expect
untrusted
* tables to appear in pg_temp at the front of its search path.
*/
if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
&& InSecurityRestrictedOperation())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("cannot create temporary table within security-
restricted operation")));
}}}
I'm not sure what this means or why I'm hitting it. Any ideas?
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4186#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list