til
til copied to clipboard
You only feel happy when you know what you doing
Surprising to me - Option 1: cautious people use transactions - Option 3: quick people use pg_dirtyread - Option 4: desperate people use full page writes https://www.cybertec-postgresql.com/en/recovering-deleted-data-from-postgresql-tables/
https://www.jackchristensen.com/
Generate UPDATE statement from CSV ``` > head user_items.csv | awk '{print "UPDATE user_items SET quantity = " $NF " WHERE user_id = " "\x27"$1"\x27" " AND item_id = "...
``` SELECT slot_name, pg_size_pretty( pg_wal_lsn_diff( pg_current_wal_lsn(), restart_lsn)) AS retained_wal, active, restart_lsn FROM pg_replication_slots WHERE slot_name LIKE 'gh_%'; slot_name | retained_wal | active | restart_lsn ----------------------------+--------------+--------+--------------- gh_v2_xxx_yyy_zz | 18 MB |...
`wal_compression (enum)` > This parameter enables compression of WAL using the specified compression method. When enabled, the PostgreSQL server compresses full page images written to WAL when [full_page_writes](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-FULL-PAGE-WRITES) is on...
**1. The problem** Observability is a critical aspect of any infrastructure, as it allows teams to identify and troubleshoot issues quickly. However, making a system observable is not without its...
Spot instances are sort of like cheap, same-day flights that become available due to last-minute cancellations or unsold inventory. Airlines often reduce prices significantly to fill these empty seats quickly,...
Có một kịch bản rất khó chịu khi deploy Prometheus (hoặc bất cứ dịch vụ gì) bằng Helm (hoặc một phương thức khác) trên k8s như sau: - Sửa `values.yaml`...
**Scrape interval** : It defines the interval based on which prometheus scrapes a monitored target. It is defined globally but can also be overridden at job level. Defaults to 1...
``` curl -XGET -G 'http://localhost:18080/api/v1/label/__name__/values' \ --data-urlencode 'match[]={__name__=~".+", job="kubernetes-pods"}' | tr "," "\n" ```