[postgis-users] Problem postgis 2.5 Centos 8 - postgis doesn't work

2020-11-24 Thread Alain Benard
Hi , In an other post I explained a problem with raster2pgsql on Centos 8 but in fact the problem is more important and update server postgis make 'create extension postgis failed'. So i reinstalled postgres / postgis from scratch on a virtual machine with centos and with this command (https://

Re: [postgis-users] Permission denied when trying to create a tablespace in PostgreSQL

2020-11-24 Thread Marco Boeringa
OK, I can now answer this myself. After more trial and error, and somewhat mislead by search results suggesting other stuff, it turns out that setting the owner of the '' subfolder of 'media/' to the Postgresql administrator solves the issue, and allows me to create the tablespaces. I don't kno

[postgis-users] Permission denied when trying to create a tablespace in PostgreSQL

2020-11-24 Thread Marco Boeringa
Hi all, More of a general postgresql question: It is quite a bit of time ago since I last did this, but I am in the process of rebuilding an Ubuntu 20.4.x virtual machine. Now I succesfully installed PostgreSQL 13.1 + PostGIS 3, but I want to add dedicated tablespaces for data + indexes, to s

Re: [postgis-users] Spatial query not using the spatial index

2020-11-24 Thread rmrodriguez
Hi, This is likely an issue with the support functions for PG12+ thinking `find_srid('public', 'my_table', 'geometry')` is not constant, or not enough. Can you open an issue on trac (https://trac.osgeo.org/postgis/) please? On Tue, Nov 24, 2020 at 11:23 AM Calvo Arias, Francisco wrote: > > Hi al

Re: [postgis-users] Spatial query not using the spatial index

2020-11-24 Thread Calvo Arias, Francisco
Hi Giusseppe, Thanks for your reply. As I was told before, there is now a ticket opened for this (https://trac.osgeo.org/postgis/ticket/4802) The query is executed as a parameterized query from a client, but also testing from pgAdmin with the parameters substituted for constants (for instance,

Re: [postgis-users] Spatial query not using the spatial index

2020-11-24 Thread Giuseppe Broccolo
Hi Paco, How is the query executed in the DB? Is it a prepared query, or are parameters (x, y) passed on the client side and then the resolved query is executed in the DB? In case of prepared query, the planner uses a "general" plan to execute the query: the plan is eventually corrected comparing

Re: [postgis-users] Spatial query not using the spatial index

2020-11-24 Thread Calvo Arias, Francisco
Hi Raúl, Thanks of your quick reply. Tought about that also, but find_srid is defined equally in every instance as CREATE OR REPLACE FUNCTION public.find_srid( character varying, character varying, character varying) RETURNS integer LANGUAGE 'plpgsql' COST 100

[postgis-users] Spatial query not using the spatial index

2020-11-24 Thread Calvo Arias, Francisco
Hi all, I'm having an issue with the planner using a sequential scan instead of the spatial index over a big table with several millions of geometries. My query is similar to this, where the query parameters are the coordinates for a point: select * from my table where st_contains(geometry, st_