Rendered at 05:54:49 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
gwking 6 hours ago [-]
I am surprised that "an already-open transaction that reads events for the first time after the swap can see an empty table" is considered acceptable.
I am not a Postgres user, and I appreciate that production databases are complicated beasts. Do people who use Postgres for production think this sounds fine?
6 hours ago [-]
paulryanrogers 4 hours ago [-]
IIRC it depends upon transaction isolation level, and every mode has its trade-offs
cwillu 33 minutes ago [-]
No, this specific deficiency applies in all isolation modes, and is therefore probably the main reason why that behaviour is not the default.
piskov 4 hours ago [-]
Try storing datetimeoffset (ie datetime with time zone) in Postgres. It can’t.
Also suppose you have a lastname and want to have case-insensitive search over it (prefix and equal).
In MS SQL you just add an index. By the way, there is only one type to choose from (ignoring clustered or multicolumn) — it just works.
In Postgres you needed to jump through effing hoops just for that until like 1-2 years ago when they finally added case-insensitive collation with prefix search support.
—
How people ignored such basic stuff for any CRUD app for years is beyond me.
skew-aberration 3 hours ago [-]
timestamptz (with time zone) stores the times without time zone (in UTC), on the rationale that 'with time zone' means each read/write of that column will have a user supplied time zone..
piskov 3 hours ago [-]
Timestampz discards the timezone and converts to utc, meaning it is a destructible operation — you cannot bring back the original.
This may be important in many cases: for example antifraud where you want to store also what was literally on the user’s clock (including timezone) and show it later in reports and what have you
bruce511 43 minutes ago [-]
I agree that the MSSQL timezoneoffset approach is the best.
However the Postgres (and others) work-around is simply to add a LocalTimeZone field where necessary.
Yeah, it's not as convenient, but it's a simple, effective, work-around.
For me, this isn't the killer-app distinction that suggests choosing MSSQL over Postgres.
dapperdrake 26 minutes ago [-]
This kind of audit trail sounds like a "store a string" nail or hammer.
jiggawatts 3 hours ago [-]
Conversely, MS SQL doesn’t allow BRIN indexes for clustered row-store tables despite already having the code in the database engine for it!
Every database engine has bizarre limitations that make no sense to me.
I’ve noticed that a few other disgruntled DBAs have started fixing these issues up by throwing tokens at Postgres.
sarajevo 3 hours ago [-]
[dead]
yuuch 2 days ago [-]
From an app dev perspective, 19 feels pretty quiet—especially since SQL/PGQ and GROUP BY ALL got pushed out to 20.
For ops, though, it's a huge quality-of-life release. Built-in REPACK (CONCURRENTLY), turning on logical replication without a restart, and turning JIT off by default finally fix some of the biggest day-to-day operational headaches without needing external extensions or workarounds.
fabian2k 7 hours ago [-]
The JIT default was terrible, I'm very surprised it survived that long. I really like Postgres, but that was the one rare misstep I've noticed.
The JIT just hits so hard when it misfires, suddenly queries that took 100-200ms take 2 seconds because they hit the JIT threshold. And I've seen worse than that for more complex, but still usually fast queries.
dapperdrake 50 minutes ago [-]
That sounds rough.
dapperdrake 37 minutes ago [-]
Ahh, in chapter 30 of the Postgres docs they explain. The are using LLVM. If I recall correctly, then Chrome V8 and JVM explicitly use very different compiler designs, because GCC and LLVM make many trade-offs the other way than what you would want for JIT.
Why didn’t postgres try plv8 for jit, instead? Only half-joking. It is designed for JIT way more than raw LLVM is.
Always thought the stuff that makes people good at data geometry and query planning also makes people good at compilers.
Postgres is a surprising counter-example. Especially, because its overall quality seems rather high. Food for thought.
On the other hand, fsync-gate showed that well-meaning people can end up talking past each other.
Developing Postgres seems harder and harder by the day.
Scaled 2 hours ago [-]
I can always tell when a new postgres comes out because one of my docker powered apps just breaks (just a selfhosted one, nothing actually important). The official docker for postgres attempts to do no auto update between versions and you're basically left to go figure it out yourself when `latest` breaks itself. This is by design, apparently.
I know there's an argument for version pinning, but I don't want to have to handhold random docker containers. It should be automated IMO. It's become a deterrent for me wanting to deploy anything that depends on postgres.
TkTech 2 hours ago [-]
There is no universe where a database auto- updating across major versions is a sane default. If you want a "postgres-yolo" container, you could build it on top of the upstream image and use cron/github action/etc to automate rebuilds.
rectang 1 hours ago [-]
Supporting people who think "postgres-yolo" should be a thing would be a masochistic self-own. Perpetual backwards compatibility is not a reasonable addition to all the other constraints that database development must satisfy.
dapperdrake 51 minutes ago [-]
Let’s call it fake SMR as a service.
Defman 36 minutes ago [-]
If you want to YOLO the latest version with automatic upgrade, consider using [1] instead of the default postgres:latest image
Needs an option that pre-compresses to zero Bytes on rainy Tuesday's in timezones with a something-and-a-half hours offset from UTC during DST and a race condition in a chron job.
drewfax 2 hours ago [-]
I'm in same boat. I love Postgres but honestly it's backward incompatability is a non starter for self-hosting.
drdexebtjl 1 hours ago [-]
You don’t have to upgrade to a new major version when it comes out, you know?
Postgres 18 will still get bug fixes and security updates for 4 more years.
dapperdrake 47 minutes ago [-]
Semver in practice is "a land of contrasts", but when exactly is 'latest' the best possible idea for production postgres?
At that point also go with "ext4" 'latest'. Bonus points for it silently going to ext5 in future.
I am not a Postgres user, and I appreciate that production databases are complicated beasts. Do people who use Postgres for production think this sounds fine?
Also suppose you have a lastname and want to have case-insensitive search over it (prefix and equal).
In MS SQL you just add an index. By the way, there is only one type to choose from (ignoring clustered or multicolumn) — it just works.
In Postgres you needed to jump through effing hoops just for that until like 1-2 years ago when they finally added case-insensitive collation with prefix search support.
—
How people ignored such basic stuff for any CRUD app for years is beyond me.
This may be important in many cases: for example antifraud where you want to store also what was literally on the user’s clock (including timezone) and show it later in reports and what have you
However the Postgres (and others) work-around is simply to add a LocalTimeZone field where necessary.
Yeah, it's not as convenient, but it's a simple, effective, work-around.
For me, this isn't the killer-app distinction that suggests choosing MSSQL over Postgres.
Every database engine has bizarre limitations that make no sense to me.
I’ve noticed that a few other disgruntled DBAs have started fixing these issues up by throwing tokens at Postgres.
For ops, though, it's a huge quality-of-life release. Built-in REPACK (CONCURRENTLY), turning on logical replication without a restart, and turning JIT off by default finally fix some of the biggest day-to-day operational headaches without needing external extensions or workarounds.
The JIT just hits so hard when it misfires, suddenly queries that took 100-200ms take 2 seconds because they hit the JIT threshold. And I've seen worse than that for more complex, but still usually fast queries.
Why didn’t postgres try plv8 for jit, instead? Only half-joking. It is designed for JIT way more than raw LLVM is.
https://www.postgresql.org/docs/current/jit-reason.html
Postgres is a surprising counter-example. Especially, because its overall quality seems rather high. Food for thought.
On the other hand, fsync-gate showed that well-meaning people can end up talking past each other.
Developing Postgres seems harder and harder by the day.
I know there's an argument for version pinning, but I don't want to have to handhold random docker containers. It should be automated IMO. It's become a deterrent for me wanting to deploy anything that depends on postgres.
[1]: https://hub.docker.com/r/pgautoupgrade/pgautoupgrade
Postgres 18 will still get bug fixes and security updates for 4 more years.
At that point also go with "ext4" 'latest'. Bonus points for it silently going to ext5 in future.