Re: [Qgis-user] Primary key and spatial index

2024-02-16 Thread Richard Duivenvoorde via QGIS-User

On 2/16/24 10:09, Richard Duivenvoorde via QGIS-User wrote:

QGIS should NOT crash though.
If THAT is the case, please file a bug in our QGIS' tracker (with a 
reproducable scenario).


Mmm, I can reproduce the crash, in Master, but NOT in recent 3.34...
And only with a new project which I did not save yet.

I created an issue: https://github.com/qgis/QGIS/issues/56379

Feel free to add info

Regards,

Richard Duivenvoorde

___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Primary key and spatial index

2024-02-16 Thread Richard Duivenvoorde via QGIS-User

And in addition of Chris's answer:

The user you connect with, should have enough permissions to create or update 
an index.

If not, QGIS (or yourself via psql or another client) will also not be able to 
create the index/pk.
In that case you need to rise the permissions of your user, OR use another user 
to create it.

QGIS should NOT crash though.
If THAT is the case, please file a bug in our QGIS' tracker (with a 
reproducable scenario).

Regards,

Richard Duivenvoorde

PS which QGIS version are you using here? I cannot get this message visible 
(but I do not have large tables at hand currently)...


On 2/16/24 06:56, chris hermansen via QGIS-User wrote:

Rikesh and list,

On Thu, Feb 15, 2024, 18:40 Rikesh Lad via QGIS-User mailto:qgis-user@lists.osgeo.org>> wrote:

Hello,

Please see attached. Does anyone know how to add a primary key and spatial 
index to a large layer without the software crashing?

image.png



Here is some reference info about adding a primary key to a PostgreSQL table

https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-primary-key/#:~:text=To%20add%20a%20primary%20key%20to%20an%20existing%20table%2C%20you,to%20the%20primary%20key%20constraint
 
.



Here is some reference info that explains how to add a spatial index

https://postgis.net/workshops/postgis-intro/indexing.html 



Both require the use of a PostgreSQL client for example "psql".



___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


___
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user