[archive] implement support for PostgreSQL databases (#6152)

This commit is contained in:
Mike Fährmann
2025-02-16 17:33:25 +01:00
parent b4eae65965
commit 841bc9f66f
3 changed files with 160 additions and 27 deletions

View File

@@ -922,11 +922,13 @@ Description
extractor.*.archive
-------------------
Type
|Path|_
* ``string``
* |Path|_
Default
``null``
Example
``"$HOME/.archives/{category}.sqlite3"``
* ``"$HOME/.archives/{category}.sqlite3"``
* ``"postgresql://user:pass@host/database"``
Description
File to store IDs of downloaded files in. Downloads of files
already recorded in this archive file will be
@@ -937,6 +939,11 @@ Description
memory requirements are significantly lower when the
amount of stored IDs gets reasonably large.
If this value is a
`PostgreSQL Connection URI <https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS>`__,
the archive will use this PostgreSQL database as backend (requires
`Psycopg <https://www.psycopg.org/>`__).
Note: Archive files that do not already exist get generated automatically.
Note: Archive paths support regular `format string`_ replacements,