Comments (3)
I need %c
in log_line_prefix
so that I can identify sessions.
Is it an option to use log_destination = csvlog
? That would be better anyway, and the documentation seems to suggest that log_destination
is modifiable.
from pgreplay.
Session id comes from process id and process start time. Documentation:
The %c escape prints a quasi-unique session identifier, consisting of two 4-byte hexadecimal numbers (without leading zeros) separated by a dot. The numbers are the process start time and the process ID
Could process id (%p
) be made to substitute for session id?
I'll try log_destination = csvlog
for future logs. In the meantime, I'm stuck with a pile of logs from just before a failure that are in the wrong format. I'd love to be able to replay those logs and see if I can reproduce the failure.
from pgreplay.
The process ID is not unique, it can be reused, so I cannot use it as a session identifier.
I understand your situation, because I was in exactly the same situation once. That made me write pgreplay!
What you could do is to pre-process the logs with sed
or something similar to get them into a format that pgreplay can understand. The important thing is that you have log_min_duration_statement
set to 0 (and not log_statement = 'all'
, which would log the statements after they are done).
You'd have to fix the timestamp to contain milliseconds, and you'd have to fake the session ID, maybe by using a zero timestamp part and the process ID in hex. The hard part are continuation lines if you have statements with line breaks in them. Each such continuation line will start with a tab, so don't modify such lines.
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
- Transaction Deadlocks on Replay HOT 7
- 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.