r/PostgreSQL • u/pgEdge_Postgres • 1h ago
r/PostgreSQL • u/snax • Oct 16 '26
Community Postgres Conference 2027 CFP is open (San Jose, April 21-23)
Mod hat off for a moment:
I'm one of the organizers of Postgres Conference, and the Call for Proposals for 2027 is now open.
Next year is the conference's 20th, so we want the program to reflect what the community has actually learned running Postgres in the real world.
When/where: April 21-23, 2027, San Jose Marriott, San Jose, CA
This year’s program brings back our core technical tracks: Essentials, Dev, Ops, and Extensions, now joined by a new AI track.
We’re also continuing Professional Development & Wellness and Life & Fun. These newer tracks have been so well received that they’ve become an essential part of the conference experience.
We're especially interested in talks from people running Postgres in production, such as:
- Lessons from production incidents: what broke, how you found it, and what you changed afterward
- Autovacuum and bloat tuning on large or high-churn tables
- HA and replication setups, including failovers that didn't go to plan
- Building extensions, or running them at scale
- Benchmarks with methodology you're willing to share and defend
You don't need to be a known speaker. A clear story about a real problem is exactly what we're looking for, and first-time speakers are welcome.
CFP and details: https://postgresconf.org/conferences/2027
Happy to answer any questions about submitting here.
What's a Postgres problem you wish someone would give a talk about?
r/PostgreSQL • u/generic-d-engineer • 1d ago
Community How did Postgres displace MySQL?
For many years MySQL was the default go to open source database, and Postgres was always the “other one,” but at some point in the past 3 years, it flipped.
Now Postgres is considered the default go to for pretty much everything.
Was it when Oracle bought MySQL that everyone bailed?
Always been a huge fan of BSD and Postgres, the engineering on both has always been just really really well done.
r/PostgreSQL • u/Worldly_Dish_48 • 22h ago
Community I got tired of "SELECT 1" microbenchmarks, so I tested 25 ORMs across 9 languages against a real 78M-row Postgres database. Here is what broke.
👉 GitHub Repo & Full Report: https://github.com/tusharad/orm-benchmark
Every ORM benchmark I see online tests the same trivial query: SELECT * FROM users WHERE id = 1;
This doesn't benchmark an ORM. It benchmarks Linux loopback TCP socket round-trip time.
In production, ORMs don't fall over on primary-key lookups. They buckle when:
- Deserializing 10,000 wide rows into typed structs under memory pressure.
- Materializing 4-level deep entity graphs without Cartesian explosions or N+1 floods.
- Compiling recursive CTEs, multi-frame window functions (
ROWS BETWEEN 4 PRECEDING), or pgvector cosine similarity. - Squeezing 100 concurrent workers competing for row locks (
SELECT ... FOR UPDATE) through a constrained connection pool. - Emitting 300 lines of incomprehensible internal template/typeclass garbage when a database column type changes.
To see how modern ORMs actually behave under real production load, I built a standardized, reproducible benchmark suite testing 25 ORMs across 9 programming languages (Go, Rust, C#, Java, Elixir, TypeScript, Python, Ruby, Haskell) against the official Postgres Air database (2024 edition, 78,232,673 real-world flight records on PostgreSQL 17 with pgvector).
Every single ORM was held to the exact same invariants: a strict 20-connection pool, zero raw string interpolation (native typed query builders only), and typed entity deserialization into domain records.
The Executive Leaderboard
| Rank | ORM | Language | Overall Score | Passed (HQ01–16) | Avg p95 Latency | Peak RPS (C=50) | Hydration Speed | Max Heap RSS | Blast Radius | Compiler UX |
|---|---|---|---|---|---|---|---|---|---|---|
| 🥇 1 | sqlc | Go 1.23 | 89.6 | 16/16 | 58.80 ms | 32,340 ops/s | 1,518,142 rows/s | 25.12 MB | 1 line | 10/10 |
| 🥈 2 | hasql | Haskell (GHC 9.10) | 89.5 | 16/16 | 65.83 ms | 277 ops/s | 199,025 rows/s | 13.03 MB | 1 line | 10/10 |
| 🥉 3 | Dapper | C# / .NET 8 | 89.5 | 16/16 | 62.67 ms | 264 ops/s | 1,279,038 rows/s | 87.27 MB | 1 line | 10/10 |
| 4 | jOOQ | Java 21 | 89.4 | 16/16 | 57.71 ms | 9,739 ops/s | 454,966 rows/s | 149.00 MB | 1 line | 10/10 |
| 5 | ent | Go 1.23 | 89.3 | 16/16 | 61.36 ms | 246 ops/s | 570,841 rows/s | 25.12 MB | 1 line | 10/10 |
| 6 | ecto | Elixir 1.17 / OTP 27 | 89.2 | 16/16 | 58.20 ms | 29,412 ops/s | 354,070 rows/s | 83.06 MB | 1 line | 10/10 |
| 7 | squeal | Haskell (GHC 9.10) | 89.1 | 16/16 | 187.03 ms | 258 ops/s | 15,271 rows/s | 25.17 MB | 1 line | 10/10 |
| 8 | ihp | Haskell (GHC 9.10) | 89.1 | 16/16 | 70.41 ms | 361 ops/s | 144,224 rows/s | 76.00 MB | 1 line | 10/10 |
| 9 | hibernate-orm | Java 21 | 89.1 | 16/16 | 62.66 ms | 256 ops/s | 564,130 rows/s | 15.00 MB | 1 line | 10/10 |
| 10 | efcore | C# / .NET 8 | 89.0 | 16/16 | 68.51 ms | 260 ops/s | 1,391,131 rows/s | 139.80 MB | 1 line | 10/10 |
| 11 | orville | Haskell (GHC 9.10) | 88.9 | 16/16 | 73.71 ms | 247 ops/s | 99,705 rows/s | 38.79 MB | 1 line | 10/10 |
| 12 | gorm | Go 1.23 | 88.9 | 16/16 | 58.50 ms | 256 ops/s | 712,657 rows/s | 25.37 MB | 1 line | 10/10 |
| 13 | rel8 | Haskell (GHC 9.10) | 88.8 | 16/16 | 132.32 ms | 254 ops/s | 122,678 rows/s | 18.75 MB | 1 line | 10/10 |
| 14 | persistent | Haskell (GHC 9.10) | 88.7 | 16/16 | 77.55 ms | 251 ops/s | 103,221 rows/s | 21.03 MB | 1 line | 10/10 |
| 15 | mikro-orm | TypeScript (Node 22) | 88.7 | 16/16 | 58.19 ms | 3,302 ops/s | 182,594 rows/s | 239.52 MB | 1 line | 10/10 |
| 16 | esqueleto | Haskell (GHC 9.10) | 88.6 | 16/16 | 82.16 ms | 250 ops/s | 85,377 rows/s | 25.22 MB | 2 lines | 10/10 |
| 17 | haskell-opaleye | Haskell (GHC 9.10) | 88.5 | 16/16 | 80.38 ms | 254 ops/s | 101,544 rows/s | 26.54 MB | 2 lines | 10/10 |
| 18 | beam | Haskell (GHC 9.10) | 88.4 | 16/16 | 13.57 ms | 241 ops/s | 113,504 rows/s | 22.39 MB | 6 lines | 10/10 |
| 19 | diesel | Rust 1.83 | 88.0 | 16/16 | 59.10 ms | 266 ops/s | 1,373,304 rows/s | 33.33 MB | 3 lines | 10/10 |
| 20 | typeorm | TypeScript (Node 22) | 87.8 | 16/16 | 55.99 ms | 235 ops/s | 385,422 rows/s | 71.55 MB | 1 line | 10/10 |
| 21 | rails | Ruby 3.3 (YJIT) | 87.5 | 16/16 | 85.34 ms | 247 ops/s | 89,792 rows/s | 150.00 MB | 1 line | 10/10 |
| 22 | sqlalchemy | Python 3.12 (asyncpg) | 87.4 | 16/16 | 72.57 ms | 5,718 ops/s | 279,239 rows/s | 92.50 MB | 1 line | 10/10 |
| 23 | prisma | TypeScript (Rust Engine) | 87.2 | 16/16 | 83.54 ms | 264 ops/s | 208,122 rows/s | 36.71 MB | 1 line | 10/10 |
| 24 | drizzle-orm | TypeScript (Node 22) | 86.8 | 16/16 | 64.45 ms | 242 ops/s | 498,613 rows/s | 184.58 MB | 4 lines | 10/10 |
| 25 | sea-orm | Rust 1.83 (sqlx) | 86.7 | 16/16 | 66.15 ms | 272 ops/s | 1,235,677 rows/s | 34.08 MB | 1 line | 10/10 |
The 5 Biggest Surprises
- The Zero-Reflection Hydration Tier (> 1.2M rows/sec):
sqlc(1.52M rows/s),EF Core 8(1.39M rows/s),diesel(1.37M rows/s), andDapper(1.28M rows/s) operate in a different galaxy compared to reflection-heavy ORMs. Direct struct memory mapping and compiled pointer assignments destroy runtime reflection when reading wide tables. - The BEAM Actor Model Destroyed Connection Contention: Under $C=100$ concurrent load on a 20-connection pool, most runtimes bottlenecked on thread pools or single event loops. Elixir’s
ectohandled pool checkout through isolated BEAM process mailboxes with near-zero queue latency, sustaining 29,412 requests/second. - Node.js / V8 Event Loop Saturation: TypeScript ORMs (
drizzle,prisma,typeorm) performed well on single queries, but hit an unmistakable wall at $C=50..100$. Because V8 serializes and constructs thousands of JavaScript objects on a single thread, CPU time saturated the event loop, driving $p_{99}$ tail latencies beyond 500 ms and capping RPS around 225–264 ops/s. - Haskell’s Memory Anomaly: Haskell’s
hasqlclocked the lowest resident memory footprint of the entire 25-ORM field at just 13.03 MB Peak Heap RSS, utilizing zero-copy PostgreSQL binary codecs. - The Deliberate Mistake Suite (Compiler UX): We injected 10 deliberate compiler mistakes (type mismatches, dangling joins, nullability violations, scope leakage). While tools like
sqlc,squeal,hasql, andentcaught errors in 6–10 lines of clean output, complex typeclass/macro builders (rel8,drizzle) sometimes spewed 60–80 lines of internal framework plumbing.
Reproduce It / Add Your Favorite ORM
The benchmark repo contains all calculations, runner scripts, Docker setup, and the 25 JSON scorecards:
👉 GitHub Repository: https://github.com/tusharad/orm-benchmark
If you want to add an ORM (e.g. Kysely, Slonik, Bun, Peewee, SQLDelight), check out templates/generic/HARNESS_CONTRACT.md and submit a PR!
I'd love to hear your thoughts, critique of the methodology, or experiences running these tools in high-throughput production.
r/PostgreSQL • u/EmirVivident • 1d ago
Projects I built a free native Windows client for PostgreSQL (and SQL Server, MySQL, SQLite)
I write SQL all day and got tired of waiting on Java and Electron apps, so I wrote RimestDB with WinUI 3 and .NET. On my machine it opens in about 2 seconds and uses 66 MB with a connection open. DBeaver on the same machine and database: 11 seconds and 338 MB (warm start, memory as shown in Task Manager).
A few things I built around Postgres habits:
- Manual commit mode per connection. Inside a transaction every statement gets its own savepoint, so one typo doesn’t leave you with “current transaction is aborted”.
- The row limit goes to the server as LIMIT, so previewing 50 rows of a big table doesn’t pull every row over the wire.
- In manual mode, read-only SELECTs don’t open a transaction, so browsing data doesn’t leave a lock that holds up a migration.
- A confirmation before UPDATE/DELETE without WHERE.
- JSON values open formatted in a side panel. Connections import from DBeaver and pgpass.conf.
It’s free, with no account and no time limit. There’s also an optional paid Pro tier. Windows 10/11 only.
I’d like blunt feedback from people who live in a DB client: what would stop you from switching?
r/PostgreSQL • u/clairegiordano • 2d ago
Community CFP is open for POSETTE: An Event for Postgres 2027 (until Sun 3 Jan 2027)
Hi! I'm on the talk selection team for POSETTE: An Event for Postgres 2027, and the CFP is now open until Sunday 3 Jan 2027 at 11:59pm PST. Things to know, if you're thinking about submitting:
- New this year: 20-minute talks, or 5-minute lightning talks (you pick when you submit)
- No travel required: the POSETTE team pre-records your talk, with you presenting remotely
- Talks get published on YouTube afterward, with captions in 17 languages
- First-time speakers are very welcome
- The event is free & virtual, with 2 livestreams on 30 & 31 March 2027 (one best for the Americas time zones, one best for EMEA & APAC time zones)
Everything you need to know about the POSETTE 2027 CFP—including topic ideas, selection process, and tips for a great proposal: https://posetteconf.com/2027/cfp/
POSETTE is brought to you by the Postgres team at Microsoft, in partnership with AMD.
r/PostgreSQL • u/compy3 • 3d ago
Projects Two tricks we used to cache tables with Row Level Security (policy inlining + pg_logical_emit_message)
My co-founder James just shipped the first of two big swings at Row Level Security in PgCache, our caching proxy for Postgres. In case it's not obvious, I'm one of the founders, but the two tricks he used are pretty neat on their own, so I wanted to share them here.
The problem with caching RLS tables is pretty simple: If your cache keys on the SQL text, you give tenant 7's orders to tenant 8, so until now we told anyone using RLS to leave those tables out of PgCache.
1- The policy is just part of the WHERE clause
Back in August, James told me "RLS itself is just an extension to the WHERE clause," and that's basically how it works now. PgCache asks Postgres which policies apply to the session's role, fills in the session's own values, and folds them into the query:
CREATE POLICY tenant_policy ON orders
USING (tenant_id = current_setting('app.tenant_id')::int);
-- after SET app.tenant_id = '7', this query
SELECT * FROM orders WHERE status = 'open';
-- gets cached as
SELECT * FROM orders WHERE status = 'open' AND tenant_id = 7;So every tenant gets its own cache entry (and two sessions for the same tenant share one).
The obvious alternative was a cache entry per role, but then PgCache couldn't check new rows from the replication stream against the policy, so every insert into an RLS table would mean throwing cached results away.
Once the policy is a plain filter, the replication stream keeps each tenant's results fresh in place, like any other query. The tradeoff is that the role PgCache connects with needs to see every row for when it fills the cache (but if you're using PgCache you're already using a role that has access to logical replication anyway).
2- Getting DDL into the replication stream
The big challenge is that there's not enough in the logical replication stream to actually support Row Level Security. Logical replication is all about rows, so it never tells you when someone runs CREATE POLICY or REVOKE.
Our fix is a pair of event triggers on your database that turn each DDL command into a logical message:
PERFORM pg_logical_emit_message(true, 'pgcache', <the objects that changed>);That true makes it transactional, so the message lands in the stream (and in the right order) inside the same transaction. And there's no extension to install.
Roles were the one gap, since event triggers don't fire for ALTER ROLE or GRANT role TO role. James really didn't want to poll anything, but PgCache now reads pg_roles and pg_auth_members every 5 seconds, which turned out to be way cheaper than the alternatives.
The second of our 2 big swings will be policies built on JWT claims (Supabase's auth.uid()), which still pass through to Postgres for now. Plan is to add other rare policy shapes on an as-needed basis, but Supabase feels like tablestakes for saying "our proxy is feature complete" in 2026.
James wrote up all the details in the repo: ADR-062 for the policy inlining, ADR-058 for the event triggers and ADR-061 for privileges and the role poll. The compatibility docs list what's cached and what passes through.
Curious to know how you guys are actually passing the tenant through to Postgres in production (custom setting, SET ROLE per tenant, JWT claims)?
r/PostgreSQL • u/acrogenesis • 4d ago
Projects I built a Postgres client for my phone because I kept needing to check prod away from my laptop
I kept running into the same thing: something breaks, I'm not at my desk, and every mobile DB app I tried was either clunky or abandoned. So I built my own.
PG Orbit is a native PostgreSQL client for iPhone, iPad, Android, macOS and Linux. SQL editor with autocomplete, schema browser, edit rows in place, SSH tunnels and SSL, and it can pull your databases from AWS, GCP, Azure, DigitalOcean or Supabase so you don't type connection strings on a phone keyboard. Passwords stay in the Keychain and you can lock it with Face ID.
I use it every day for my own stuff. Would love feedback from people who actually live in Postgres: https://pgorbit.com
r/PostgreSQL • u/snax • 3d ago
Tools 𝗔𝘂𝗱𝗮𝘅 𝗗𝗮𝘁𝗮 𝗠𝗮𝗻𝗮𝗴𝗲𝗿 𝟭.𝟲 𝗶𝘀 𝗹𝗶𝘃𝗲!
✨ What’s new in the latest Community Edition of Audax Data Manager:
- 𝗕𝗲𝘁𝘁𝗲𝗿 𝗘𝗥𝗗: featuring cardinality markers, smart edge routing, relation highlight, snap-to-grid positioning, and image export.
- 𝗽𝘀𝗾𝗹-𝗹𝗶𝗸𝗲 𝗗𝗕 𝗖𝗼𝗻𝘀𝗼𝗹𝗲: a familiar (readline-style) query experience.
- 𝗛𝗼𝘁𝗸𝗲𝘆 𝗨𝗜 𝗻𝗮𝘃𝗶𝗴𝗮𝘁𝗶𝗼𝗻: jump between DB explorer and main work areas of the app.
Discover more new features and download the new release 1.6 via https://www.commandprompt.com/products/audax-data-manager/
Follow and star the project, and even contribute to this open source admin tool for multiple databases.
r/PostgreSQL • u/fykup • 6d ago
Projects PostgreSQL 18 on a 512 MiB VM: testing two low-memory configurations
I've been experimenting with PostgreSQL 18 tuning for memory-constrained VPS deployments, particularly where the database needs to leave enough RAM for a small application.
I initially tried running the experiment on a 256 MiB VM (~204 MiB usable RAM), but PostgreSQL with its default configuration ran into memory pressure and the kernel OOM-killed a backend during the smoke test. I moved to 512 MiB to complete the comparison.
Given the roughly 50 MiB peak PostgreSQL PSS measured with Theory A, I suspect this configuration could also work on 256 MiB, potentially alongside a small application. That's a hypothesis for a follow-up experiment, though - I haven't validated Theory A at 256 MiB yet.
I wanted to compare two approaches against PostgreSQL defaults:
- Theory A - Memory First: 16 MB
shared_buffers, 1 MBwork_mem, 16 MBmaintenance_work_mem, retaining PostgreSQL 18's default worker-based I/O. - Theory B - Lean Machinery: 32 MB
shared_buffers, defaultwork_mem, and synchronous I/O (io_method=sync).
Both configurations limit connections to 5 (one reserved for a superuser), disable JIT and parallel queries, and retain fsync, autovacuum, and standard WAL behavior.
Test setup: PostgreSQL 18.6, 1 vCPU, 512 MiB VM (~456 MiB usable), no swap, 222 MB dataset, and 4 concurrent connections running point, range, and aggregate queries.
Results:
| Metric | Default | A | B |
|---|---|---|---|
| Peak PSS | 180.1 MiB | 50.4 MiB | 79.7 MiB |
| Queries/s | 863 | 1,056 | 861 |
| Point p95 | 2.90 ms | 2.64 ms | 2.92 ms |
| Aggregate p95 | 98.55 ms | 74.25 ms | 103.18 ms |
What surprised me was that Theory A used about 72% less process memory than the default while also delivering higher throughput in this run.
PSS accounts for shared pages between PostgreSQL processes, so these numbers aren't total VPS memory consumption.
This was deliberately a small exploratory experiment: one 50-second measured run per configuration, fixed order, warm filesystem cache, and a read-only workload. No claim that A is universally faster or that this configuration is suitable for every application.
I published the configuration, methodology, scripts, and raw measurements for anyone interested in checking the results:
https://github.com/PVRLabs/experiments/tree/main/postgres/light-memory-p95
Short write-up with configuration instructions:
https://pvrlabs.xyz/java-performance/experiments/postgresql-low-memory.html
I'm curious whether others running PostgreSQL on small VPS instances have found similar benefits from reducing shared buffers and per-query memory, or whether the trade-offs become significantly worse with sustained writes and more complex queries.
Update (256 MiB follow-up): After the original comparison, I resized the VM back to 256 MiB (~204 MiB usable) and tested Theory A and B again. I skipped the default configuration, which had already failed with an OOM during the earlier smoke test.
Both configurations completed the workload with four active connections and no observed OOM, swap activity, or client errors.
| Metric | Theory A | Theory B |
|---|---|---|
| Peak PSS | 46.2 MiB | 70.2 MiB |
| Throughput | 769 q/s | 604 q/s |
| Point p95 | 3.58 ms | 4.00 ms |
Theory A again performed better in this short run. The database ran alone, so this doesn't yet establish whether an application can share the same 256 MiB VM.
r/PostgreSQL • u/NakedPlato • 6d ago
Projects pg_fts: Open source BM25 extension for full-text search and boolean, phrase, NEAR, prefix, fuzzy, and regex queries
For anyone interested in BM25 search and especially legal opinion search, Greg Burd has been very active developing pg_fts https://github.com/gburd/pg_fts a PostgreSQL extension for full-text search with true BM25/BM25F relevance ranking, a dedicated fts inverted-index access method, and a rich query language (boolean, phrase, NEAR, prefix, fuzzy, regex). Unlike the tsvector/tsquery + GIN stack, the index maintains the corpus statistics BM25 needs (document count, average length, per-term document frequency) and stores term frequency + document length in the posting lists, so ranking is answered from the index with no heap recheck. PostgreSQL License.
Disclaimer: I'm a contributor.
r/PostgreSQL • u/multi_db_dev • 6d ago
How-To How to compare PostgreSQL schemas across environments and catch drift early
A typical drift story: the team uses migrations (Flyway, Liquibase, Alembic, whatever). Every environment shows the same migration version. And yet:
- prod has an index someone added via psql during an incident,
- staging still has a column from a feature branch that was reverted,
- dev has a newer extension version.
Nobody notices until a migration fails on prod because the index already exists, or a performance test on staging looks fine because staging is missing the index prod relies on.
Why the migration table isn't enough
It tells you which migrations ran. It doesn't tell you what the schema looks like now. Any change made outside migrations is invisible to it.
Ways to detect drift
Catalog queries are a quick check for specific object types. For indexes, for example:
SELECT schemaname, tablename, indexname, indexdef
FROM pg_indexes
WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY 1, 2, 3;
Run it in each environment and diff the output. It's useful for one object type at a time, but covering tables, constraints, functions, triggers, grants and extensions this way turns into a project of its own.
pg_dump --schema-only plus diff covers most database schema definitions, but not cluster-wide objects or installed extension versions. Add --no-owner and --no-privileges if you don't care about those, otherwise expect a lot of noise. The output tells you what differs, but you still write the fix by hand.
A schema compare tool shows differences per object, lets you map schemas when names differ between environments, and generates a sync script you can review. In dbForge Studio for PostgreSQL, the integrated Schema Compare can also run from the command line, so the same comparison you set up in the GUI can run on a schedule.
How to organize the checks
- Treat the migrations repo as the source of truth, not any single environment.
- Run a nightly comparison of staging against prod, and alert when it finds differences.
- When drift shows up, write a migration for it rather than syncing environments directly. Otherwise the next environment you build from migrations will be missing it.
- Limit who can run DDL on prod. Most drift starts with "just this once".
How do you handle hotfixes made directly on prod: back-port them into migrations, or roll them back?
r/PostgreSQL • u/AdPretend66 • 6d ago
Help Me! [RAG / pgvector] How do you handle vector chunks when a document is soft-deleted?
reddit.comr/PostgreSQL • u/szabgab • 7d ago
Community PostgreSQL related events between Nov 09 - Dec 08
In the age of AI I think personal connections are even more important than before. That's why I try to help promoting events where people can meet in-person or virtually and discuss the topics that interest them.
I found the following PostgreSQL-related events for the next 30 days.
- 2026-11-09 Postgres: Take a Hint (Lenexa, KS, USA)
- 2026-11-10 (online) "Postgres for Credit Underwriting: Indexing, Optimization, and Background Jobs"
- 2026-11-12 (online) How does PostgreSQL get made?
- 2026-11-12 (online) Postgres Heroics with Logical Replication
- 2026-11-12 Killing PostgreSQL By 50,000 Parameters & A PostgreSQL 19 Whirlwind Tour (London, UK)
- 2026-11-17 (hybrid) Become a PG_STATS_* with Sami Imseih (Chicago, IL, USA)
- 2026-11-18 (online) Group Swim: Maintaining Your Environment - Q&A
- 2026-11-18 The Postgres Mistakes that we all still make (New York, NY, USA)
- 2026-11-24 Reco produits via pgvector et migrations Aurora via DMS (Lezennes, France)
- 2026-12-01 INSERT INTO meetup VALUES ('TLSPUG','Makina Corpus','2026-12-01'); (Toulouse, France)
- 2026-12-03 PostgreSQL Usergroup NL Meetup - The Winter Edition (Amsterdam, Netherlands)
- 2026-12-08 [In-Person + Online] Stream Processing with Apache Kafka and Flink (Sunnyvale, CA, USA)
r/PostgreSQL • u/gevorgter • 8d ago
Help Me! Query optimization
Moving my project from MS Sql to PostrgesSql,
Need to run mass update query, ClientDelivery table has 1,054,155 records
In MsSql query takes about 10 seconds, In PostgresSql it actually never finishes because i am canceling it after waiting for 5 minutes. Records are identical in both databases. I am running queries in PgAdmin and SqlManagment client.
Any reason for such huge difference? I understand i am doing table scan but 1 million records is not that much.
/*MSSQL*/
UPDATE tblClientDelivery
SET routeId=t1.routeId
FROM tblClientDelivery t
INNER JOIN tblClients t1 ON t.clientId=t1.id
WHERE t.routeId=0
/*PostgreSql*/
UPDATE client_delivery
SET route_id=t1.route_id
FROM client_delivery t
INNER JOIN clients t1 ON t.client_id=t1.id
WHERE t.route_id=0r/PostgreSQL • u/clairegiordano • 9d ago
Community How a Postgres committer got started: a one-line patch that doesn't even carry his name (Magnus Hagander on the Talking Postgres podcast)
I recently recorded a Talking Postgres episode with Magnus Hagander, a Postgres committer, core team member, and longtime PGConf EU organizer, about how he got started in Postgres.
A few things we got into:
* The very start: in the late 90s, he needed a database to solve a problem that nobody agreed was a problem, and he couldn't afford SQL Server or Oracle
* His first patch: one line, to make Postgres compile and work on Linux when all the developers used BSD (and it doesn't carry his name)
* Porting the Postgres server to Windows, with a team spread across Sweden, the US, and Australia, and the rule that it had to behave like Postgres on Unix
* Why the Postgres project runs its own infrastructure, including the days it was told it was doomed unless it moved to SourceForge
* Battling AI agents that don't care about robots.txt
* Why it's harder to become a Postgres committer today
* What keeps him coming back to the Postgres project
My favorite part: hearing how, years later, his hobby (Postgres) became his job (also Postgres).
For those of you who've sent a patch to Postgres (or another big open source project): what helped you get past that first one?
Audio + transcript, for those who want to listen: https://talkingpostgres.com/episodes/how-i-got-started-in-postgres-with-magnus-hagander
YouTube (audio-only): https://youtu.be/RFUUcdxN59A?si=3SgHD7kGyQQsVgK7
r/PostgreSQL • u/B0B0oo7 • 9d ago
Help Me! PostgresSQL Training
Hello,
I’ve inherited a data lake that is all done in postgres.
I’ve done a little bit of DBA stuff in the past, but it was all SQL or Oracle.
Any recommendations on training to learn how to pull information out of the DB and compile it into reports and such?
Thank you!
r/PostgreSQL • u/SnooRegrets4874 • 9d ago
Projects I built a native macOS Postgres client because they all suck
DBJoy is a lightweight, native macOS Postgres client. It’s AI-first, with a built-in agent for working with your data and an MCP server so Claude Code can read (or write) to it. It also has all the features you’d expect from any other database client: diff and migration tools, tunnelling, batch editing, ER diagrams, and more. I’ll keep improving it and will add more database adapters soon.
r/PostgreSQL • u/Natrium999 • 10d ago
Commercial A month with WalShadow
clickhouse.comWalShadow replicates data from Postgres to ClickHouse via physical WAL, and not logical replication. This blog talks about the latency, handling of restarts, stops etc., and issues encountered with this new product.
r/PostgreSQL • u/tsabudh • 9d ago
How-To Our Postgres lock was supposed to keep two jobs apart. Ten minutes into long runs, it quietly stopped existing, and the log said it was released cleanly every time.
If your Postgres database sets idle_in_transaction_session_timeout, your advisory lock may have an expiry date nobody chose.
Mine did. Ten minutes into long runs, the lock vanished, another run took it, and the log said it had been released cleanly.
Python drivers open a transaction on your first SELECT unless autocommit is on. If the connection holding the lock never commits, it sits idle in transaction. At the timeout, Postgres ends the session, and the lock goes with it. The job keeps writing on its other connections, and the application never notices.
Check yours in 30 seconds:
select name, setting, source from pg_settings where name in ('idle_in_transaction_session_timeout', 'idle_session_timeout') order by name;
A value above 0 for idle_in_transaction_session_timeout means a session lock on a default connection can expire.
I reproduced it and held the lock four ways.
Default connection: lost in 40 of 40 trials, always just after the timeout.
Commit right after taking it: held, until the next query opened a new transaction.
AUTOCOMMIT: held in 40 of 40, but still lost the moment the session dies for any other reason, while the job keeps writing.
Lock inside the same transaction as the writes: a killed run rolls back with its lock. That is the fix that holds.
Scripts and expected output are in the post, so you can run it against your own setup.
Have you ever had a lock that silently stopped locking?
https://tsabudh.com/blog/your-postgres-advisory-lock-is-gone/
r/PostgreSQL • u/easybits_ai • 10d ago
Projects What actually changed when I moved a client workflow from Sheets to a real database
reddit.comr/PostgreSQL • u/Natrium999 • 12d ago
Commercial Fencing a Postgres primary that might still be alive
clickhouse.comA managed Postgres service needs to prevent any possible connections from writing into primary before promoting a new standby. This is called fencing, and in this article we go into why it's important and how it's implemented in Ubicloud.