[QGIS-Developer] Can't choose all options in Value Relation widget?

2022-10-06 Thread Anne B. Nilsen via QGIS-Developer
Hi,

the Value Relation widget has 4 checkboxes.
Since it's checkboxes I assume I may check/uncheck none, some or all of them.
However, not all combinations seem to work?
E.g. you cannot choose both "Allow multiple selections" and "Use completer" - 
the completer never appears as it does when multiple selections is unchecked.
Is this a bug?

See https://github.com/qgis/QGIS/issues/50371 for more explanation/images.

Best regards
Anne Nilsen
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Tests & Merge Request

2022-10-06 Thread Sandro Santilli via QGIS-Developer
On Sun, Sep 11, 2022 at 02:58:23PM +0100, Tim Sutton via QGIS-Developer wrote:
> I believe this is normal.

I believe this is NOT normal. It may be "expected" (ie: we all know
about this problem), but that doesn't make it normal.

Normal is for a testing framework to actually only fail if a bug is
introduced by a modification and succeed otherwise.

I would incourage people who get failures when running tests to file
tickets, as a very first step to reach that state.

> On Sun, Sep 11, 2022 at 11:17 AM Nicolas Godet via QGIS-Developer <
> qgis-developer@lists.osgeo.org> wrote:
> 
> > Same « issue » here where I have a lot of failed test locally.

--strk;
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Max connection PostgreSQL limit

2022-10-06 Thread Matthias Kuhn via QGIS-Developer
Hi Francisco,

QGIS does internally have connection pooling and uses up to 8 connections
per database.
It detects common database connections based on the URI, where there may be
different parameters used for layers even if they come from the same
database (e.g. SSL parameters, authentication, ...). That could be an
explanation for multiplication of connections.
You can inspect those with:

for _, l in QgsProject.instance().mapLayers().items():
print(l.dataProvider().uri())

Cheers
Matthias


On Thu, Oct 6, 2022 at 11:13 AM Francisco Puga via QGIS-Developer <
qgis-developer@lists.osgeo.org> wrote:

> Hi,
>
> I'm hitting the default (100) `max_connection` PostgreSQL limit with ~4
> users using a QGIS project with ~25 layers/tables. I know that I can raise
> the limit, but I'm trying to understand how QGIS handles database
> connections.
>
> I didn't find so much information about it:
>
>
>1.
>https://lists.osgeo.org/pipermail/qgis-developer/2008-March/003446.html.
>Old post against, something like, an internal connection pool in QGIS
>2. https://github.com/qgis/QGIS/issues/30373. Feature request to share
>a single connection between different layers
>3. https://stackoverflow.com/a/71557537/930271 an ¿explanation? of how
>connection works in QGIS. I copy&paste here because this post may be hide
>for some users:
>
> for what I know every single layer creates at least one, possibly two,
>> connections (one is read only the other one is read-write ), these two
>> connections have the same lifetime of the layer, the read-write connection
>> is created on-demand if a read-write operation is requested
>> (editing/adding/deleting features).
>
> Multiple layers using the same DB connection will not share these two
>> connections.
>
> In addition to the two connections above, temporary connections are
>> created from a connection pool when the features are fetched from the
>> layer(s), these connections are pooled (shared) and released when the
>> fetching is finished, there is also a timeout to close them after 60
>> seconds idle.
>
> It would be useful to check PG logs and see in which state these
>> connections are, from my tests, the read-only connection is kept in
>> ClientRead | idle.
>
>
> So,
>
>- Can someone confirm the previous quote, explain how QGIS handles
>connections, or point me to relevant code or doc?
>- An invisible/unchecked layer consumes a connection?
>- Does make sense a feature request about this topic. Maybe
>   - Reuse connection
>   - a kind of internal pooling
>   - a configurable user limit, so next database access will wait for
>   other connections to close to start operations
>   - ...
>
> Many thanks.
>
> --
> Francisco Puga
> iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
> https://icarto.es
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>

-- 
 

QFIELD 2.0 IS HERE! - Hold the power of QGIS in 
your hand - learn more 
 - get it now 


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


[QGIS-Developer] Max connection PostgreSQL limit

2022-10-06 Thread Francisco Puga via QGIS-Developer
Hi,

I'm hitting the default (100) `max_connection` PostgreSQL limit with ~4
users using a QGIS project with ~25 layers/tables. I know that I can raise
the limit, but I'm trying to understand how QGIS handles database
connections.

I didn't find so much information about it:


   1.
   https://lists.osgeo.org/pipermail/qgis-developer/2008-March/003446.html.
   Old post against, something like, an internal connection pool in QGIS
   2. https://github.com/qgis/QGIS/issues/30373. Feature request to share a
   single connection between different layers
   3. https://stackoverflow.com/a/71557537/930271 an ¿explanation? of how
   connection works in QGIS. I copy&paste here because this post may be hide
   for some users:

for what I know every single layer creates at least one, possibly two,
> connections (one is read only the other one is read-write ), these two
> connections have the same lifetime of the layer, the read-write connection
> is created on-demand if a read-write operation is requested
> (editing/adding/deleting features).

Multiple layers using the same DB connection will not share these two
> connections.

In addition to the two connections above, temporary connections are created
> from a connection pool when the features are fetched from the layer(s),
> these connections are pooled (shared) and released when the fetching is
> finished, there is also a timeout to close them after 60 seconds idle.

It would be useful to check PG logs and see in which state these
> connections are, from my tests, the read-only connection is kept in
> ClientRead | idle.


So,

   - Can someone confirm the previous quote, explain how QGIS handles
   connections, or point me to relevant code or doc?
   - An invisible/unchecked layer consumes a connection?
   - Does make sense a feature request about this topic. Maybe
  - Reuse connection
  - a kind of internal pooling
  - a configurable user limit, so next database access will wait for
  other connections to close to start operations
  - ...

Many thanks.

-- 
Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
https://icarto.es
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] PyQgis Standalone app from 3.4 to 3.16

2022-10-06 Thread Luca Manganelli via QGIS-Developer
QGIS 3.16 is now unsupported. I suggest you to try the new QGIS 3.22 LTR.

-- 





Comune di Trento 

via Belenzani, 19 - 38122 Trento | C.F e P. IVA: 
00355870221

tel. +39 0461.884111 | www.comune.trento.it 
 


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


Re: [QGIS-Developer] PyQgis Standalone app from 3.4 to 3.16

2022-10-06 Thread Luca Manganelli via QGIS-Developer
in the bin folder of the QGIS there is a python bat file. You could use it
to run your python app.

-- 





Comune di Trento 

via Belenzani, 19 - 38122 Trento | C.F e P. IVA: 
00355870221

tel. +39 0461.884111 | www.comune.trento.it 
 


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