[Qgis-user] Fwd: QGIS PGpool reconnections

Frederico dos Santos Soares fssunb at gmail.com
Tue May 26 07:40:37 PDT 2015


Hi everyone.
I'm using QGIS 2.8 in a Windows 7 (professional-64bits), at my work. We are
trying to use an architecture with PostGIS 2.0.6, where multiple users
populate a data base.

But in that architecture we are using PGPool2 (more informations here
http://www.pgpool.net/mediawiki/index.php/Main_Page) and when PGPool2 cut
the connection after  five minutes (client_idle_limit=300) my problems
begin.

At this time, I can't make inserts because the Primary Key (that before had
a autocomplete using "nextvall ..." assumed by QGIS), after the conection
cut down, send "null" what brings me an error because de PK is "not null"
and serial type.

Observing the log in bank we saw that: when QGIS restart the conection he
make an SQL (that count something) using the name of schema with the name
of table (that is not in public schema), the answer of SQL is '0'.

We notice if we change the SQL excluding the shema's name the answer is
"1". If we exclude the 'count' and the shema's name, we have a few
parameters including the rule "nextvall(...".
This bring us the question: is it correct QGIS's behavior for reconnection
in data base?

Unfortunately remove PGPoll is not a option. we think that a good way is,
when QGIS reconnect to data base the rule "nextvall..." in PK column
reestablish automatically.

Does someone have an idea about how to configure the PGPool, QGIS or both?
Is this QGIS's behavior a bug?

Thank you all

Frederico Soares
Geographer

Logs from data base:

2015-05-13 18:04:31.847 BRT; host: 10.197.94.11; user: frederico.soares;
session: 5553bbde.1bfa; database: db_geo_compartilhado; LOG:  execute
pgpool7083/pgpool7083: SELECT count(*) FROM pg_catalog.pg_attrdef AS d,
pg_catalog.pg_class AS c WHERE d.adrelid = c.oid AND d.adsrc ~ 'nextval'
AND c.relname = '*dmif.dmif_autos_infracao*'

2015-05-13 18:04:31.873 BRT; host: 10.197.94.11; user: frederico.soares;
session: 5553bbde.1bfa; database: db_geo_compartilhado; LOG:  execute
addfeatures: INSERT INTO
"dmif"."dmif_autos_infracao"("the_geom","gid","numero_ai","serie","tipo_multa","embargo","cpf","cnpj","outros_doc","autuado","desc_infra","desc_sanc","decreto","art1","art2","capitulo","secao","subsecao","tipo_infra","x","y","valor_mult","autuante","nome_uc","co_cnuc","municipio","uf","data_auto","ano","obs_ai","erro_auto")
VALUES
(st_geomfromwkb($1::bytea,4674),$2,'6','6','6','1',6,6,'6','6','6','6',6,6,6,'6','6','6','6','6','6',6,'6','6',6,'6','6','2015-06-06',2015,'6','6')
2015-05-13 18:04:31.873 BRT; host: 10.197.94.11; user: frederico.soares;
session: 5553bbde.1bfa; database: db_geo_compartilhado; DETAIL:
parameters: $1 = '\x010100000010ecd98c8e4d42c094f4d66f3e7320c0', $2 = NULL

2015-05-13 18:04:31.873 BRT; host: 10.197.94.11; user: frederico.soares;
session: 5553bbde.1bfa; database: db_geo_compartilhado; ERROR:  null value
in column "gid" violates not-null constraint

2015-05-13 18:04:31.873 BRT; host: 10.197.94.11; user: frederico.soares;
session: 5553bbde.1bfa; database: db_geo_compartilhado; DETAIL:  Failing
row contains (null, 6, 6, 6, t, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 2015-06-06, 2015, 6, 6,
01010000204212000010ECD98C8E4D42C094F4D66F3E7320C0).
-- 

Frederico dos Santos Soares
GeĆ³grafo
55 61 8416 0105
fssunb at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150526/d70df6f3/attachment.html>


More information about the Qgis-user mailing list