Skip to content

Throw away prepared statements on terminate - #8137

Merged
joehan merged 2 commits into
masterfrom
jh-check-query
Jan 27, 2025
Merged

joehan merged 2 commits into
masterfrom
jh-check-query

Conversation

@joehan

@joehan joehan commented Jan 24, 2025 •

Copy link
Copy Markdown
Member

Description

When we get a TERMINATE message from the frontend, we need to DEALLOCATE all currently prepared statements because the new client will not know about them.

Also, bumps to the latest patch version of pglite.

Fixes part of #8133, specifically the SQL Error: pq: prepared statement "1" already exists errors

Scenarios Tested

After an error that leads to a terminate message, future queries still work as normal.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 51.11%. Comparing base (774d3f0) to head (4a4df1b).
Report is 17 commits behind head on master.

Files with missing lines Patch % Lines
src/emulator/dataconnect/pgliteServer.ts 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8137      +/-   ##
==========================================
+ Coverage   51.10%   51.11%   +0.01%     
==========================================
  Files         423      423              
  Lines       29636    29703      +67     
  Branches     6063     6078      +15     
==========================================
+ Hits        15144    15184      +40     
- Misses      13134    13154      +20     
- Partials     1358     1365       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fredzqm fredzqm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. Though don't really understand its intricacy very well.

@joehan
joehan enabled auto-merge (squash) January 27, 2025 21:50
@joehan
joehan merged commit 3a4f1fc into master Jan 27, 2025
@joehan
joehan deleted the jh-check-query branch January 27, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants