mirror of
https://github.com/sprockets/sprockets-postgres.git
synced 2024-11-14 11:19:27 +00:00
86b6c022f0
Even though ``0`` is documented as the max pool size in the aiopg docs, setting it to 0 causes an exception in `aiopg.pool.Pool._fill_free_pool`: ``` File "/Users/gavinr/Source/PSE/anabroker/env/lib/python3.7/site-packages/aiopg/pool.py", line 208, in _fill_free_pool if override_min and self.size < self.maxsize: TypeError: '<' not supported between instances of 'int' and 'NoneType' ``` Set to the same default as aiopg, @ 10.
27 lines
2.3 KiB
ReStructuredText
27 lines
2.3 KiB
ReStructuredText
Configuration
|
|
=============
|
|
:py:mod:`sprockets-postgres <sprockets_postgres>` is configured via environment variables. The following table
|
|
details the configuration options and their defaults.
|
|
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| Variable | Definition | Default |
|
|
+=================================+==================================================+===========+
|
|
| ``POSTGRES_URL`` | The PostgreSQL URL to connect to | |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| ``POSTGRES_MAX_POOL_SIZE`` | Maximum connection count to Postgres per backend | ``10`` |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| ``POSTGRES_MIN_POOL_SIZE`` | Minimum or starting pool size. | ``1`` |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| ``POSTGRES_CONNECTION_TIMEOUT`` | The maximum time in seconds to spend attempting | ``10`` |
|
|
| | to create a new connection. | |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| ``POSTGRES_CONNECTION_TTL`` | Time-to-life in seconds for a pooled connection. | ``300`` |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| ``POSTGRES_QUERY_TIMEOUT`` | Maximum execution time for a query in seconds. | ``60`` |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| ``POSTGRES_HSTORE`` | Enable HSTORE support in the client. | ``FALSE`` |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| ``POSTGRES_JSON`` | Enable JSON support in the client. | ``FALSE`` |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|
|
| ``POSTGRES_UUID`` | Enable UUID support in the client. | ``TRUE`` |
|
|
+---------------------------------+--------------------------------------------------+-----------+
|