Live data from Hacker News

PlanetScale for Postgres is now GA

planetscale.com

191–196 of 196 posts

Re: PlanetScale for Postgres is now GA

#191

Earlier quoted context omitted.

> In a previous use case, when using postgres as a WAL-like append only store, I noticed that indexes would get massive. Then, after a while, they'd magically shrink. It's possible to recycle pages within indexes that have some churn (e.g., with workloads that use bulk range deletions). But it's not possible for indexes to shrink on their own, in a way that can be observed by monitoring the output of psql's "\di+" co…

I may not be remembering fully, maybe the indexes never shrunk but the tables did in size. Is there no way to automatically clean up indexes then?

> I may not be remembering fully, maybe the indexes never shrunk but the tables did in size.

That only happens when it is possible to give back space to the OS filesystem using relation truncation in the first place -- which isn't all that common (it's generally only seen when there are bulk range deletions that leave lots of contiguous empty space at the end of a table/heap structure). But you said that this is an append-only workload.

This behavior can be disabled by setting the vacuum_truncate table storage parameter to "off". This is useful with workloads where relation truncation is disruptive (truncation needs to acquire a very heavyweight table lock).

> Is there no way to automatically clean up indexes then?

What I meant was that indexes do not support relation truncation. It follows that the amount of space used for an index (from the point of view of the OS) cannot ever go down, barring a REINDEX or a VACUUM FULL.

This does not mean that we cannot reuse space for previously freed/deleted pages (as long as we're reusing that space for the same index). Nor does it mean that "clean up" isn't possible in any general sense.

Re: PlanetScale for Postgres is now GA

#192

Earlier quoted context omitted.

> Hundreds of writes per second? Those extra milliseconds become a real bottleneck. Of course it's nicer if the database can handle it, but if you are doing hundreds of sequential non-pipelined writes per second, there is a good chance that there is something wrong with your application logic.

Not universal, there are systems that need high frequency, low latency, strong consistency, writes.

Yes, but for the majority of those, rhose would be individial transactions per e.g. request, so the impact would be a fixed latency penalty rather than a multiplicative one.

Re: PlanetScale for Postgres is now GA

#193
post #177
post #84

Earlier quoted context omitted.

yes, you can pick a cloud provider and region, and you can deploy replicas to other regions

That's a bit vague isn't it? Certainly that does not mean putting something guaranteed even in the same data center, let alone the same rack.

Vague how? Your issue is that the major cloud providers can’t tell you where specifically your server is located? I don’t get it

Re: PlanetScale for Postgres is now GA

#194
post #177

Earlier quoted context omitted.

That's a bit vague isn't it? Certainly that does not mean putting something guaranteed even in the same data center, let alone the same rack.

Vague how? Your issue is that the major cloud providers can’t tell you where specifically your server is located? I don’t get it

Well... yea. A db is nice and all, but if you can't predictably host it somewhere where you can finely control the latency, you're gonna suffer.

Re: PlanetScale for Postgres is now GA

#195
post #194

Earlier quoted context omitted.

Vague how? Your issue is that the major cloud providers can’t tell you where specifically your server is located? I don’t get it

Well... yea. A db is nice and all, but if you can't predictably host it somewhere where you can finely control the latency, you're gonna suffer.

with long-running TLS connections this really isn't an issue; turn keepalives on and the connection generally stays hot. grpc over TLS also means features like resumption / TLS ticketing also work.

i used to think this way, and then i tried it, and i have to admit it's pretty good.

think of all the complexity on the other side of running a stable multi-regional database: networking, disk failure, routing, caching. all of that is negated. so yes, there is some latency, but not as much as you think, and honestly, i'd make the trade again in a heartbeat.

Re: PlanetScale for Postgres is now GA

#196
post #140

Earlier quoted context omitted.

we've seen a number of Supabase -> PlanetScale migrations and it's been pretty simple with significant cost savings for the customer. The scale part of this is hard to answer because it really depends on the workload.

Hey Sam! Congrats on the launch!

Thank you Gavin! I hope you are well.
Post reply on HN