EvilScott / postgresql-horizontal

Horizontal PostgreSQL v11 scaling using FDWs and partition tables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Horizontal PostgreSQL v11 Scaling using FDWs and Partition Tables

This is a proof-of-concept for a PostgreSQL logical+phsyical sharding strategy. Taking advantage of postgres_fdw and table partitioning, this pattern allows for spreading the data from a partition table among multiple physical servers.

Requirements:

Usage:

  1. Start up the Docker stack:
$ docker-compose up -d
  1. Wait until you see the Listening on port 5555... message in the server container logs

  2. Kick off fake data population:

$ curl http://localhost:5555/populate
  1. Wait until you see the Done populating DB! message in the server container logs (this will take a while)

  2. Browse the DB via:

$ docker-compose exec db_primary psql -U user -d scaling

About

Horizontal PostgreSQL v11 scaling using FDWs and partition tables


Languages

Language:JavaScript 100.0%