Skip to content

Postgres Partitioner is a PHP-based tool that helps to generate partition tables in PostgreSQL using an existing table.It currently supports range partitioning based on a specified column.

Notifications You must be signed in to change notification settings

usmonaliyev99/postgres-partitioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgres-partitioner

Postgres Partitioner is a PHP-based tool that helps to generate partition tables in PostgreSQL using an existing table.

It currently supports range partitioning based on a specified column.

Explanation

Image

Features

  • Automatically create range partitions for a specified table and column.
  • Easy configuration via a configuration file.
  • Simple command-line interface for executing partitioning tasks.

Questions

Requirements

  • PHP 7.4 or higher
  • Composer
  • PostgreSQL
  • PDO extension for PostgreSQL

Installation

  1. Clone the repository:

    git clone https://github.com/usmonaliyev99/postgres-partitioner.git
    cd postgres-partitioner
  2. Install dependencies using Composer:

    composer install
  3. Create and configure the database credentials in .env:

    DB_HOST=127.0.0.1
    DB_PORT=5432
    DB_NAME=
    DB_USER=
    DB_PASSWORD=

Usage

The main script for partitioning is bin/range.php.

You can run it from the terminal as follows:

./bin/range.php <table_name> <column_name>

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.

License

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

About

Postgres Partitioner is a PHP-based tool that helps to generate partition tables in PostgreSQL using an existing table.It currently supports range partitioning based on a specified column.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages