-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
66689: sql: include placeholder values in SHOW QUERIES r=matthewtodd a=matthewtodd Resolves #61569 Given this test script, running against a `cockroach demo` cluster: ```ruby require "pg" c = PG::Connection.new(host: "localhost", port: 26257, user: "root") c.prepare("test", "SELECT pg_sleep(20), upper($1)") c.exec_prepared("test", ["hello"]) c.close ``` Here's what we would see before this change, in particular the $1 as the argument to `upper()`: ``` > select query from [show queries] where application_name like '%run%'; query ---------------------------------- SELECT pg_sleep(20), upper($1) (1 row) ``` And here's what we now see, the string 'hello' filled in: ``` > select query from [show queries] where application_name like '%run%'; query --------------------------------------- SELECT pg_sleep(20), upper('hello') (1 row) ``` Release note (sql change): The SHOW QUERIES command was extended for prepared statements to show the actual values in use at query time, rather than the previous $1, $2, etc., placeholders. We expect showing these values will greatly improve the experience of debugging slow queries. 66760: kvserver: deadlock when getting replica.Desc while under lock r=tbg,adityamaru a=aliher1911 Error logging was using replica.Desc() to get range keys while already operating under replica read lock. It was causing deadlock if another go routine tried to acquire a write. We already have a description locally so no need to get locks at all. Release note (bug fix): Fix deadlock during adminVerifyProtectedTimestamp Fixes #66759 Co-authored-by: Matthew Todd <[email protected]> Co-authored-by: Oleg Afanasyev <[email protected]>
- Loading branch information
Showing
6 changed files
with
151 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters