Sign inSign up

ca0abinary/postgres-cluster

By ca0abinary

•Updated over 9 years ago

A docker container which can act as primary or standby in a postgresql replication streaming cluster

Image
0

667

ca0abinary/postgres-cluster repository overview

⁠postgres-cluster

A docker container which can act as primary or standby in a postgresql replication streaming cluster

⁠Origin

This container is based on the offical postgresql docker container⁠, currently 9.6-alpine. If you would like to see how to extend this container, then please refer to that guide.

⁠Usage

This container can be used in the same manner as the offical postgresql docker container⁠ with a couple exceptions:

  1. The environment variable PRIMARY=yes must be specified for the primary container
  2. The standby containers must be linked to the primary on the name pg-primary
  3. There are a limit of 15 WAL slots, so a cluster size of 16 is the max without modifying anything
⁠Example usage

Starting a primary (for testing): docker run --rm -it -e PRIMARY=yes --name pg-primary ca0abinary/postgres-cluster

Starting a standby (for testing): docker run --rm -it --link pg-primary:pg-primary ca0abinary/postgres-cluster

Tag summary

Content type

Image

Digest

Size

13.7 MB

Last updated

over 9 years ago

docker pull ca0abinary/postgres-cluster