Comments (4)
I have created a (somewhat butchered) fork with this change at https://github.com/bschofield/pg_prefaulter/.
from pg_prefaulter.
@chudley What's your thought on this?
from pg_prefaulter.
This all sounds reasonable to me. Looking at 9.6 docs and 10.0 docs, @bschofield is right. Likely a typo in my work, so thanks for catching!
The testing I did for this is outlined in MANTA-4020. I don't know where we stand with making internal tickets public these days, but @bahamat feel free to mark as public if that'll help here. I found the prefaulter hard to test/verify overall. My tests show that we're prefaulting something, though given this ticket it's likely the wrong thing.
I'm going to struggle prioritising this work at the moment, but I'm happy to review a change and possibly walk through setting up a test environment. Likely the fix is a s/receive/replay
as @bschofield said, with testing setup etc. taking most of the time.
from pg_prefaulter.
Thanks for taking a look, @chudley.
I think it's worth mentioning that in the steady state, there won't actually be much difference between prefaulting just-received WAL, and prefaulting about-to-be-replayed WAL. When the replica is caught up with the primary, those two categories should be pretty much identical. So, if your main use-case for this is to accelerate performance of in-sync replicas, then you may not actually be seeing any issues arising from the typo.
The difference does matter when catching up a replica which is well behind the primary. In that situation, the current code prefaults WAL files which are well ahead of the actual replay point, so the effectiveness of it is limited (and it may actually be a net negative). With the fix in place, I found that pg_prefaulter was very effective in speeding up WAL replay on postgres 13.
By the way, thank you very much for making this utility public. With this bit of minor tweaking, I successfully used it to catch up a primary which had gotten 500GB behind the master. That saved my weekend!
from pg_prefaulter.
Related Issues (20)
- Add and use sampling loggers HOT 1
- close all files when PostgreSQL is not running HOT 6
- expose statistics through the Prometheus protocol
- Reduce ARC usage of the IO cache... HOT 3
- Automatically register with Consul if detected
- program handles SIGTERM but does not shut down
- prefaulter must start up even if database is not available
- Scrape the WAL file from the process args when PostgreSQL is starting up...
- Dump caches on signal...
- Stream WAL information to a sidecar pg_prefaulter process via a bgworker...
- would like tool for manually prefaulting specific files HOT 1
- Pre-fault in the entire WAL file for the pg_last_xlog_receive_location() segment...
- prefaulter's child process hangs onto xlog files after database is shut down HOT 2
- may miss some pages depending on xlog-mode HOT 1
- panic: bad, open vs close count not the same after purge HOT 1
- Use posix_fadvise(2) instead of pread(2) for faulting pages
- Getting error while starting pg_prefaulter.
- Is this project still being maintained? HOT 1
- Any updates? 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 pg_prefaulter.