Skip to content

๐Ÿ“Š A CLI tool to partition PostgreSQL tables and manage data migration efficiently.

License

Notifications You must be signed in to change notification settings

mateuszsokola/partman-wizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Partman Wizard

Partman Wizard is a CLI tool designed to help you partition PostgreSQL tables using the pg_partman extension. This tool guides you through the process of setting up table partitions and migrating data efficiently.

If you need PostgreSQL-as-a-Service with support for the pg_partman extension, consider Neon. PS. They have a FREE-TIER ๐Ÿ’ธ

What this bad boy can do?

  • Create and configure partitions based on existing tables in PostgreSQL
  • Migrate data from source tables to partitioned ones

It works like magic โœจ

Watch on YT

How To Use Partman Wizard

Usage

To use the Partman Wizard, you need to have Node.js 18 installed. You can then run the tool directly using npx:

npx partman-wizard

Follow the configuration steps and enjoy your partitioned tables.

Configure partition maintenance

To keep your partitions up-to-date, set up a cron job to run maintenance tasks. Due to the complexity of cloud deployments and PostgreSQL itself, this wizard cannot set it up for you.

Make sure to run the following SQL query at least once per day. It's common to schedule it to run at midnight (or one minute after):

SELECT partman.run_maintenance();

Feedback & Contributions

If you find this tool useful, consider giving it a star on GitHub. For bug reports or contributions, please visit the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Enjoy using Partman Wizard! ๐Ÿ˜Š