HomeSoftware Heritage

Make postgresql's Storage client options configurable from config

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Make postgresql's Storage client options configurable from config

Adding a query_options member to postgresql's Storage, in conjunction
with swh.core >= 2.5, allows to set/overwrite SQL client options from
the storage configuration file.

Default values are set, as they used to be, from the decorator
arguments. But in addition to this, one can overload these value at run
time from the storage configuration file. For example:

.. code-block:: yaml

storage:
  cls: postgresql
  db: testdb
  objstorage:
    cls: memory
  query_options:
    directory_ls:
      statement_timeout: 180000

will provide a Storage instance for which the timeout value for the
directory_ls endpoint is 3mn (instead of the default 20s).

Details

Provenance
douarddaAuthored on Mar 30 2022, 2:39 PM
douarddaPushed on Apr 4 2022, 4:59 PM
Differential Revision
D7473: Make postgresql's Storage client options configurable from config
Build Status
Buildable 28103
Build 44015: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.