Comments (3)
Hi @kishaningithub, thanks for reporting this issue. I suspect that prepared statements are not flushed properly and cause this error to be thrown. I will try to recreate the bug and try to resolve the issue.
from psql-wire.
@kishaningithub I have just adjusted the prepared statements cache to not throw an error if a prepared statement already exists but to override it instead. Would you be able to try to reproduce the error? Feel free to Reopen the issue if the issue persists.
from psql-wire.
@jeroenrinzema Thanks for the fix and sorry for my late response. Now the "prepared statement already exists" is gone but i get the error got no result from the query
even though the query actually wrote a result set (screenshot below)
Should i raise a separate issue or should this be reopened?
Screenshot 1
One interesting thing here is that if i fire the same query very fast i actually get the result "at times" (Screenshot below)
Screenshot 2
Something wierd is going on.
Logs when the error happens
{"level":"debug","timestamp":"2022-11-19T17:25:48.402488+05:30","caller":"[email protected]/command.go:67","msg":"incoming command","length":944,"type":"P"}
{"level":"debug","timestamp":"2022-11-19T17:25:48.402723+05:30","caller":"[email protected]/command.go:276","msg":"incoming extended query","query":"SELECT n.nspname as \"Schema\",\n c.relname as \"Name\",\n CASE c.relkind\n WHEN 'r' THEN 'table' WHEN 'v' THEN 'view'\n WHEN 'p' THEN 'partitioned table'\n WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index'\n WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special'\n WHEN 'f' THEN 'foreign table' END\n as \"Type\",\n pg_catalog.pg_get_userbyid(c.relowner) as \"Owner\"\n \n FROM pg_catalog.pg_class c\n LEFT JOIN pg_catalog.pg_namespace n\n ON n.oid = c.relnamespace\n WHERE c.relkind = ANY($1) \n AND n.nspname <> 'pg_catalog'\n AND n.nspname <> 'information_schema'\n AND n.nspname !~ '^pg_toast'\n AND pg_catalog.pg_table_is_visible(c.oid) ORDER BY 1, 2","name":"","parameters":1}
{"level":"debug","timestamp":"2022-11-19T17:25:48.402844+05:30","caller":"[email protected]/command.go:67","msg":"incoming command","length":36,"type":"B"}
{"level":"debug","timestamp":"2022-11-19T17:25:48.40287+05:30","caller":"[email protected]/command.go:344","msg":"reading parameters format codes","length":1}
{"level":"debug","timestamp":"2022-11-19T17:25:48.402902+05:30","caller":"[email protected]/command.go:372","msg":"reading parameters values","length":1}
{"level":"debug","timestamp":"2022-11-19T17:25:48.402913+05:30","caller":"[email protected]/command.go:386","msg":"incoming parameter","value":"{r,p,v,m,S,f,\"\"}"}
{"level":"debug","timestamp":"2022-11-19T17:25:48.402923+05:30","caller":"[email protected]/command.go:397","msg":"reading result-column format codes","length":1}
{"level":"debug","timestamp":"2022-11-19T17:25:48.402958+05:30","caller":"[email protected]/command.go:67","msg":"incoming command","length":6,"type":"D"}
{"level":"debug","timestamp":"2022-11-19T17:25:48.402977+05:30","caller":"[email protected]/command.go:67","msg":"incoming command","length":9,"type":"E"}
{"level":"debug","timestamp":"2022-11-19T17:25:48.402986+05:30","caller":"[email protected]/command.go:435","msg":"executing","name":"","limit":0}
{"level":"debug","timestamp":"2022-11-19T17:25:49.791743+05:30","caller":"[email protected]/command.go:67","msg":"incoming command","length":4,"type":"S"}
from psql-wire.
Related Issues (20)
- Handle multiple parameter format codes.
- Handle incoming result-column format codes
- Support type for type modifiers
- Support for GSS encryption
- support GSS encryption
- Avoiding the dependency on libpq HOT 2
- Running sql scripts from graphical clients sends all sql statements as a single query string HOT 7
- Receiving error "got no result from the query" HOT 4
- Supporting different forms of prepared statement query params HOT 2
- deallocate statement is currentlly being sent to the simple query handler HOT 3
- Fishy behaviours when handling request from multiple connections HOT 3
- Return a negative parameter description if no parameters have been described while parsing
- we have disabled the pgx tests for now until
- Enable the jackc/pgx error code tests
- close the statement or portal
- Replace with appropriate checks for the whole series
- Replace with appropriate checks (e.g. spell checking).
- Replace with appropriate checks for this patch
- handle `copy from stdin` query HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psql-wire.