Commit Graph

9 Commits

Author SHA1 Message Date
Roman Khapov a7049a26d9
several fixes (#723)
* sources/hba_reader.c: fix list of keywords

It must contain {0,0,0} at the end.

Signed-off-by: rkhapov <r.khapov@ya.ru>

* context.c: fix warn

This patch fixes warnings about writing function
pointer into data pointer

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/macro.h: fix warn

about signed vs unsiged comparison

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/rules.c: remove unused func

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/counter.c: fix warn

About memcpy to volatile variable

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/rules.c: fix warn

And remove useless if's

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/rules.c: remove unused var

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/console.c: remove unused vars

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/frontend.c: remove unsed var

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/rules.c: fix warns

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/backend.c: remove unused count

From functions od_backend_query*, count arg is not used

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/odyssey.h: add backend_sync

To fix warn about implicit declaration of od_backend_request_sync_point

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/address.c: fix implicit inet_pton

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/address.c: fix warn

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/clock.c: fix warn

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/rules.c: fix uninitialized var

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/frontend.c: fix warn

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/scram.c: return instead of free

goto in this place will lead to free on unitialized ptr

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/scram.c: fix warn

Case when size + 1 >= INT_MAX is extremely unlikely

Signed-off-by: rkhapov <r.khapov@ya.ru>

* test/odyssey: use test macro instead of assert

More informative + do not produce warnings

Signed-off-by: rkhapov <r.khapov@ya.ru>

* thread.c: fix warn about implicit func

Signed-off-by: rkhapov <r.khapov@ya.ru>

* docker/bin/ody-stop: SIGTERM wait

This is more useful for tests: will help to find out
if gracefully termination in odyssey doestn't work.

Signed-off-by: rkhapov <r.khapov@ya.ru>

* docker/Dockerfile: update libasan

This will possibly fix infinite DEADLYSIGNAL error

Signed-off-by: rkhapov <r.khapov@ya.ru>

* docker/entrypoint.sh: disable addr randomization

There is some bug with asan we currently using
This bug leads to infinite DEADLYSIGNAL message
on odyssey-asan runs sometimes

This patch adds some simple workaround about it

Signed-off-by: rkhapov <r.khapov@ya.ru>

* soureces/hba.c: fix reloading

It was broken, because it sets new rules list at the stack.

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/rules.c: fix router closing

It should be closed after every usage.
This patch moves closing after every logging,
otherwise there will be use-after-free.

Signed-off-by: rkhapov <r.khapov@ya.ru>

---------

Signed-off-by: rkhapov <r.khapov@ya.ru>
Co-authored-by: rkhapov <r.khapov@ya.ru>
2024-12-10 00:41:45 +05:00
reshke 39d0c3aeb3
Channel binding for SCRAM auth method (#490)
* Channel binding for SCRAM auth method

* Apply fmt
2023-07-10 14:04:48 +03:00
reshke 1710d40246
Target session attr feature for storage (#456)
* 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.
2022-08-18 17:15:13 +05:00
kirill reshke 419037c4ae
Remove usage of non-thread-save function (getopt) usage (#395)
* Remove usage of non-thread-save function (getopt) usage

* Fix fmt

* Fix include popt

* shell tests for pgoptions
2021-12-26 02:18:30 +05:00
Heckad f4d6f4794b Add parse pgoptions and extract search_path 2021-07-07 11:32:38 +03:00
Georgy Rylov c25c5bd050
Applying clang-format with saving indentations (#140)
* applying clang-format with saving indentations

* rebase
2020-04-02 16:00:56 +05:00
Dmitry Simonenko 9d6dea5d92 odyssey: major parameter settings optimization 2018-12-12 16:07:25 +03:00
Dmitry Simonenko cd076462eb odyssey: implement and use shared parameters state 2018-09-25 18:40:50 +03:00
Dmitry Simonenko 7ac8dc0b10 kiwi: import implementation 2018-08-23 16:17:15 +03:00