public inbox for [email protected]
help / color / mirror / Atom feedHow to debug extension update
7+ messages / 4 participants
[nested] [flat]
* How to debug extension update
@ 2025-01-06 16:49 kaido vaikla <[email protected]>
0 siblings, 2 replies; 7+ messages in thread
From: kaido vaikla @ 2025-01-06 16:49 UTC (permalink / raw)
To: pgsql-admin
Hi,
Updating extension fails:
ERROR: type does not exist
but i can describe it, ie search_path is correct.
pg version 15.10.
teglms=# \dx post*
List of installed extensions
Name | Version | Schema | Description
------------------+---------+----------+------------------------------------------------------------
postgis | 3.3.6 | postgis | PostGIS geometry and geography
spatial types and functions
postgis_raster | 3.3.6 | postgis | PostGIS raster types and functions
postgis_topology | 3.3.3 | topology | PostGIS topology spatial types and
functions
(3 rows)
teglms=# alter extension postgis_topology update to "3.3.6";
ERROR: type "geometry" does not exist
teglms=# \dT+ geometry
List of data types
Schema | Name | Internal name | Size | Elements | Owner | Access
privileges | Description
---------+----------+---------------+------+----------+------------+-------------------+----------------------------------------------
postgis | geometry | geometry | var | | eglmsadmin |
| postgis type: The type representing spatial .
| | | | | |
|.features with planar coordinate systems.
(1 row)
teglms=# select user;
user
------------
eglmsadmin
(1 row)
teglms=# show search_path ;
search_path
-------------------
postgis, topology
(1 row)
Why update can't find an extension, while i can describe it and search_path
seems to be correct?
br
Kaido
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to debug extension update
@ 2025-01-06 17:48 Ron Johnson <[email protected]>
parent: kaido vaikla <[email protected]>
1 sibling, 0 replies; 7+ messages in thread
From: Ron Johnson @ 2025-01-06 17:48 UTC (permalink / raw)
To: pgsql-admin
On Mon, Jan 6, 2025 at 11:49 AM kaido vaikla <[email protected]> wrote:
> Hi,
>
> Updating extension fails:
> ERROR: type does not exist
> but i can describe it, ie search_path is correct.
> pg version 15.10.
>
>
> teglms=# \dx post*
> List of installed extensions
> Name | Version | Schema | Description
>
> ------------------+---------+----------+------------------------------------------------------------
> postgis | 3.3.6 | postgis | PostGIS geometry and geography
> spatial types and functions
> postgis_raster | 3.3.6 | postgis | PostGIS raster types and functions
> postgis_topology | 3.3.3 | topology | PostGIS topology spatial types
> and functions
> (3 rows)
>
> teglms=# alter extension postgis_topology update to "3.3.6";
> ERROR: type "geometry" does not exist
> teglms=# \dT+ geometry
> List of data
> types
> Schema | Name | Internal name | Size | Elements | Owner |
> Access privileges | Description
>
> ---------+----------+---------------+------+----------+------------+-------------------+----------------------------------------------
> postgis | geometry | geometry | var | | eglmsadmin |
> | postgis type: The type representing spatial .
> | | | | | |
> |.features with planar coordinate systems.
> (1 row)
>
> teglms=# select user;
> user
> ------------
> eglmsadmin
> (1 row)
>
> teglms=# show search_path ;
> search_path
> -------------------
> postgis, topology
> (1 row)
>
> Why update can't find an extension, while i can describe it and
> search_path seems to be correct?
>
>
Type geometry is owned by eglmsadmin, but there do not appear to be any
Access privileges granted. Thus, maybe whatever user you connected as
doesn't have privs to access it?
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to debug extension update
@ 2025-01-06 19:57 Tom Lane <[email protected]>
parent: kaido vaikla <[email protected]>
1 sibling, 1 reply; 7+ messages in thread
From: Tom Lane @ 2025-01-06 19:57 UTC (permalink / raw)
To: kaido vaikla <[email protected]>; +Cc: pgsql-admin
kaido vaikla <[email protected]> writes:
> Why update can't find an extension, while i can describe it and search_path
> seems to be correct?
Extension scripts are not run with the session's prevailing
search_path, but with a search path built from the extension's
dependencies. In this case, schema postgis would be included
in that path only if extension postgis_topology specifies
requires = 'postgis'
in its postgis_topology.control file. It kinda sounds like that
might be missing? If it's present, then Ron's thought about
missing access privileges for the postgis schema might be the
answer.
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to debug extension update
@ 2025-01-06 20:04 Zaid Shabbir <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Zaid Shabbir @ 2025-01-06 20:04 UTC (permalink / raw)
To: Tom Lane <[email protected]>; [email protected]; +Cc: pgsql-admin
Hello,
I am also getting the same error without the upgrade scenario.
postgres=# CREATE EXTENSION postgis SCHEMA postgis;
CREATE EXTENSION
postgres=# CREATE EXTENSION postgis_topology SCHEMA topology;
ERROR: type "geometry" does not exist
postgres=# show search_path ;
search_path
---------------------------
postgis, topology, public
(1 row)
postgres=# CREATE EXTENSION postgis_topology;
ERROR: type "geometry" does not exist
postgres=# SELECT current_schema();
current_schema
----------------
postgis
(1 row)
Regards,
Zaid
On Tue, Jan 7, 2025 at 12:58 AM Tom Lane <[email protected]> wrote:
> kaido vaikla <[email protected]> writes:
> > Why update can't find an extension, while i can describe it and
> search_path
> > seems to be correct?
>
> Extension scripts are not run with the session's prevailing
> search_path, but with a search path built from the extension's
> dependencies. In this case, schema postgis would be included
> in that path only if extension postgis_topology specifies
>
> requires = 'postgis'
>
> in its postgis_topology.control file. It kinda sounds like that
> might be missing? If it's present, then Ron's thought about
> missing access privileges for the postgis schema might be the
> answer.
>
> regards, tom lane
>
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to debug extension update
@ 2025-01-14 10:16 kaido vaikla <[email protected]>
parent: Zaid Shabbir <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: kaido vaikla @ 2025-01-14 10:16 UTC (permalink / raw)
To: Zaid Shabbir <[email protected]>; +Cc: Tom Lane <[email protected]>; pgsql-admin
1) requires = 'postgis'
$ cat postgis_topology.control
# postgis topology extension
comment = 'PostGIS topology spatial types and functions'
default_version = '3.3.6'
relocatable = false
schema = topology
requires = postgis
So i changed it
requires = postgis -> requires = 'postgis'
but no help.
2) about missing access privileges
I checked different databases with
\dT+ *.*
data types "Access privileges" is everywhere empty.
As my subject is, is it there a way somehow debug "alter extension update"
statement to figure out what is going on behind this?
br
Kaido
On Mon, 6 Jan 2025 at 22:05, Zaid Shabbir <[email protected]> wrote:
> Hello,
>
> I am also getting the same error without the upgrade scenario.
>
> postgres=# CREATE EXTENSION postgis SCHEMA postgis;
>
> CREATE EXTENSION
>
> postgres=# CREATE EXTENSION postgis_topology SCHEMA topology;
>
> ERROR: type "geometry" does not exist
>
> postgres=# show search_path ;
>
> search_path
>
> ---------------------------
>
> postgis, topology, public
>
> (1 row)
>
> postgres=# CREATE EXTENSION postgis_topology;
>
> ERROR: type "geometry" does not exist
>
> postgres=# SELECT current_schema();
>
> current_schema
>
> ----------------
>
> postgis
>
> (1 row)
>
> Regards,
> Zaid
>
>
>
>
> On Tue, Jan 7, 2025 at 12:58 AM Tom Lane <[email protected]> wrote:
>
>> kaido vaikla <[email protected]> writes:
>> > Why update can't find an extension, while i can describe it and
>> search_path
>> > seems to be correct?
>>
>> Extension scripts are not run with the session's prevailing
>> search_path, but with a search path built from the extension's
>> dependencies. In this case, schema postgis would be included
>> in that path only if extension postgis_topology specifies
>>
>> requires = 'postgis'
>>
>> in its postgis_topology.control file. It kinda sounds like that
>> might be missing? If it's present, then Ron's thought about
>> missing access privileges for the postgis schema might be the
>> answer.
>>
>> regards, tom lane
>>
>>
>>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to debug extension update
@ 2025-01-14 14:27 Tom Lane <[email protected]>
parent: kaido vaikla <[email protected]>
0 siblings, 1 reply; 7+ messages in thread
From: Tom Lane @ 2025-01-14 14:27 UTC (permalink / raw)
To: kaido vaikla <[email protected]>; +Cc: Zaid Shabbir <[email protected]>; pgsql-admin
kaido vaikla <[email protected]> writes:
> 2) about missing access privileges
> I checked different databases with
> \dT+ *.*
What I was suspicious of is whether you have "usage" privilege on the
schema that the postgis datatype is installed in. The above command
would not tell you that.
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to debug extension update
@ 2025-01-20 11:57 kaido vaikla <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: kaido vaikla @ 2025-01-20 11:57 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Zaid Shabbir <[email protected]>; pgsql-admin
On Tue, 14 Jan 2025 at 16:27, Tom Lane <[email protected]> wrote:
> What I was suspicious of is whether you have "usage" privilege on the
> schema that the postgis datatype is installed in. The above command
> would not tell you that.
>
> regards, tom lane
>
usage privilege exists:
teglms=# \dT geometry
List of data types
Schema | Name | Description
---------+----------+--------------------------------------------------------------------------------------
postgis | geometry | postgis type: The type representing spatial features
with planar coordinate systems.
(1 row)
teglms=# \dn+ postgis
List of schemas
Name | Owner | Access privileges | Description
---------+------------+------------------------------+-------------
postgis | eglmsadmin | eglmsadmin=UC/eglmsadmin +|
| | gr_postgis_r=U/eglmsadmin +|
| | gr_postgis_rw=U/eglmsadmin +|
| | gr_postgis_rwx=UC/eglmsadmin |
(1 row)
br
Kaido
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2025-01-20 11:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-01-06 16:49 How to debug extension update kaido vaikla <[email protected]>
2025-01-06 17:48 ` Ron Johnson <[email protected]>
2025-01-06 19:57 ` Tom Lane <[email protected]>
2025-01-06 20:04 ` Zaid Shabbir <[email protected]>
2025-01-14 10:16 ` kaido vaikla <[email protected]>
2025-01-14 14:27 ` Tom Lane <[email protected]>
2025-01-20 11:57 ` kaido vaikla <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox