# citusdata/pg_shard

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/citusdata-pg-shard).**

1,062 stars · 62 forks · C · LGPL-3.0

## Links

- GitHub: https://github.com/citusdata/pg_shard
- Homepage: https://github.com/citusdata/citus
- awesome-repositories: https://awesome-repositories.com/repository/citusdata-pg-shard.md

## Description

This project is a database extension that enables horizontal scaling and distributed data partitioning across multiple PostgreSQL nodes. It functions as a middleware solution that distributes large database tables across a cluster to increase total storage capacity and improve write performance for growing datasets.

The system employs hash-based partitioning to distribute table records across physical nodes and uses a central metadata catalog to track shard locations. It provides transparent query routing, which directs standard SQL commands from a coordinator node to the appropriate worker nodes without requiring modifications to existing application logic.

The framework includes tools for maintaining data redundancy and cluster integrity through shard replication and automated consistency repair processes. It also supports high-throughput data ingestion, utilizing concurrent processing to import massive datasets into distributed tables.

## Tags

### Data & Databases

- [PostgreSQL Sharding Extensions](https://awesome-repositories.com/f/data-databases/postgresql-extensions/distributed-extensions/postgresql-sharding-extensions.md) — Enables horizontal scaling and distributed data partitioning across multiple PostgreSQL nodes for improved write performance.
- [Coordinator-Worker Topologies](https://awesome-repositories.com/f/data-databases/cluster-topology-management/coordinator-worker-topologies.md) — Directs incoming SQL commands from a central entry point to the appropriate backend nodes based on metadata.
- [Database Middleware](https://awesome-repositories.com/f/data-databases/database-middleware.md) — Routes SQL queries to appropriate worker nodes to provide transparent horizontal scaling for existing database applications.
- [Database Sharding](https://awesome-repositories.com/f/data-databases/database-sharding.md) — Partitions data across a cluster of servers to manage massive workloads that exceed the capacity of a single machine.
- [Query Routing](https://awesome-repositories.com/f/data-databases/distributed-sql-databases/query-routing.md) — Automatically routes standard database commands from a central node to the appropriate worker nodes without requiring modifications to existing application logic. ([source](https://github.com/citusdata/pg_shard#readme))
- [Horizontal Database Scaling](https://awesome-repositories.com/f/data-databases/horizontal-database-scaling.md) — Distributes large database tables across multiple nodes to increase storage capacity and improve write performance for growing datasets.
- [Horizontal Table Partitionings](https://awesome-repositories.com/f/data-databases/time-series-data-modeling/hypertable-partitioning/table-conversion-to-time-series-partitioning/horizontal-table-partitionings.md) — Distributes table records across multiple nodes using hash partitioning to achieve horizontal scaling and expand total storage capacity. ([source](https://github.com/citusdata/pg_shard#readme))
- [Bulk Data Ingestion](https://awesome-repositories.com/f/data-databases/bulk-data-ingestion.md) — Supports high-throughput ingestion of massive datasets into distributed tables using concurrent processes to maximize write performance. ([source](https://github.com/citusdata/pg_shard#readme))
- [Cross-Shard Data Replication](https://awesome-repositories.com/f/data-databases/data-sharding/cross-shard-data-replication.md) — Maintains multiple copies of table shards across different worker nodes to ensure data redundancy and high availability during node outages. ([source](https://github.com/citusdata/pg_shard/tree/develop/doc))
- [Database Sharding Solutions](https://awesome-repositories.com/f/data-databases/database-sharding-solutions.md) — Provides a solution for managing shard replicas and data redundancy to ensure high availability and consistency across a distributed database cluster.
- [Distributed Sharding Architectures](https://awesome-repositories.com/f/data-databases/distributed-sharding-architectures.md) — Maintains multiple copies of data segments across different physical servers to ensure high availability and fault tolerance.
- [External File Imports](https://awesome-repositories.com/f/data-databases/external-file-imports.md) — Enables importing large datasets from external files into distributed tables using parallel processing to achieve high write throughput. ([source](https://github.com/citusdata/pg_shard/tree/develop/doc))
- [Horizontal Scaling](https://awesome-repositories.com/f/data-databases/horizontal-scaling.md) — Distributes large database tables across a cluster of nodes to increase total storage capacity and throughput.
- [Parallelized Ingestion](https://awesome-repositories.com/f/data-databases/large-scale-dataset-management/parallelized-ingestion.md) — Loads massive volumes of information into a database cluster using concurrent processes to maximize throughput and reduce import times.
- [Asynchronous Replica Synchronizations](https://awesome-repositories.com/f/data-databases/primary-replica-replication/command-propagation-to-replicas/asynchronous-replica-synchronizations.md) — Synchronizes data from healthy shard replicas to inconsistent locations to maintain cluster integrity after system errors or hardware failures.

### Software Engineering & Architecture

- [Hash-Based Data Distribution](https://awesome-repositories.com/f/software-engineering-architecture/hash-based-data-distribution.md) — Distributes table rows across multiple physical nodes by applying a mathematical function to a specific column value.
- [Metadata-Driven Cluster Managements](https://awesome-repositories.com/f/software-engineering-architecture/distributed-cluster-coordination/metadata-driven-cluster-managements.md) — Tracks the physical location of data shards using a central catalog to coordinate operations across the distributed system.

### DevOps & Infrastructure

- [High Availability Clusters](https://awesome-repositories.com/f/devops-infrastructure/high-availability-clusters.md) — Maintains redundant copies of data across multiple nodes to ensure continuous service and prevent data loss during hardware failures.

### System Administration & Monitoring

- [Consistency Repairs](https://awesome-repositories.com/f/system-administration-monitoring/cluster-management/shard-rebalancing/consistency-repairs.md) — Synchronizes data from healthy shard replicas to inconsistent locations to maintain cluster integrity and ensure data accuracy. ([source](https://github.com/citusdata/pg_shard/tree/develop/doc))
