Giter Site home page Giter Site logo

Comments (4)

bschofield avatar bschofield commented on September 14, 2024 1

I have created a (somewhat butchered) fork with this change at https://github.com/bschofield/pg_prefaulter/.

from pg_prefaulter.

bahamat avatar bahamat commented on September 14, 2024

@chudley What's your thought on this?

from pg_prefaulter.

chudley avatar chudley commented on September 14, 2024

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.

bschofield avatar bschofield commented on September 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.