* Auto-generatew default internal pool if none specified.
Added auto-generation logic to create internal rule for aurh-query
when none "pool_internal" rules was specified, but auth query is in use.
* Add sample config for auth-query autogen and fix bugs
* Fix
* Fix2
* rules.c edited online with Bitbucket
---------
Co-authored-by: Kirill Reshke <reshke@yandex-team.ru>
* Reject connection initiating in replication lag too high.
In replication lag polling feature, check replication lag on connection
startuy (before auth), and reject connection if replication lag is too high.
* Apply fmt
* Target session attr feature for storage
Storage host section is now accepts a comma-separated
PostgreSQL hosts list, in format "host2,host2"
or "[host1]:port1,host2" etc.
Storage structure now holds pointer to host, which connection was acquired.
This is required to cancel`s queries to work fine.
Target session attrs policies added:
read-write
read-only
any (default)
Target session attrs uses pg_is_in_recovery function to
check if host in primary or replica. in_hot_standby option is not checked yet.
* fix collector init
* Added promhttp server
* Fix memory leak
* Fix memory leak
* Minimum viable server
* Port is now set via config
* Port is now set via config
* Port is now set via config
* Better code organisation & config procession
* Fix docs
* Fix old typo in label_count
* More reliable init
* Shuffle metrics by label for more appropriate collection
* Done with shuffling
* Done, not tested
* Done, now rebase
* Format
* Fix port
Co-authored-by: tim-shlyap <tim-shlyap@yandex-team.ru>
* Ldapless
* Ldapless
* Console are now considering roles
* For pull from origin
* Done, but not tested
* Works, but do not drop connections to console
* Update to origin
* Added drop connections with lowered role via reload
* Format and rename
* Fix makefile & dev.conf
* Fix makefile & dev.conf
* Fix lagpolling tests
* Fix tests
* Fix tests
* Add tests & fix .conf
* Add tests & fix .conf
* Add tests & fix .conf
Co-authored-by: tim-shlyap <tim-shlyap@yandex-team.ru>
* Fix config validation for auth query when there is no PAM module available in system
* Fix compiler warns
Co-authored-by: Kirill Reshke <reshke@qavm-da1bb86b.qemu>
* Move auth query server querying logic to separate file
* Refactor query code to support not only "auth_query" like queries
* Move storage logic to separate file & add storage watchdog
* Force several settings on starts
* Fix simple query parsing
* Fixed bugs
* Fix config reload
* Add tests
* Move cathcup logic to separate func
* Fix tests[2]
Co-authored-by: Andrey Borodin <amborodin@acm.org>