dependabot[bot]
b61959a2c6
chore(deps): bump base64 from 0.13.0 to 0.13.1 ( #203 )
...
Bumps [base64](https://github.com/marshallpierce/rust-base64 ) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases )
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md )
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.13.0...v0.13.1 )
---
updated-dependencies:
- dependency-name: base64
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 11:20:10 -07:00
dependabot[bot]
101db7e88b
chore(deps): bump rustls-pemfile from 1.0.0 to 1.0.1 ( #205 )
...
Bumps [rustls-pemfile](https://github.com/rustls/pemfile ) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/rustls/pemfile/releases )
- [Commits](https://github.com/rustls/pemfile/commits )
---
updated-dependencies:
- dependency-name: rustls-pemfile
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 11:20:00 -07:00
dependabot[bot]
01bbc1f093
chore(deps): bump bytes from 1.1.0 to 1.2.1 ( #206 )
...
Bumps [bytes](https://github.com/tokio-rs/bytes ) from 1.1.0 to 1.2.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases )
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md )
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.1.0...v1.2.1 )
---
updated-dependencies:
- dependency-name: bytes
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 11:19:47 -07:00
dependabot[bot]
e13c6091dd
chore(deps): bump async-trait from 0.1.52 to 0.1.58 ( #200 )
...
Bumps [async-trait](https://github.com/dtolnay/async-trait ) from 0.1.52 to 0.1.58.
- [Release notes](https://github.com/dtolnay/async-trait/releases )
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.52...0.1.58 )
---
updated-dependencies:
- dependency-name: async-trait
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 09:53:19 -07:00
dependabot[bot]
70c791b173
chore(deps): bump sha2 from 0.10.2 to 0.10.5 ( #199 )
...
Bumps [sha2](https://github.com/RustCrypto/hashes ) from 0.10.2 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases )
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.2...sha2-v0.10.5 )
---
updated-dependencies:
- dependency-name: sha2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 09:53:04 -07:00
dependabot[bot]
7ec866d4a9
chore(deps): bump serde_derive from 1.0.136 to 1.0.147 ( #198 )
...
Bumps [serde_derive](https://github.com/serde-rs/serde ) from 1.0.136 to 1.0.147.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.136...v1.0.147 )
---
updated-dependencies:
- dependency-name: serde_derive
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 09:52:46 -07:00
dependabot[bot]
552e1cf0e7
chore(deps): bump regex from 1.5.5 to 1.6.0 ( #197 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.5.5 to 1.6.0.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.5.5...1.6.0 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-31 09:50:35 -07:00
Pradeep Chhetri
19ffeffb3b
Add dependabot for keeping dependencies up-to-date ( #196 )
...
It will help us to keep the dependencies up-to-date
Signed-off-by: Pradeep Chhetri <pradeepchhetri4444@gmail.com >
Signed-off-by: Pradeep Chhetri <pradeepchhetri4444@gmail.com >
2022-10-31 09:47:33 -07:00
Lev Kokotov
9fe8d5e76f
Dont change shard unless you know ( #195 )
2022-10-26 00:14:08 -07:00
Lev Kokotov
0524787d31
Automatic sharding: part one of many ( #194 )
...
Starting automatic sharding
2022-10-25 11:47:41 -07:00
Lev Kokotov
fa267733d9
Fix docker-compose ( #193 )
...
Fix docker-compose local build
2022-10-24 11:05:33 -07:00
Lev Kokotov
dea952e4ca
Re-enable query parser and parse multiple statements ( #191 )
...
* Re-enable query parser and parse multiple statements
* no diff
2022-10-23 16:59:51 -07:00
zainkabani
19f635881a
Don't send discard all when state is changed in transaction ( #186 )
...
* Don't send discard all when state is changed in transaction
* Remove unnecessary clone
* spelling
* Move transaction check to SET command
* Add test for set command in transaction
* type
* Update comments
* Update comments
* use moves instead of clones for initial message
* don't make message mutable
* Update unwrap
* but i'm not a wrapper
* Add set local test
* change continue
2022-10-13 19:33:12 -07:00
Mostafa Abdelraouf
eceb7f092e
Use Jemalloc ( #189 )
...
Jemalloc performs better than the standard allocator in various metrics (http://ithare.com/testing-memory-allocators-ptmalloc2-tcmalloc-hoard-jemalloc-while-trying-to-simulate-real-world-loads/ ).
This PR makes changes to use Jemalloc as the global allocator for Pgcat. Windows is not officially supported by Pgcat but it should still compile but without Jemalloc as the allocator.
2022-10-13 11:13:45 -05:00
Mostafa Abdelraouf
83fd639918
A bit faster get_pool ( #187 )
...
* A bit faster get_pool
* fmt
2022-10-08 08:16:04 -07:00
Mostafa Abdelraouf
3d33ccf4b0
Fix maxwait metric ( #183 )
...
Max wait was being reported as 0 after #159
This PR fixes that and adds test
v0.3.0
2022-10-05 21:41:09 -05:00
Lev Kokotov
7987c5ffad
Replace a few types with more developer-friendly names ( #182 )
...
* Replace a few types with more developer-friendly names
* UserPool -> PoolIdentifier
2022-10-01 10:25:59 -07:00
zainkabani
24f5eec3ea
Change sharding config to enum and move validation of configs into public functions ( #178 )
...
Moves config validation to own functions to enable tools to use them
Moves sharding config to enum
Makes defaults public
Make connect_timeout on pool and option which is overwritten by general connect_timeout
2022-09-28 08:50:14 -05:00
Mostafa Abdelraouf
af064ef447
Set client state to idle after error ( #179 )
...
* Set client state to idle after error
* fmt
* spelling
* clean up
2022-09-24 09:09:15 -07:00
Lev Kokotov
e84a6f834c
Update README.md
2022-09-23 12:24:30 -07:00
Lev Kokotov
19fd677891
Fix the pool fix ( #176 )
...
* Always listen to the compiler
* Its fine
2022-09-23 12:06:07 -07:00
Lev Kokotov
964a5e1708
Don't drop connections if DB hasn't changed ( #175 )
...
* Don't drop connections if DB hasn't changed
* Incoporate connect_timeout into the pool config
* use the field
2022-09-23 11:32:05 -07:00
Mostafa Abdelraouf
d126c7424d
Log failed client logins ( #173 )
...
* Log failed client logins
* more logging
* remove clones
* remove
2022-09-23 09:08:38 -07:00
zainkabani
f72dac420b
Add defaults for configs ( #174 )
...
* add statement timeout to readme
* Add defaults to various configs
* primary read enabled default to false
2022-09-22 23:00:46 -07:00
zainkabani
3a729bb75b
Minor refactor for configs ( #172 )
...
* Changes shard struct to use vector of ServerConfig
* Adds to query router
* Change client disconnect with error message to warn instead of debug
* Add warning logs for clean up actions
2022-09-22 10:07:02 -07:00
zainkabani
85cc2f4147
Update to latest library versions ( #170 )
2022-09-21 13:48:33 -07:00
zainkabani
8c09ab6c20
Export pgcat objects in lib ( #169 )
...
* Export pgcat objects in lib
* fmt
2022-09-20 18:47:32 -07:00
Mostafa Abdelraouf
f7a951745c
Report Query times ( #166 )
...
* Report avg and total query timing
* Report query times
* fmt
2022-09-15 02:21:45 -04:00
Mostafa Abdelraouf
4ae1bc8d32
Add SHOW CLIENTS / SHOW SERVERS + Stats refactor and tests ( #159 )
...
* wip
* Main Thread Panic when swarmed with clients
* fix
* fix
* 1024
* fix
* remove test
* Add SHOW CLIENTS
* revert
* fmt
* Refactor + tests
* fmt
* add test
* Add SHOW SERVERS + Make PR unreviewable
* prometheus
* add state to clients and servers
* fmt
* Add application_name to server stats
* Add tests for waiting clients
* Docs
* remove comment
* comments
* typo
* cleanup
* CI
2022-09-14 11:20:41 -04:00
Lev Kokotov
075167431d
Add Discord link ( #164 )
...
* Add Discord link
* move it up
* :)
* hmm
* hmm
* :O
2022-09-08 08:12:37 -07:00
Mostafa Abdelraouf
9514b3b2d1
Clean connection state up after protocol named prepared statement ( #163 )
...
* Clean connection state up after protocol named prepared statement
* Avoid cloning + add test
* fmt
2022-09-07 20:37:17 -07:00
Lev Kokotov
6d41640ea9
Send signal even if process is gone ( #162 )
...
* Send signal even if process is gone
* hmm
* hmm
2022-09-07 09:22:52 -07:00
Mostafa Abdelraouf
744ceada86
Better logging for failure to get connection from pool ( #161 )
2022-09-07 08:24:07 -07:00
Mostafa Abdelraouf
a5c8dd69b2
Avoid reporting ProtocolSyncError when admin session disconnects ( #160 )
...
* Avoid reporting ProtocolSyncError when admin session disconnects
* rebuild
* rebuild
2022-09-06 22:22:31 -07:00
zainkabani
6a9a4db648
Adds microsecond logging and also reformats duration to include milliseconds ( #156 )
...
* Adds microsecond logging and also reformats duration to include milliseconds
* fmt
* attempt to fix cd
* revert
2022-09-05 01:21:27 -07:00
Mostafa Abdelraouf
976b406468
Main Thread Panic when swarmed with clients ( #158 )
...
* Main Thread Panic when swarmed with clients
* fix
* fix
* 1024
* fix
* remove test
* Update src/client.rs
* Update src/main.rs
* Update src/client.rs
* Update src/main.rs
Co-authored-by: Lev Kokotov <levkk@users.noreply.github.com >
2022-09-05 01:21:06 -07:00
zain-kabani
417358c35d
Patch graceful shutdown bug ( #157 )
...
* Fixes non-admin client counting error
* Add log when sigterm received and log number of active clients when shutdown timeout is reached
2022-09-05 01:02:49 -07:00
Mostafa Abdelraouf
23a642f4a4
Send DISCARD ALL even if client is not in transaction ( #152 )
...
* Send DISCARD ALL even if client is not in transaction
* fmt
* Added tests + avoided sending extra discard all
* Adds set name logic to beginning of handle client
* fmt
* refactor dead code handling
* Refactor reading command tag
* remove unnecessary trim
* Removing debugging statement
* typo
* typo{
* documentation
* edit text
* un-unwrap
* run ci
* run ci
Co-authored-by: Zain Kabani <zain.kabani@instacart.com >
2022-09-01 20:06:55 -07:00
Mostafa Abdelraouf
7f20dc3054
Better handling extended protocol messages in the event of busy pool ( #155 )
...
* Better handling for checkout errors during extended protocol messages
* Fix specs
* comment
2022-09-01 15:02:39 -07:00
Mostafa Abdelraouf
36339bd96f
Log Address information in connection create/drop ( #154 )
...
* Log Address information in connection create/drop
* run ci
2022-09-01 11:16:22 -07:00
Mostafa Abdelraouf
65b69b46d2
Allow running integration tests with coverage locally ( #151 )
2022-08-30 10:43:45 -07:00
Mostafa Abdelraouf
d48c04a7fb
Ruby integration tests ( #147 )
...
* Ruby integration tests
* forgot a file
* refactor
* refactoring
* more refactoring
* remove config helper
* try multiple databases
* fix
* more databases
* Use pg stats
* ports
* speed
* Fix tests
* preload library
* comment
2022-08-30 09:14:53 -07:00
zainkabani
2628dec42e
Move autoreloader to own tokio task ( #148 )
2022-08-29 00:08:44 -07:00
Mostafa Abdelraouf
3bc4f9351c
Exit with failure codes if configs are bad ( #146 )
...
* Exit with failure codes if configs are bad
* fmt
2022-08-25 18:56:18 -07:00
Lev Kokotov
9d84d6f131
Graceful shutdown and refactor ( #144 )
...
* Graceful shutdown and refactor
* ok
* _Graceful_ shutdown
* Remove hardcoded setting
* clean up
* end
* timeout
* hmm
* hmm!
* bash
* bash
* hmm
* maybe maybe
* Adds tests and move non-admin connection rejection to startup (#145 )
* Move error response
* Adds tests and removes unused variable
* Adds debug log
Co-authored-by: zainkabani <77307340+zainkabani@users.noreply.github.com >
2022-08-25 06:40:56 -07:00
Mostafa Abdelraouf
c054ff068d
Avoid sending Z packet in the middle of extended protocol packet sequence if we fail to get connection from pool ( #137 )
...
* Failing test
* maybe
* try fail
* try
* add message
* pool size
* correct user
* more
* debug
* try fix
* see stdout
* stick?
* fix configs
* modify
* types
* m
* maybe
* make tests idempotent
* hopefully fails
* Add client fix
* revert pgcat.toml change
* Fix tests
2022-08-23 11:02:23 -07:00
Lev Kokotov
5a0cea6a24
Really fix idle servers ( #141 )
2022-08-22 11:56:40 -07:00
Lev Kokotov
d0e8171b1b
Fix too many idle servers ( #140 )
...
* Fix too many idle servers
* oops
2022-08-22 11:52:34 -07:00
Lev Kokotov
069d76029f
Fix incorrect routing for replicas ( #139 )
...
* Fix incorrect routing for replicas
* name
2022-08-21 22:40:49 -07:00
Lev Kokotov
902fafd8d7
Random lb ( #138 )
2022-08-21 22:20:31 -07:00