Giter VIP home page Giter VIP logo

Comments (5)

Melkij avatar Melkij commented on September 13, 2024

vacuum full rewrite table and all indexes, but vacuum full uses exclusive lock - and this is primary reason to using pgcompacttable or pg_repack. But pgcompactable does not use vacuum full (and no reindex command too), instead it calls updates on table and rebuild indexes by creating new index (concurrently), rename new index to old one and then drop old index.

So reindex in pgcompacttable is another stuff and has few options to control behavior.

from pgcompacttable.

MichaelDBA avatar MichaelDBA commented on September 13, 2024

I understand about vacuum full and exclusive lock, and I also understand pgcompacttable is basically a vacuum full without the long locks. My question is why have REINDEX parameters for pgcompacttable since you are basically dropping indexes and creating new ones?

from pgcompacttable.

alexius2 avatar alexius2 commented on September 13, 2024

which parameters do you mean? beside creating and dropping indexes (which could be done concurrently without heavy locks) pgcompacttable also renaming newly created indexes to old name which requires short heavy lock which might not be available at a time and pgcompacttable will try to acquire it cycle with lock timeout and pause between iterations. so that's why reindex-retry-count, reindex-retry-pause, reindex-lock-timeout were introduced.

from pgcompacttable.

MichaelDBA avatar MichaelDBA commented on September 13, 2024

I'm sorry but I am still not understanding you completely. When you say REINDEX, you don't mean the actual PostgreSQL REINDEX command, you mean rename command, right?

from pgcompacttable.

Melkij avatar Melkij commented on September 13, 2024

Yes, we speaking not about reindex command (it uses heavy lock too). pgcompacttable uses word "reindex" for process create index concurrently + alter index rename + drop index concurrently.

from pgcompacttable.

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.