Phil Eaton
EDB Staff Engineer
Phil Eaton is a Staff Engineer at EDB; contributing to EDB's highly available Postgres offering, Postgres Distributed. In the past 10 years he's been a developer, a manager, and a cofounder at infrastructure companies. Outside of work he runs the NYC Systems talk series, the Software Internals Discord, the NYC Systems Coffee Club, the /r/databasedevelopment subreddit, and various technical book clubs.
Read Blogs
Technical Blog
작성자: Phil Eaton 2025년 9월 10일 이제 EDB Postgres Distributed (PGD)용 새로운 CLI를 사용할 수 있습니다. 이 CLI를 사용하면 PGD 노드 클러스터를 간편하게 만들 수 있습니다. PGD 노드는 PGD 메타데이터를 가진 Postgres 인스턴스로, 서로 연결되어 DDL(스키마)과 DML(데이터)을 논리적 복제로 동기화합니다. PGD의 철학은 클라우드 네이티브적입니다. 어떤 노드에 문제가 생겨도 삭제한 후 다시 생성하면 놓친 데이터를 모두 자동으로 재동기화합니다. 이 글에서는 AWS에서 세 개의 PGD 노드로 구성된 클러스터를 만드는 간단한 수동 방법을 살펴봅니다. 완전한 프로덕션 환경을 위한 설정은 아니지만, PGD를 시작하는 데 도움이 될 수 있습니다...
Technical Blog
Phil Eaton 2025년 10월 24일 PostgreSQL은 클라이언트마다 별도의 백엔드 프로세스를 할당합니다. 연결 수가 늘어나면 리소스 경합과 연결 지연이 커질 수 있어 pgcat, pgbouncer 같은 PostgreSQL 커넥션 풀러를 사용합니다. 이 글에서는 pgcat 실습을 통해 트랜잭션 풀링이 여러 클라이언트 연결을 어떻게 다중화하는지, 그리고 pool_size가 1과 2일 때 백엔드 PID와 트랜잭션 동작이 어떻게 달라지는지 살펴봅니다. Postgres는 연결되는 각 클라이언트에 ‘ 클라이언트 백엔드(client backend)‘라는 자체 프로세스를 할당합니다. 이 방식은 1) 리소스 경합(resource contention) 또는 2) 지연 시간 (latency) 문제, 혹은 두 가지...
EDB Labs
필 이튼(Phil Eaton) 2025년 11월 26일 저는 psql이 변수 설정(리터럴은 \set, 쿼리 결과는 \gset)과 조건부 블록( \if)을 지원한다는 것을 알게 되었습니다. 또한 루프( \watch 사용)와 일종의 재귀( \include 사용)도 지원합니다. 그렇다면 psql의 스크립트 언어로 모든 계산을 표현할 수 있을까요? 왠지 그럴 수 있을 것 같네요. 이 글은 그냥 재미로 쓴 것입니다. 절대 따라 하지 마세요. 하지만 psql의 중급 사용법을 익히기에는 꽤 괜찮은 입문서가 될 수도 있습니다. 자, 피보나치 수열 계산기를 만들어 봅시다. 먼저 파이썬으로 작성한 fib.py입니다. def fib(n): if n < 2: return n a = 0 b = 1 c = 0 while n > 1...
EDB Labs
I noticed that psql supports setting variables ( \set for literals and \gset for query results) and conditional blocks ( \if ). It also supports loops (with \watch ) and recursion of sorts (with \include ). Can we express any computation in psql's scripting language? Kinda sounds like it. This post is for fun. Don't do this. But it happens to also be a nice introduction to some intermediate usage...
Technical Blog
Postgres gives each connecting client its own process called a client backend . And either because of concerns about 1) resource contention or 2) latency or 3) both, we users tend to limit the maximum number of client connections to a few hundred. Then we introduce connection poolers like pgbouncer or pgcat . These poolers can handle more connections (with lower latency) by transparently...
Technical Blog
We've got this new CLI for EDB Postgres Distributed (PGD) that makes creating clusters of PGD nodes pretty easy. PGD nodes are Postgres instances with PGD metadata, all connected and talking to each other, doing logical replication of DDL (structures) and DML (data). The PGD philosophy is also pretty cloud-native in that if something goes wrong with a node we can just delete it and recreate it and...
EDB Labs
EDB Postgres Distributed (PGD), under the product umbrella of EDB Postgres AI, supports seamlessly 1) replicating data to an analytics data format ( Iceberg) and 2) running regular Postgres queries against this data with EDB Postgres Analytics Accelerator (PGAA) which uses Apache DataFusion under the hood. In this post we'll set up a PGD cluster and run a basic analytics query against a business...
Technical Blog
Log in or register for a free EDB account and grab your subscription token. Export it in your environment: $ export EDB_SUBSCRIPTION_TOKEN=whatever-it-is Now set up repositories for EDB Postgres Distributed (PGD) and EDB Postgres Extended (EDB's distribution of Postgres). $ curl -1sLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/postgres_distributed/setup.deb.sh" | sudo -E bash $...
Technical Blog
If Postgres crashes you can get a stack trace with gdb. But how do you debug errors that don't crash Postgres? Let's grab the Postgres 17 source and build it with debug symbols. $ git clone https://github.com/postgres/postgres $ cd postgres $ git checkout REL_17_STABLE $ ./configure --enable-debug --without-icu \ --prefix=$(pwd)/build \ --libdir=$(pwd)/build/lib $ make -j16 && make install Create...
Technical Blog
I've been talking about debugging memory leaks for more than a year now; covering Valgrind, AdressSanitizer, memleak, and heaptrack. But there are still a few more tools to explore 1 and today we're going to look at jemalloc, the alternative malloc implementation from 2 Meta. Alternative malloc implementations are popular and practical. Google has tcmalloc, Microsoft has mimalloc, and Meta has...