Skip to content

Instantly share code, notes, and snippets.

View Routhinator's full-sized avatar

Chris Routh Routhinator

View GitHub Profile
@Routhinator
Routhinator / postgres_recovery.md
Created November 16, 2022 05:52 — forked from supix/postgres_recovery.md
Postgres error: Missing chunk 0 for toast value in pg_toast

The problem

In some cases, it is possible that PostgreSQL tables get corrupted. This can happen in case of hardware failures (e.g. hard disk drives with write-back cache enabled, RAID controllers with faulty/worn out battery backup, etc.), as clearly reported in this wiki page. Furthermore, it can happen in case of incorrect setup, as well.

One of the symptoms of such corruptions is the following message:

ERROR: missing chunk number 0 for toast value 123456 in pg_toast_45678

This almost surely indicates that a corrupted chunk is present within a table file. But there is a good way to get rid of it.

@Routhinator
Routhinator / ssh_kde.md
Created August 15, 2024 23:14 — forked from martin-sicho/ssh_kde.md
Quick Guide to Add SSH Keys Automatically on Startup in KDE

Quick Guide to Add SSH Keys Automatically on Startup in KDE

This always takes me a while to figure out when installing a new system so here is a foolproof guide to do this right once and for all. Kudos to all the people in this Manjaro thread. However, this should work on any system with KDE and systemd.

Step 1

Make sure to install required packages:

sudo pacman -Syu --needed kwallet5 ksshaskpass kwalletmanager kwallet-pam signon-kwallet-extension