r/PostgreSQL • • Oct 16 '26

Community Postgres Conference 2027 CFP is open (San Jose, April 21-23)

Post image
31 Upvotes

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 • • 22h ago

Community How did Postgres displace MySQL?

255 Upvotes

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 • • 2h 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.

0 Upvotes

👉 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:

  1. Deserializing 10,000 wide rows into typed structs under memory pressure.

  2. Materializing 4-level deep entity graphs without Cartesian explosions or N+1 floods.

  3. Compiling recursive CTEs, multi-frame window functions (ROWS BETWEEN 4 PRECEDING), or pgvector cosine similarity.

  4. Squeezing 100 concurrent workers competing for row locks (SELECT ... FOR UPDATE) through a constrained connection pool.

  5. 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

RankORMLanguageOverall ScorePassed (HQ01–16)Avg p95 LatencyPeak RPS (C=50)Hydration SpeedMax Heap RSSBlast RadiusCompiler UX
🥇 1sqlcGo 1.2389.616/1658.80 ms32,340 ops/s1,518,142 rows/s25.12 MB1 line10/10
🥈 2hasqlHaskell (GHC 9.10)89.516/1665.83 ms277 ops/s199,025 rows/s13.03 MB1 line10/10
🥉 3DapperC# / .NET 889.516/1662.67 ms264 ops/s1,279,038 rows/s87.27 MB1 line10/10
4jOOQJava 2189.416/1657.71 ms9,739 ops/s454,966 rows/s149.00 MB1 line10/10
5entGo 1.2389.316/1661.36 ms246 ops/s570,841 rows/s25.12 MB1 line10/10
6ectoElixir 1.17 / OTP 2789.216/1658.20 ms29,412 ops/s354,070 rows/s83.06 MB1 line10/10
7squealHaskell (GHC 9.10)89.116/16187.03 ms258 ops/s15,271 rows/s25.17 MB1 line10/10
8ihpHaskell (GHC 9.10)89.116/1670.41 ms361 ops/s144,224 rows/s76.00 MB1 line10/10
9hibernate-ormJava 2189.116/1662.66 ms256 ops/s564,130 rows/s15.00 MB1 line10/10
10efcoreC# / .NET 889.016/1668.51 ms260 ops/s1,391,131 rows/s139.80 MB1 line10/10
11orvilleHaskell (GHC 9.10)88.916/1673.71 ms247 ops/s99,705 rows/s38.79 MB1 line10/10
12gormGo 1.2388.916/1658.50 ms256 ops/s712,657 rows/s25.37 MB1 line10/10
13rel8Haskell (GHC 9.10)88.816/16132.32 ms254 ops/s122,678 rows/s18.75 MB1 line10/10
14persistentHaskell (GHC 9.10)88.716/1677.55 ms251 ops/s103,221 rows/s21.03 MB1 line10/10
15mikro-ormTypeScript (Node 22)88.716/1658.19 ms3,302 ops/s182,594 rows/s239.52 MB1 line10/10
16esqueletoHaskell (GHC 9.10)88.616/1682.16 ms250 ops/s85,377 rows/s25.22 MB2 lines10/10
17haskell-opaleyeHaskell (GHC 9.10)88.516/1680.38 ms254 ops/s101,544 rows/s26.54 MB2 lines10/10
18beamHaskell (GHC 9.10)88.416/1613.57 ms241 ops/s113,504 rows/s22.39 MB6 lines10/10
19dieselRust 1.8388.016/1659.10 ms266 ops/s1,373,304 rows/s33.33 MB3 lines10/10
20typeormTypeScript (Node 22)87.816/1655.99 ms235 ops/s385,422 rows/s71.55 MB1 line10/10
21railsRuby 3.3 (YJIT)87.516/1685.34 ms247 ops/s89,792 rows/s150.00 MB1 line10/10
22sqlalchemyPython 3.12 (asyncpg)87.416/1672.57 ms5,718 ops/s279,239 rows/s92.50 MB1 line10/10
23prismaTypeScript (Rust Engine)87.216/1683.54 ms264 ops/s208,122 rows/s36.71 MB1 line10/10
24drizzle-ormTypeScript (Node 22)86.816/1664.45 ms242 ops/s498,613 rows/s184.58 MB4 lines10/10
25sea-ormRust 1.83 (sqlx)86.716/1666.15 ms272 ops/s1,235,677 rows/s34.08 MB1 line10/10

The 5 Biggest Surprises

  1. 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), and Dapper (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.

  2. 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 ecto handled pool checkout through isolated BEAM process mailboxes with near-zero queue latency, sustaining 29,412 requests/second.

  3. 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.

  4. Haskell’s Memory Anomaly: Haskell’s hasql clocked 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.

  5. 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, and ent caught 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 • • 1d ago

Projects I built a free native Windows client for PostgreSQL (and SQL Server, MySQL, SQLite)

Post image
0 Upvotes

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?

db.rimest.com


r/PostgreSQL • • 2d ago

Community CFP is open for POSETTE: An Event for Postgres 2027 (until Sun 3 Jan 2027)

3 Upvotes

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 • • 3d ago

Projects Two tricks we used to cache tables with Row Level Security (policy inlining + pg_logical_emit_message)

Post image
12 Upvotes

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 • • 3d ago

Projects I built a Postgres client for my phone because I kept needing to check prod away from my laptop

17 Upvotes

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 • • 3d ago

Tools 𝗔𝘂𝗱𝗮𝘅 𝗗𝗮𝘁𝗮 𝗠𝗮𝗻𝗮𝗴𝗲𝗿 𝟭.𝟲 𝗶𝘀 𝗹𝗶𝘃𝗲!

0 Upvotes

✨ 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 • • 5d ago

Projects PostgreSQL 18 on a 512 MiB VM: testing two low-memory configurations

18 Upvotes

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 MB work_mem, 16 MB maintenance_work_mem, retaining PostgreSQL 18's default worker-based I/O.

  • Theory B - Lean Machinery: 32 MB shared_buffers, default work_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:

MetricDefaultAB
Peak PSS180.1 MiB50.4 MiB79.7 MiB
Queries/s8631,056861
Point p952.90 ms2.64 ms2.92 ms
Aggregate p9598.55 ms74.25 ms103.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.

MetricTheory ATheory B
Peak PSS46.2 MiB70.2 MiB
Throughput769 q/s604 q/s
Point p953.58 ms4.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 • • 5d ago

Projects pg_fts: Open source BM25 extension for full-text search and boolean, phrase, NEAR, prefix, fuzzy, and regex queries

23 Upvotes

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 • • 5d ago

How-To How to compare PostgreSQL schemas across environments and catch drift early

0 Upvotes

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 • • 5d ago

Help Me! [RAG / pgvector] How do you handle vector chunks when a document is soft-deleted?

Thumbnail reddit.com
1 Upvotes

r/PostgreSQL • • 6d ago

Commercial Xata is joining ClickHouse

Thumbnail
xata.io
27 Upvotes

r/PostgreSQL • • 6d ago

Community PostgreSQL related events between Nov 09 - Dec 08

8 Upvotes

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.


r/PostgreSQL • • 8d ago

Help Me! Query optimization

26 Upvotes

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=0

r/PostgreSQL • • 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)

13 Upvotes

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 • • 9d ago

Help Me! PostgresSQL Training

12 Upvotes

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 • • 8d ago

Projects I built a native macOS Postgres client because they all suck

1 Upvotes

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.

https://github.com/agustind/dbjoy


r/PostgreSQL • • 9d ago

Commercial A month with WalShadow

Thumbnail
clickhouse.com
11 Upvotes

WalShadow 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 • • 8d 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.

0 Upvotes

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 • • 9d ago

Projects What actually changed when I moved a client workflow from Sheets to a real database

Thumbnail reddit.com
1 Upvotes

r/PostgreSQL • • 11d ago

Commercial Fencing a Postgres primary that might still be alive

Thumbnail
clickhouse.com
10 Upvotes

A 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.


r/PostgreSQL • • 11d ago

Projects PostgreSQL CSV import benchmark: COPY vs JDBC, Scriptella, and Pandas (1M rows)

10 Upvotes

A while ago I shared an earlier version of this benchmark here, comparing Scriptella, JDBC, csvsql, and PostgreSQL COPY. Several people suggested useful improvements, particularly enabling pgJDBC's reWriteBatchedInserts=true. Thanks for that feedback! It made a real difference in subsequent experiments.

I've since updated the benchmark to Scriptella 1.7, replaced csvsql with Pandas + SQLAlchemy, and retained native COPY as a performance reference. I maintain Scriptella, a Java-based, SQL-first ETL tool.

Results (1M rows, median of two runs):

ImplementationTime
PostgreSQL COPY1.75 s
Handwritten JDBC (batch 1000)7.64 s
Scriptella 1.7 (batch 1000)8.75 s
Pandas + SQLAlchemy31.55 s

COPY was the clear winner, roughly 5× faster than Scriptella. Scriptella was 3.6× faster than the tested Pandas workflow, while handwritten JDBC was slightly faster than Scriptella.

Both Scriptella and JDBC now use batch size 1,000 with reWriteBatchedInserts=true. Pandas uses chunked read_csv() and SQLAlchemy to_sql(), without a native bulk-loading path.

All imports were independently verified. Timings include process startup through completion, and the results come from two runs on one machine, so they're directional rather than universal.

Full experiment, chart, methodology, and reproducible benchmark:

https://pvrlabs.xyz/java-performance/experiments/scriptella-1-7-csv-import-benchmark.html

Now that I've covered straightforward CSV imports, I'm planning to focus more on actual ETL workflows and database-to-database migrations, both in Scriptella development and future benchmarks.

What PostgreSQL migration scenarios would you find most useful to explore? I'm particularly interested in real-world challenges involving transformations, different database engines, and larger datasets.