[Qgis-user] Opening view or table using DBManager locks it in postgis

Alexandre Neto senhor.neto at gmail.com
Mon Oct 21 08:51:03 PDT 2013


Hello all,

While opening postgis tables and views in QGIS 2.0 (windows 7 64bit), I
noticed some different behaviors whether I use DBManager or Add Postgis
Layer.

Opening with DBManager creates lots of locks in postgres (see below), that
are only released when QGIS is closed. During the lock, it seems impossible
to alter specific tables or views.

For instance, having layer "One" and Layer "two" in QGIS, both tables added
from DBManager, I am not being able to run a trigger to update table "two"
whenever I commit a change in a table "one". If layer two is added  using
"Add Postgis Layer" this problem does not occur.

Is this expected?

Best Regards

Alexandre Neto


2256 postgis pg_constraint_conname_nsp_index postgres 6/14139
AccessShareLock Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM
pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_constraint postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis 17044 postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_type postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_attribute postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_description_o_c_o_index postgres 6/14139
AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_namespace_oid_index postgres 6/14139 AccessShareLock
Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_namespace_nspname_index postgres 6/14139
AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_description postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_namespace postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_class_relname_nsp_index postgres 6/14139
AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_class_oid_index postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_class postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_proc_proname_args_nsp_index postgres 6/14139 AccessShareLock
Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_proc_oid_index postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_proc postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgres 6/14139 6/14139 ExclusiveLock Sim 2013-10-21 16:29:29+01 SELECT
rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_attrdef postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_statistic postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_rewrite_rel_rulename_index postgres 6/14139 AccessShareLock
Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_type_typname_nsp_index postgres 6/14139
AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_rewrite_oid_index postgres 6/14139 AccessShareLock Sim
2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_index_indrelid_index postgres 6/14139 AccessShareLock
Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_index postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_type_oid_index postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_attrdef_adrelid_adnum_index postgres 6/14139 AccessShareLock
Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_rewrite postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_attrdef_oid_index postgres 6/14139 AccessShareLock Sim
2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_constraint_oid_index postgres 6/14139 AccessShareLock
Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 pg_authid_oid_index postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_rules postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_trigger postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_statistic_relid_att_inh_index postgres 6/14139
AccessShareLock Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM
pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_attribute_relid_attnum_index postgres 6/14139
AccessShareLock Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM
pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_constraint_contypid_index postgres 6/14139 AccessShareLock
Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_shadow postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_trigger_tgrelid_tgname_index postgres 6/14139
AccessShareLock Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM
pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_index_indexrelid_index postgres 6/14139
AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_attribute_relid_attnam_index postgres 6/14139
AccessShareLock Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM
pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis 17488 postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 pg_authid_rolname_index postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_trigger_oid_index postgres 6/14139 AccessShareLock Sim
2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_user postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 pg_db_role_setting postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis 16634 postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 pg_authid postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT
rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis 16641 postgres 6/14139 AccessShareLock Sim 2013-10-21
16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_trigger_tgconstraint_index postgres 6/14139 AccessShareLock
Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 pg_db_role_setting_databaseid_rol_index postgres 6/14139
AccessShareLock Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM
pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
2256 postgis pg_constraint_conrelid_index postgres 6/14139 AccessShareLock
Sim 2013-10-21 16:29:29+01 SELECT rulename, definition FROM pg_rules
WHERE tablename='sgev'  AND schemaname='epvu'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20131021/70b18aff/attachment.html>


More information about the Qgis-user mailing list