Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
anarazel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
91.
▲
by
anarazel
2y ago
> That's still an architectural thing. If CPU isn't an issue, why would you be running your application server on a different machine from your database? Because that'll be too much of a scalability limitation. Rails etc a
92.
▲
by
anarazel
2y ago
For typical rails like applications that are "bottlenecked on the database", latency is a much bigger factor than actual query processing performance. Even if careful about placement of the database and "application servers&q
93.
▲
by
anarazel
2y ago
> I don't think it can be used to construct logical changes. It can: https://www.postgresql.org/docs/current/logicaldecoding.html It's not entirely from the WAL though, some catalog accesses are neces
94.
▲
by
anarazel
2y ago
I got Elon tweets in my notifications, despite having him blocked. That was the last straw for me.
95.
▲
by
anarazel
2y ago
There's a patch for that, but JITLink doesn't work for all the versions of LLVM we support. At least not on enough architectures.
96.
▲
by
anarazel
2y ago
Fwiw, a good portion of IO via io_uring is not executed via the threaded work queue anymore. Even with buffered file reads it's avoided for some common filesystems. You're right of course that there are lots of cases (missing meta
97.
▲
by
anarazel
2y ago
> Especially since launching postgres is equally easy and fast as sqlite It's definitely not as fast to start postgres as it is to start sqlite. Pretty much inherently - postgres has to fork a bunch of processes, establishes network
98.
▲
by
anarazel
2y ago
Postgres does have infrastructure to avoid this in cases where the result is reused, and that's used in other places, e.g. array constructors / accessors. But not for jsonb at the moment.
99.
▲
by
anarazel
2y ago
> If you have a user table with a non-nullable email column and a nullable username column, and a uniqueness constraint on something like (email, username), you'll be able to insert multiple identical emails with a null username int
100.
▲
by
anarazel
2y ago
FWIW, PG's default has been flipped to checksums being enabled by default in the in-development version. Personally I'm not sure it's the right call, as it comes with some increased write overhead.
101.
▲
by
anarazel
2y ago
CRC32C is not that cheap, even with hardware acceleration. Postgres uses CRC32C for the WAL an it definitely shows up in profiles, despite HW acceleration. And that's at a far lower throughput than you can have with e.g. sequential s
102.
▲
by
anarazel
2y ago
It's been only four days since a phone alarm would have let me sleep through giving a talk. Android rebooted, somehow got stuck in a reboot loop (I think), discharging faster than the crappy charger charged. Luckily jetlag worked in my
103.
▲
by
anarazel
2y ago
You can implement a different mvcc model today, without patching code.
104.
▲
by
anarazel
2y ago
> Even the extension systems, which have the opportunity to hook directly into DB internals (and has no standardization to bother meeting) end up with SQL as the API to do actual db operations. FWIW, nothing forces an extension to do so.
105.
▲
by
anarazel
2y ago
> I'd be curious how much effort and specific shared-memory-IPC-expertise is required on the part of the Postgres maintainers to keep the shared memory layer capable and secure. I don't think security plays a huge role for shar
106.
▲
by
anarazel
2y ago
FWIW, the biggest problem I've seen with efficiently using io_uring for networking is that none of the popular TLS libraries have a buffer ownership model that really is suitable for asynchronous network IO. What you'd want is the
107.
▲
by
anarazel
2y ago
You can, you just need to use savepoints.
108.
▲
by
anarazel
2y ago
The bottleneck isn't at all the checksum computation itself. It's that to keep checksums valid we need to protect against the potential of torn pages even in cases where it doesn't matter without checksums (i.e. were just ind
109.
▲
by
anarazel
2y ago
Historically there was no atomicity at 4k boundaries, just at 512 byte boundaries (sectors). That'd have been too limiting. Lowering the limit now would prove problematic due to the smaller row sizes/ lower number of columns.
110.
▲
by
anarazel
2y ago
It's indeed used: Definition of macro: https://sourceware.org/git/?p=glibc.git;a=blob;f=include/lib... Use: https://sourceware.org/git/?p=glibc.git;a=blob;f=string/memm... For a bun
111.
▲
by
anarazel
2y ago
Nitpick: If you're careful fdatasync() can suffice.
112.
▲
by
anarazel
2y ago
The linked code is actually just for the variables in psql (the commandline tool). For the code parsing input to the SQL-level bool datatype, it's https://github.com/postgres/postgres/blob/master/src
113.
▲
by
anarazel
2y ago
In my experience, the conflict in many bigger orgs isn't even on the cost vs profit axis, it's on the tangible vs non-tangible axis. It's a lot easier for middle managers to show they did well if they deliver customer impacti
114.
▲
by
anarazel
2y ago
> Meh. Well. Good to hear on the cleanup. Didn't know it used to be different :/ If you want to be scared: Until not too long ago postgres' supervisor process would start some types of subprocesses from within a signal han
115.
▲
by
anarazel
2y ago
It unfortunately is used from within signal handlers, albeit only in specific cases (SIGFPE). There used to several more, but we luckily largely cleaned that up over the last few years.
116.
▲
by
anarazel
2y ago
> I just looked at the locking around running queries on a replica, and that's clearly never going to be correct Uh, huh. Details please?
117.
▲
by
anarazel
2y ago
Just because I spent a few hours in the postgres parser guts lately: Postgres doesn't quite have the span of the error, just a single location :). We can of course measure the length of the token at the error point, but that isn't
118.
▲
by
anarazel
2y ago
Where I think ML would be much better than what we (postgres) do, is iteratively improving selectivity estimation. In today's postgres there's zero feedback from noticing at runtime that the collected statistics lead to bad estima
119.
▲
by
anarazel
3y ago
Postgres uses multiple processes, shared memory etc. The single user thing that OP referenced is single user because of that...
120.
▲
by
anarazel
3y ago
> The performance regression is __not__ big. It's lucky Andres caught it at all. It's also not necessarily all that simple to remove it. It's not simply a bug in a loop or some such. If I was the xz team I'd have enou
More ›