Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

PostgreSQL Primary–Replica Demo with FastAPI

Goal

Simple read/write splitting using PostgreSQL streaming replication.

Features:

  • PostgreSQL primary + read-replica via Docker Compose
  • DB initialization via docker-entrypoint-initdb.d
  • FastAPI app with routing:
    • writes → primary
    • reads → replica

1. Start the DB Cluster

make pg-up

2. DB initialization

All .sql files inside the init/ directory run automatically on first startup.

3. Run the app

make run-app

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages