{"repo":"shayonj/pg-osc","free":true,"listed":false,"github":"https://github.com/shayonj/pg-osc","clone":"git clone https://github.com/shayonj/pg-osc.git","description":"Easy CLI tool for making zero downtime schema changes and backfills in PostgreSQL","language":"Ruby","stars":616,"topics":["postgresql","postgres","schema-changes","online-schema-change","postgresql-database","database","cli","hacktoberfest"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg-osc pg-online-schema-change ( pg-osc ) is a tool for making schema changes (any ALTER statements) in Postgres tables with minimal locks, thus helping achieve zero downtime schema changes against production workloads. pg-osc uses the concept of shadow table to perform schema changes. At a high level, it creates a shadow table that looks structurally the same as the primary table, performs the schema change on the shadow table, copies contents from the primary table to the shadow table and swaps the table names in the end while preserving all changes to the primary table using triggers (via audit table). pg-osc is inspired by the design and workings of tools like pg repack and pt-online-schema-change (MySQL). Read more below on how does it work, prominent features, the caveats and examples Table of Contents - Table of Contents - Installation - Requirements - Usage - Prominent features - Load test - Examples - Renaming a column - Multiple ALTER statements - Kill other backends after 5s - Replaying larger workloads - Backfill data - Running using Docker - Few things to keep in mind - How does it work - Development - Local testing - Releasing - Contributing Installation Add this line to your application's Gemfile: And then execute: $ bundle install Or install it yourself as: $ gem install pg online schema change This will include all dependencies accordingly as well. Make sure the following requirements are satisfied. Or via Docker: docker pull shayonj/pg-osc:latest https://hub","default_branch":null,"files":null,"tree":[],"storefront":"/r/shayonj","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/shayonj/pg-osc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}