Commit Graph

1703 Commits

Author SHA1 Message Date
kirill reshke c0848c6e42
Count free servers in pgbouncer style (#121) 2020-02-18 14:46:13 +05:00
Georgy Rylov e68ae929cd
ASAN (#120) 2020-02-17 12:22:04 +05:00
Andrey Borodin 1bace0fedb Add coverity scan, faster CI 2020-02-14 12:15:29 +05:00
Andrey Borodin f71381769e Add coverity scan, step 1 2020-02-14 12:06:58 +05:00
Andrey b0317d754f Remove superflous logs
This reverts commit 958f1c53d1.
2020-02-10 11:19:42 +05:00
Andrey 8421873a79 Log tls error login time 2020-02-10 11:19:42 +05:00
Andrey dd21f6fb66 Temporary add some more logs 2020-02-10 11:19:42 +05:00
Andrey 29efc7812e Add cancel\rollback timeout 2020-02-10 11:19:42 +05:00
Andrey c39e8961c7 Log unsucessfull server resets 2020-02-10 11:19:42 +05:00
Andrey b358a59149 Enhance disconnect debug 2020-02-10 11:19:42 +05:00
Andrey Borodin a8f53c0825
Support SHOW DATABASES console command (#102) 2020-01-28 14:41:25 +05:00
Andrey Borodin 5ed39fa2df
Fix canceling query with TLS-requiring connections (#111) 2020-01-28 14:23:38 +05:00
efimkin 60d7229cdc Enhance settings for replication support (#107) 2020-01-27 18:01:53 +05:00
Andrey f74abbf6ca Fix mesmerged 'break;' loss 2020-01-27 17:48:04 +05:00
Andrey Borodin 507682fdd5
Quantiles for transactions and queries (#95) 2020-01-24 17:31:15 +05:00
Andrey 3732c8b8b7 Refactor server_max_routing setting, use it for expiration too 2020-01-24 12:02:35 +05:00
Andrey ec0882609c Move try-read logic to relay_start
Previously we tried to avoid attaching to server connection
by read-testing client before attach. This does not work well
when client wants to disconnect: we read from client twice,
and it happens after Term(X,88) message from client.
To avoid this problem we move read-tesing to start of relay.
2020-01-23 11:36:09 +05:00
Andrey 8496cde80a Implement server_max_routing restriction 2020-01-23 11:35:47 +05:00
Andrey 0bf792c4af Add server_login_retry timeout 2020-01-23 11:35:47 +05:00
Andrey 2a37c37e23 Fix incorrect password response forwarding 2020-01-20 11:46:43 +05:00
Andrey e773dbb260 Add application_name_add_host setting 2020-01-20 11:43:16 +05:00
Andrey 2bacfcb972 Fix pgbouncer compatibility in SHOW SERVERS 2020-01-17 17:05:55 +05:00
Andrey 8dfcedb3df Fix pgbouncer compatibility in SHOW CLIENTS 2020-01-17 11:04:54 +05:00
Andrey 303dc0af3b Remove useless logging of startup errors 2020-01-17 11:04:29 +05:00
Andrey Borodin 9adc6493f6 Fix query logging in simple protocol mode 2020-01-16 15:06:35 +05:00
Andrey b49213e066 Connect to server only when client have pending data
Currently we attach to server right after connection. This creates some
troubles especially in session pooling. With this commit we only attach
to server connection when at least one byte of client data arrived.
2020-01-14 11:50:51 +05:00
Andrey Borodin 465577dca0 Restrict number of startup sttempts 2019-12-27 17:22:32 +05:00
Andrey Borodin 887e4aa2d8 Decline GSS API request 2019-12-27 17:05:19 +05:00
Dmitry Dolgov d0be26bf75 Fix build on ubuntu (#90)
Ubuntu pg_config packaged a bit differently, and required libraries
actually can be found in pkglibdir. Search anyway for libdir, then
pkglibdir. Another catch is that pg_config add a new line at the end,
which breaks stuff, so strip it.
2019-12-27 16:57:26 +05:00
Andrey Borodin c5b1a12f7d Fix clients computation during enforcing route max_clients
All router->clients interactions must be atomic.
Furthermore all decrements must go throug od_frontend_close
2019-12-25 11:35:19 +05:00
Andrey Borodin 155938d3a8 Use more hints to find PG libs 2019-12-24 15:31:22 +05:00
Dmitry Dolgov 4a09b5b7e9 Modifications to build on PG12 (#86)
Build seems to fail with PostgreSQL 12 version, due to incompatibility
after [1], and required presence of libpgport (to expose pg_sprintf for
scram implementation).

To improve the situation, introduce couple of changes:

* Rely on pg_config to get lib/include directories
* Add libpgport.a into linking
* Provide different versions of pg_b64_decode/encode depending on
PG_VERSION_NUM

[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=cfc40d384ae51ea2886d599d2008ae57b529e6ea
2019-12-18 14:39:24 +05:00
Andrey Borodin 59857936cd Fix ignoring of SIGPIPE 2019-12-18 14:32:36 +05:00
Andrey Borodin 3974c0de92
Update README.md (#83)
* Update README.md

* Fix Centos script
2019-12-09 23:15:14 +05:00
Andrey Borodin 6705c040a0 Set SSL server session id 2019-12-04 15:21:50 +05:00
Andrey Borodin b98d34d489 Increase default client_max_routing 2019-12-04 15:21:50 +05:00
Andrey Borodin eb7299748d Implement login timeout 2019-12-02 18:28:39 +05:00
Andrey Borodin f43ac71d26 Optimize clocks 2019-12-02 18:19:44 +05:00
Dima Starkov 95f1740031 Add integration tests for SCRAM Authentication (#78)
* Add integration tests for SCRAM Authentication

* Made tests independent of the postgresql version
2019-11-24 21:00:00 +05:00
Andrey Borodin 2262362349 Fix PostgreSQL linkage 2019-11-21 16:54:59 +05:00
Andrey Borodin 0605a81816 Silent compiler warnings in kiwi 2019-11-21 11:13:10 +05:00
Andrey Borodin 816d45958e Revert "Add pause/resume admin console commands (#66)"
This reverts commit b426f4f301.
2019-11-19 16:57:16 +05:00
Andrey Borodin 42695c614f One more compiler warning 2019-11-19 15:33:51 +05:00
Andrey Borodin 960cba4bc9 Silent more compiler warnings 2019-11-19 15:14:51 +05:00
Andrey Borodin 793f9551b0 Fix compiler warning 2019-11-19 14:59:14 +05:00
Andrey Borodin 31a61fd368 Fix db state initialization
fix some problems in #76
2019-11-19 14:55:08 +05:00
Andrey Borodin aaa613ee41 Make some error logging better 2019-11-19 13:22:59 +05:00
Andrey Borodin ef19e5bd74 Remove db_state from route 2019-11-18 13:32:03 +05:00
Dima Starkov a8ca664a63 Implements SCRAM Authentication (#73) 2019-11-11 12:28:50 +03:00
lowgear b426f4f301 Add pause/resume admin console commands[fork of tomlikestorock's PR] (#66) 2019-11-11 11:37:09 +03:00