Commit Graph

1721 Commits

Author SHA1 Message Date
kirill reshke c35176867e
add peername to erros log (#141)
Co-authored-by: reshke <Kirill Reshke>
2020-04-02 12:31:19 +05:00
Georgy Rylov b7d108742c
Merge pull request #69 from x4m/reformat
Use automatic formatting
2020-04-02 07:36:59 +05:00
Andrey Borodin 6776e43134 Try to stop TLS handshakes on shutdown 2020-03-23 18:14:18 +05:00
Andrey Borodin 438e6ae1e7
Extended show pools (#135)
* Extended show pools

* Output time quantiles in SHOW POOLS EXTENDED

One important caveat is that quantiles itself will be taken from console database.
But if route does not have quantiles defined all stats will be zero.

* Change quantile refresh period
2020-03-18 10:12:53 +05:00
Fumiyuki Kato 8cec9ef917
add PostgreSQL Apt Repository to Dockerfile (#136) 2020-03-17 09:52:40 +05:00
Andrey Borodin 64b1393948
Fix error recovery logging in od_frontend() (#133) 2020-03-12 13:44:55 +05:00
Andrey Borodin a5649e8cce Fix incorrect login time in error when log_session is not enabled 2020-03-11 13:41:14 +05:00
Andrey Borodin 1b6f168c3d
Do not use abort() in frontend code (#131)
* Do not use abort() in frontend code

* Do not abort() on known but erroneous statuses
2020-03-10 15:22:26 +05:00
Andrey Borodin b7bcb86956
Implement server lifetime (#129) 2020-02-28 15:20:55 +05:00
Andrey Borodin 5f7e3ea546 Upgrade dependency to PG11 and fix CI 2020-02-28 15:10:38 +05:00
Andrey Borodin c0d972e779 Fix multiple listeners 2020-02-24 15:18:35 +05:00
Andrey Borodin 79b737d1d9 Remove extroueous include 2020-02-24 15:18:35 +05:00
Andrey Borodin 553f176e99 Move contexts under mm_self 2020-02-24 15:18:35 +05:00
Andrey Borodin c4b7a3cc18 Use one tls cts per thread 2020-02-24 15:18:35 +05:00
Andrey Borodin c0a28f0d15
Add host even if application name not passed (#123) 2020-02-19 12:00:44 +05:00
Andrey Borodin 785a434acb
Fix percentile read (#122) 2020-02-19 11:01:29 +05:00
Andrey Borodin b2d75b0b3c
Coverity scan results (#119)
A lot of small fixes for small bugs of various severity
2020-02-18 18:05:02 +05:00
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