CatOps
5.08K subscribers
94 photos
5 videos
19 files
2.58K links
DevOps and other issues by Yurii Rochniak (@grem1in) - SRE @ Preply && Maksym Vlasov (@MaxymVlasov) - Engineer @ Star. Opinions on our own.

We do not post ads including event announcements. Please, do not bother us with such requests!
Download Telegram
Тем временем зарелизился PostgreSQL 10!

C чем DBA-ев и поздравляем

Ну и чтобы не оставлять эту новость совсем уж постной, добавлю старую, как копыто мамонта, статью о миграции Яндекс Почты на PostgreSQL

#postgresql
Оч прикольная статья от DataDog о том, как мониторить PostgreSQL:
https://www.datadoghq.com/blog/postgresql-monitoring/

Кратко описано, как PostgreSQL вообще записывает данные, на какие метрики стоит обращать внимание, и что они вообще значат. Тажке рассказали, какие выводы можно сделать по каждой из метрик и что предпринять в тех или иных ситуациях

#postgresql #database
Во вчерашней статье про PostgreSQL проскакивали такие штуки, как MVCC — multi-version concurrency control и VACUUM. Если в двух словах: вместо того, чтобы лочить строку, на которой применяется UPDATE или DELETE, мы сделаем её копию, которая будет видна только транзакции, которая её обновляет. Все текущие же транзакции (non update) будут видеть изначальный вариант строки. А вот когда UPDATE/ DELETE закончится, мы делаем новый вариант видымым для всех, а старый — наоборот. Для этого будем использовать MVCC. Старые dead_rows тоже надо как-то чистить и тут поможет VACUUM

Подробнее про эти два механизма изложено тут:
http://rhaas.blogspot.com/2017/12/mvcc-and-vacuum.html

И отдельно про VACUUM:
http://rhaas.blogspot.com/2018/01/the-state-of-vacuum.html

#postgresql #database
While Web Assembly aka WASM is getting momentum, we are going to see more and more “X in a browser” things.

So, today it’s Postgres Playground by Crunchy (the authours of a famous Postgres k8s operators).

This is more of a set of learning tutorials than a freeplay sandbox. So, you can get yourself familiar with Postgres and learn various things about it there. Currently available tutorials are for:

- Basics of psql
- Partitioning
- Performance analysis
- Joins
- Indexing
- PostGIS
- Window functions and CTEs

#databases #postgresql #wasm
👍6🥰2
"Invert, always invert", - Friedrich Heinrich Jacobi, probably.

There is a ton of articles online on how to make your database faster, but how many articles are there about how to make your database slower?

Making Postgres 42,000x slower because I am unemployed is a fun read about how to almost grind Postgres to a halt by only tweaking the postgresql.conf. No specially crafted slow queries - only config.

As the result, the author managed to make his Postgres installation 42 000x times slower compared to the initial benchmarks. tl;dr: tinkering around with the number of IO operations (cache size, vacuum periods, WAL checkpoints) and making the IO single-threaded do the trick here.

#databases #postgresql
😁102🤯1