Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
06f7ea5
Initial commit
zainkabani Oct 13, 2023
1cd957e
Cleanup and add stats
zainkabani Oct 13, 2023
af6c2ea
Use an arc instead of full clones to store the parse packets
zainkabani Oct 13, 2023
2247f86
Use mutex instead
zainkabani Oct 13, 2023
d4d88c4
Merge branch 'main' into zain/reimplment-prepared-statements-with-glo…
zainkabani Oct 13, 2023
d2927d0
fmt
zainkabani Oct 13, 2023
fb23e33
clippy
zainkabani Oct 13, 2023
2fb3d4a
fmt
zainkabani Oct 13, 2023
a59aa63
fix?
zainkabani Oct 13, 2023
e2963e9
fix?
zainkabani Oct 13, 2023
8111582
fmt
zainkabani Oct 13, 2023
6e85fb2
typo
zainkabani Oct 13, 2023
46c8f9e
Update docs
zainkabani Oct 14, 2023
9a80b47
Refactor custom protocol
zainkabani Oct 14, 2023
19d8478
fmt
zainkabani Oct 14, 2023
a07874a
move custom protocol handling to before parsing
zainkabani Oct 14, 2023
bf5a39c
Support describe
zainkabani Oct 14, 2023
6a87a68
Add LRU for server side statement cache
zainkabani Oct 14, 2023
b528b95
rename variable
zainkabani Oct 15, 2023
0177af8
Refactoring
zainkabani Oct 15, 2023
cd7942b
Move docs
zainkabani Oct 15, 2023
6205548
Fix test
zainkabani Oct 15, 2023
9cd675e
fix
zainkabani Oct 15, 2023
89e2651
Update tests
zainkabani Oct 16, 2023
d37514f
trigger build
zainkabani Oct 16, 2023
bcce2d5
Add more tests
zainkabani Oct 16, 2023
63aa0c7
Reorder handling sync
zainkabani Oct 17, 2023
e392607
Support when a named describe is sent along with Parse (go pgx) and e…
zainkabani Oct 17, 2023
53880f2
don't talk to client if not needed when client sends Parse
zainkabani Oct 17, 2023
2842c85
fmt :(
zainkabani Oct 17, 2023
5604546
refactor tests
zainkabani Oct 17, 2023
6a1d7f6
nit
zainkabani Oct 17, 2023
a5d4bcf
Reduce hashing
zainkabani Oct 19, 2023
dd021c2
Reducing work done to decode describe and parse messages
zainkabani Oct 19, 2023
116a681
minor refactor
zainkabani Oct 19, 2023
72826e6
Merge branch 'main' into zain/reimplment-prepared-statements-with-glo…
zainkabani Oct 20, 2023
cfe8e9f
Merge branch 'main' into zain/reimplment-prepared-statements-with-glo…
zainkabani Oct 20, 2023
b27c918
Rewrite extended and prepared protocol message handling to better sup…
zainkabani Oct 21, 2023
d107bbe
An attempt to better handle if there are DDL changes that might break…
zainkabani Oct 21, 2023
21b9cde
fix
zainkabani Oct 21, 2023
d791f06
Minor stats fixed and cleanup
zainkabani Oct 21, 2023
a57550d
Cosmetic fixes (#64)
levkk Oct 23, 2023
db70499
Change server drop for statement cache error to a `deallocate all`
zainkabani Oct 23, 2023
7fa1147
Updated comments and added new idea for handling DDL changes impactin…
zainkabani Oct 23, 2023
005029d
fix test?
zainkabani Oct 23, 2023
6928d31
Revert test change
zainkabani Oct 23, 2023
b889b4b
trigger build, flakey test
zainkabani Oct 23, 2023
0dd5e88
Avoid potential race conditions by changing get_or_insert to promote …
zainkabani Oct 24, 2023
962090a
remove ps enabled variable on the server in favor of using an option
zainkabani Oct 24, 2023
80aa607
Add close to the Extended Protocol buffer
zainkabani Oct 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated comments and added new idea for handling DDL changes impactin…
…g cached plans
  • Loading branch information
zainkabani committed Oct 23, 2023
commit 7fa1147d1da2e3b2391d51fcbff05f49dd1ffc53
5 changes: 3 additions & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,10 +974,11 @@ impl Server {
let error_message = PgErrorMsg::parse(&message)?;
if error_message.message == "cached plan must not change result type" {
warn!("Server {:?} changed schema, dropping connection to clean up prepared statements", self.address);
// This will still result in an error to the client, but this server connection will drop all cache prepared statements
// This will still result in an error to the client, but this server connection will drop all cached prepared statements
// so that any new queries will be re-prepared
// TODO: Other ideas to solve errors when there DDL changes after a statement has been prepared
// TODO: Other ideas to solve errors when there are DDL changes after a statement has been prepared
// - Recreate entire connection pool to force recreation of all server connections
// - Clear the ConnectionPool's statement cache so that new statement names are generated
// - Implement a retry (re-prepare) so the client doesn't see an error
self.cleanup_state.needs_cleanup_prepare = true;
}
Expand Down