# PgQue – Bloat 없는 Postgres 큐

> Clean Markdown view of GeekNews topic #28997. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=28997](https://news.hada.io/topic?id=28997)
- GeekNews Markdown: [https://news.hada.io/topic/28997.md](https://news.hada.io/topic/28997.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2026-04-29T09:46:02+09:00
- Updated: 2026-04-29T09:46:02+09:00
- Original source: [github.com/NikolayS](https://github.com/NikolayS/pgque)
- Points: 5
- Comments: 0

## Topic Body

- **SQL 파일 하나로 설치**하고, pg_cron만으로 구동(tick)  
- Skype 시대 **PgQ 아키텍처**를 순수 PL/pgSQL로 재구현한 **Postgres 내장 메시지 큐**로, C 확장이나 외부 데몬 없이 managed Postgres에서 바로 사용 가능  
- 기존 SKIP LOCKED 큐의 고질적 문제인 **dead tuple 누적과 VACUUM 부하**를 snapshot 기반 배치 + TRUNCATE 테이블 로테이션으로 원천 제거하여, 수개월 운영해도 성능 저하 없음  
- Kafka 토픽과 유사한 **공유 이벤트 로그 + 컨슈머별 독립 커서** 구조로 네이티브 fan-out 지원 — 데이터 복제 없이 다중 구독자가 모든 이벤트를 독립 수신  
- 엔드투엔드 전달 레이턴시는 기본 설정에서 **~1-2초**(tick 간격 + 폴 간격), 개별 send/receive/ack 호출은 **마이크로초 수준**  
- 예비 벤치마크 기준 PL/pgSQL insert ~86k ev/s, 컨슈머 읽기 **~2.4M ev/s**, 30분 지속 테스트에서 dead tuple 증가 제로  
- `pgque.send()`, `pgque.receive()`, `pgque.ack()` 등 **SQL API 기반**이라 Python, Go, TypeScript 등 언어 무관하게 모든 Postgres 드라이버에서 동작  
- RDS, Aurora, Cloud SQL, AlloyDB, Supabase, Neon 등 **주요 managed Postgres 프로바이더 전체 호환**, 별도 빌드나 provider 승인 불필요  
- 3개 역할(pgque_reader, pgque_writer, pgque_admin) 기반 **권한 분리** 내장, 애플리케이션 유저에 superuser 불필요  
- PgQ 자체는 Skype 수억명 규모에서 **10년 이상 프로덕션 검증**되었지만, PgQue는 프로덕트로서는 초기 단계(v0.1)  
- Apache-2.0 라이선스

## Comments



_No public comments on this page._
