Comments (7)
This is the same problem as #12.
As mentioned there, pgreplay can only replay the statements in the order they appear in the log, but it cannot guarantee that they will be processed in that order.
In addition to the workarounds shown there, you could also set lock_timeout
to a low value during replay. That will prevent hanging indefinitely long, but it will cause delays, and some statements won't be executed. Still, it might be good enough, if the deadlocks happen only rarely.
from pgreplay.
Unfortunately, the deadlocks are very common during replay (but not on the source server) with this workload, and we're talking about several thousand transactions per second. Another possibility is to ignore transaction statements when replaying the queries, which may lead to data integrity issues on the target database (as would the lock_timeout
option) but in this workload rollbacks are practically non-existent, so it would be a much better test.
from pgreplay.
I see.
There is no option to exclude certain commands, but you could grep
all BEGIN
and COMMIT
statements from the log file before replaying it.
I was under the impression that you are not talking about database deadlocks (which are automatically resolved after a second), but about hangs during replay that are never resolved. Which one is it?
Doing away with transactions would only reduce (not totally avoid!) the first kind of deadlocks, but not ones in pgreplay.
from pgreplay.
Good point; excluding those via grep should work.
I am talking about database deadlocks. They do not appear to be resolved after a second. If I don't kill the query in PostgreSQL, it hangs indefinitely. From what I can tell, the locks are caused by update queries that contain select clauses in them. I'll give the grep suggestion a try and let you know what I find.
from pgreplay.
That's not database deadlocks then.
They are live locks in the database, but the session that is not hanging is waiting (in pgreplay) for the hanging statement to complete.
Perhaps removing transactions will help, but it is not certain.
from pgreplay.
Did it help?
from pgreplay.
It's on my list for next week; sorry for the delay.
from pgreplay.
Related Issues (20)
- make install fails on Mac OS X HOT 5
- Unable to compile pgreplay on ubuntu 18.04 HOT 2
- pgreplay seems to have stopped suddenly when executing HOT 10
- Generating undo records by using pgreplay HOT 1
- pgreplay not working with RDS csvlog HOT 2
- Queries per second HOT 3
- Replay freezes, all queries stuck in ClientRead state. HOT 3
- replay and uuids HOT 1
- Will the program support pg11 onward? HOT 3
- Invalid free on replaying server-side prepare "ROLLBACK; DEALLOCATE ALL". HOT 4
- Tests are failing after installation HOT 6
- First run always lags behind HOT 3
- connection to database failed for a specific session HOT 1
- Parsing line error HOT 12
- Upgrade from pg 12 to pg 14 HOT 2
- ./configure fails on pg15.0 HOT 2
- Opened connections HOT 2
- Will PQgetResult cause stat_stmt statistics errors? HOT 1
- docker build Fails with Error (from master, commit a2f7c113197ed5623b35f09bfc299aae971d56e8) HOT 2
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 pgreplay.