首页›发现›编程›Planet PostgreSQL

Planet PostgreSQL

RSS运行正常
访问网站
文章数35
更新频率每周约 4.1 篇
最近抓取1小时前
订阅方式RSS
订阅地址https://planet.postgresql.org/rss20.xml

最近的文章

订阅后,这些文章和以后的新文章都会出现在你的阅读器里

Hubert 'depesz' Lubaczewski: Missed in PostgreSQL 19 : Toggle logical decoding dynamically based on logical slot presence.

AI 摘要On December 23, 2025, Masahiko Sawada committed a patch to PostgreSQL that allows logical decoding to be toggled dynamically based on the presence of logical replication slots. Previously, logical decoding required wal_level to be set to 'logical' at server start, meaning users had to bear the overhead of logical-level WAL logging even when no logical replication slots were in use. Despite this improvement, the feature was missed in PostgreSQL 19.

Jobin Augustine: Stop Fighting Synchronous Replication: Meet WAIT FOR LSN – Part 2 – walkthrough for DBAs

AI 摘要This article is Part 2 of a series on PostgreSQL 19's WAIT FOR LSN feature, offering DBAs a hands-on walkthrough using just two psql sessions to demonstrate read-your-writes consistency on replicas, timeout handling with NO_THROW, monitoring waiting sessions, and how WAIT FOR behaves when a standby is stuck compared to synchronous replication. It also explains the feature's errors and restrictions—such as being unusable while holding snapshots or locks and only allowed as a top-level statement—showing why each exists to prevent deadlock cycles with recovery. Finally, it recounts the feature's long development history, including multiple commits and rejections over more than six years.

Christophe Pettus: All Your GUCs in a Row: session_preload_libraries

AI 摘要This blog post by Christophe Pettus discusses the PostgreSQL parameter session_preload_libraries, reaffirming the earlier advice to use it instead of local_preload_libraries. The author notes that despite the parameter's simple job of calling dlopen(), there is more fine print to explain than expected, starting with the fact that its default value is empty.

Umair Shahid: How a 40 TB PostgreSQL Cutover Took One Night

AI 摘要A regulated payments company successfully migrated over 40 TB of production data to a new EDB Postgres cluster with a single-night cutover, made possible by months of preparation using a replication-based approach. Key lessons included sizing the timeline around the largest tables (8.6 TB and 4.5 TB), using parallel workers to speed up backfill, monitoring WAL growth on the source, and building regulatory notice periods into the schedule. The team also stresses post-cutover 'hypercare' monitoring for a week, which caught a standby replication lag early and prevented potential production issues.

Dimitri Fontaine: What Changes for SQL in PostgreSQL 19

AI 摘要This article analyzes what PostgreSQL 19.0, released on November 19, changes for SQL, based on running the queries from The Art of PostgreSQL on versions 19.0 and 18.6 and reading the final release notes. The findings include 7 headline features withdrawn before release, 11 changes affecting existing SQL, roughly 20 new features, and an 8-step upgrade checklist. While release-day posts emphasize REPACK, plan advice, and ON CONFLICT DO SELECT, the change with the most consequences for existing SQL is that the planner now reads NOT NULL constraints and rewrites queries with them.

Jobin Augustine: Stop Fighting Synchronous Replication: Meet WAIT FOR LSN – Part 1

AI 摘要This article, the first in a three-part series, introduces PostgreSQL 19's WAIT FOR LSN feature, which allows applications to wait until a given WAL position has reached a standby, offering a flexible alternative to synchronous replication. It explains the drawbacks of synchronous replication—such as all commits hanging indefinitely when a standby fails, with statement_timeout providing no help—and demonstrates how combining WAIT FOR LSN (with modes like standby_replay and standby_flush) with synchronous_commit = off gives per-transaction durability and read-your-writes guarantees. The author also covers important caveats, including timeout handling, connection pool sizing on the standby, and critical tuning of wal_writer_flush_after and wal_writer_delay, while cautioning readers to wait for PostgreSQL 19.1 before production use due to a bug in 19.0.

Christophe Pettus: All Your GUCs in a Row: server_version and server_version_num

`server_version` and `server_version_num` look simple until you upgrade packages without restarting the server, or put a pooler in front of it. (I consult on PostgreSQL through PGX Inc..)

Deepak Mahto: Exploring PostgreSQL 19: A Developer’s Guide to New Features – Part 1: INSERT ON CONFLICT DO SELECT

AI 摘要PostgreSQL 19 introduces INSERT … ON CONFLICT DO SELECT, a new conflict action that returns the already-existing row on conflict without modifying it, enabling atomic get-or-create in a single statement. This eliminates prior workarounds such as DO NOTHING plus a second SELECT, a dummy DO UPDATE that generates dead tuples and vacuum debt on every lookup, and Oracle-style EXCEPTION blocks that create subtransactions and aborted rows. The article covers the feature's rules (mandatory RETURNING clause and conflict target, optional row locking via FOR UPDATE), how to distinguish inserted versus fetched rows using OLD/NEW in RETURNING, and migration patterns from Oracle and SQL Server code.

Chris Travers: PostgreSQL’s Best Kept Secret: COPY

AI 摘要The article explains PostgreSQL's COPY command, a legacy from the pre-SQL PostQUEL era that streams data to or from the server rather than treating operations as set-based. Switching a customer's Flink pipeline from INSERT to COPY roughly doubled write throughput, because COPY parses the statement once, streams rows into a single running insert, and limits round trips to the start and end of the stream—a gain that grows with network latency. COPY is best for large single-run loads or streaming large result sets, while INSERT remains preferable for small record sets or simpler code, and server-side file or program copying requires superuser access and is unavailable on major managed services.

Jeremy Schneider: Introducing CNPG Extensions Catalog

AI 摘要Jeremy Schneider introduces the CNPG Extensions Catalog, a project offering over a hundred Postgres extension container images for CloudNativePG on Kubernetes, featuring inspectable SBOMs, automated updates via renovate, and a browsable website. The article discusses controversial design choices, arguing in favor of unattended automatic upgrades with passing tests, recommending that extension SQL versions match the latest version supported by the container image due to compatibility risks, and explaining how to handle downgrades. Schneider invites users to try the catalog and provide feedback as the project continues to evolve.

Jan Wieremjewicz: November 19 - GTA VI and PostgreSQL 19, same day yet different freedom

AI 摘要November 19, 2026 marked the general availability of two long-awaited, previously delayed software releases: Grand Theft Auto VI and PostgreSQL 19, each backed by passionate communities. While the overlap between fans eagerly awaiting the two products is likely small, the author places themselves squarely in that intersection.

Christophe Pettus: All Your GUCs in a Row: server_encoding

`server_encoding` doesn't control the server—it reports each database's encoding, and a cluster can hold multiple different ones. (I consult on PostgreSQL through PGX Inc..)

Frederic Delacourt: PGConf.eu 2026 - Valencia, Frédéric's feedback

AI 摘要Despite a chaotic trip to Valencia (a cancelled flight made him miss some talks), Frédéric attended many sessions at PGConf.eu 2026 on topics like OOM mitigation on Kubernetes, row locks, parallel query execution, index prefetching, resizable shared memory, AIO performance, and the pg_track_optimizer extension. He also supported his Data Bene colleague Ayoub Kazar's first PGConf lightning talk on SQL/PGQ and enjoyed catching up with many familiar PostgreSQL community members. His return trip went badly as well.

Chris van Eijk: Peer authentication failed for user "postgres": fixes

PostgreSQL's Peer authentication failed, measured on the Debian and Ubuntu packages: why sudo -u postgres works, -h localhost, pg_ident.conf and psycopg2.

Christophe Pettus: All Your GUCs in a Row: serializable_buffers

PostgreSQL's `serializable_buffers` controls the cache for serializable transaction metadata. (I consult on PostgreSQL through PGX Inc..)

Hollis Varden: Upserts, partitions, triggers and string matching on PostgreSQL 18

AI 摘要The article reports 21 small benchmark measurements on PostgreSQL 18 covering upserts, deletes, monthly partitioning, row triggers, window functions, GROUP BY strategies, and string matching with LIKE/regex/ILIKE. Surprising results included batched deletes running twice as fast as a single DELETE with the same WAL output, partitioning paying off mainly for fast DROP-based data removal rather than query speed, and hash aggregation losing to sorting at one million groups. Other findings: LATERAL was dramatically faster than DISTINCT ON or row_number for fetching the latest row per group, the IS DISTINCT FROM clause cut upsert WAL and time when nothing changed, and sorting under COLLATE "C" was over 20x faster than a linguistic locale.

Ryan Lambert: Postgres 19 Upgrade from Postgres 15

AI 摘要The article outlines the author's plans to upgrade production databases from Postgres 15 to Postgres 19, which was released in November 2026. Having skipped versions 16 through 18 due to being busy with other projects, the author now faces an urgent timeline since Postgres 15 will reach End of Life in November 2027. The post shares notes on his upgrade process and highlights exciting new features to explore, though it does not explain how to perform the actual upgrade.

Christophe Pettus: All Your GUCs in a Row: send_abort_for_crash and send_abort_for_kill

PostgreSQL 16 added two parameters that intentionally make crashes worse—by writing core files from every dying process instead of just one. (I consult on PostgreSQL through PGX Inc..)

Ashutosh Bapat: A morning well spent nurturing the Talk Solicitation Program

AI 摘要The author describes the Talk Solicitation Program (TSP) launched at PGConf.dev, which lets attendees request, upvote, and discuss topics they want to hear, giving speakers and the program committee insight into audience interests. While reviewing the first real topic requests and upvotes, the author discovered that GitHub doesn't show who cast upvotes, found an existing community discussion asking for that feature since 2021, and participated in it themselves. The post encourages readers planning to attend PGConf.dev 2027 to browse, upvote, discuss, and request topics through the TSP to help shape the conference program.

Christophe Pettus: All Your GUCs in a Row: segment_size

PostgreSQL divides large tables into 1GB segment files, but the server has no authoritative record of how many segments exist. (I consult on PostgreSQL through PGX Inc..)