-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad state: Cannot add event after closing
when reading large table
#398
Comments
Regarding the speed difference, I did a git bisect and it looks like the cause is the following commit de56b3f |
LIMIT
Bad state: Cannot add event after closing
when reading large table
@davidmartos96: Thanks for the detailed case, I've added 99% of it in #399, however, neither local nor the CI test failed. What is your postgres version here? |
@isoos Weirdly enough, I'm not able to replicate on a test environment like your test, but I can reproduce it on a freshly created docker container and running Version is name: test
services:
postgres:
container_name: postgrestest
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
ports:
- "5435:5432"
restart: unless-stopped
volumes:
postgres: |
One small progress: if I use |
I've released 3.4.5 with a fix for this issue. Huge thanks for the test, I am keeping it for both disabled and required SSL mode, and we may expand on it for further benchmarking the library to maybe debug this message parsing part if it is efficient or if there is a better way to do it. Closing this for now. |
@isoos Great, thank you! |
@davidmartos96: I wanted to fix the issue and restore correctness first, publishing it as a new version. Will take a look into message parsing later, possibly tomorrow or next week. |
When doing a
SELECT *
of a large table the library throws with:It seems to happen from version 3.4.0 onwards.
One interesting thing I noticed while testing different versions is that version 3.4.0 is almost twice as slow than 3.3.0 when batching inserting many rows, necessary to trigger this issue.
Here is the reproduction code:
The text was updated successfully, but these errors were encountered: