ads' corner

warning: btree:/var/lib/postfix/smtp_scache is unavailable. unsupported dictionary type: btree

Upgraded a server, and along the way the Postfix version was also upgraded. Suddenly there is a warning in the logfile: 'warning: btree:/var/lib/postfix/smtp_scache is unavailable. unsupported dictionary type: btree'. Turns out that is easy to fix.

Obsidian Meeting template with time adjustment

My previously used meeting template for Obsidian used the current date and time for the filename. I rarely start Obsidian right when the meeting starts, usually I'm early and prepare the meeting. This results in filenames like '2024-08-02 13:52 important meeting'. I want this aligned to when the meeting starts, '2024-08-02 14:00 important meeting'.

Avoid empty linebreaks in Daily Notes Lists in Obsidian

In my Daily Notes in ObsidianMD I want to add entries on certain weekdays. However this added empty lines in-between. Figuring out what is going on in the Template takes some time and effort.

Ansible Handler: respond to multiple different Notifications simultaneously

Ansible has a concept of handlers, which run at the end of a Playbook, when something changed. In certain situations it might be desired or necessary to have a handler listen to more than one signal name. In my example: I'm updating the Samba configuration, and before restarting smbd or nmbd I want to check the configuration. This configuration check handler must listen to both restart signals.

Understanding VACUUM, VACUUM template0, and Transaction ID Wraparound

PostgreSQL uses Multi-Version Concurrency Control (MVCC) to manage concurrent access to the database, and store each version of a tuple in a table. To keep the database efficient, PostgreSQL employs a cleanup process called VACUUM, which removes unnecessary tuples. This not only saves disk space and keeps the database size under control, it also prevents the dreaded 'Transaction ID Wraparound' issue. Regularly running VACUUM is crucial, including on the template0 database, which is normally handled by the Autovacuum daemon. However, sometimes manual intervention is necessary.

Daily Notes in Obsidian

Obsidian is a note-taking software and knowledge base software, where the notes/files are written in Markdown. For quite a while I'm using it in my daily work. One of the cool features it has is named 'Daily Notes'.

Use namespace as global variable in Ansible Jinja templates

A simple task, or so I thought: in a Jinja template keep track of the number of items in a loop. And then use that count afterwards.

Disclaimer: the number of items is not equal the number of times the loop runs, so I can’t use the loop variables.

Turns out that Jinja has other opinions, and variables inside a loop are all local. When a variable is changed inside the loop, the scope of the variable stays local, and once the loop ends the original value of the variable is restored. That’s even true for variables which are created outside the loop.


Public previews in Hugo

Hugo is a static templating system. It is (mainly) used to deploy websites/blogs which don’t have and need dynamic content. The content of all pages is pre-generated, and the webserver delivers files from disk (or rather from cache, once files are loaded into memory). This approach allows for extremely fast websites, as no dynamic content is generated on every request.

While I know Hugo from work, I haven’t really used it for private projects - until recently. I have started a new project where I present interviews with people behind the PostgreSQL Project - and this is perfect for a static website. Interviews don’t change, once published.