Plurrrr

Fri 29 Jul 2022

Uncompressing Folders in Swift

So imagine you need to get multiple files and folders from an API. One option for doing so is to get all the file names and request them from what ever file server you are using. This is terrible don't do this. The optimal way is to bundle the entire directory into a compressed format and distribute that one file. Okay great, say you needed these files in an iOS/iPadOS or MacOS application. That means you will need to decompress the files that you received in swift.

Source: Uncompressing Folders in Swift, an article by Quindarius Lyles-Woods.

Debugging Postgres autovacuum problems: 13 tips

If you’ve been running PostgreSQL for a while, you’ve heard about autovacuum. Yes, autovacuum, the thing which everybody asks you not to turn off, which is supposed to keep your database clean and reduce bloat automatically.

And yet—imagine this: one fine day, you see that your database size is larger than you expect, the I/O load on your database has increased, and things have slowed down without much change in workload. You begin looking into what might have happened. You run the excellent Postgres bloat query and you notice you have a lot of bloat. So you run the VACUUM command manually to clear the bloat in your Postgres database. Good!

But then you have to address the elephant in the room: why didn’t Postgres autovacuum clean up the bloat in the first place…? Does the above story sound familiar? Well, you are not alone. 😊

Source: Debugging Postgres autovacuum problems: 13 tips, an article by Samay Sharma.