PostgreSQL online VACUUM with pg_repack

Those familiar with PostgreSQL know how it internally manages blocks for storing data and how when you delete some entry it is only marked dead (dead tuples). In order to reclaim space VACUUM needs to be run. Vacuuming database won’t give that space back to the operating system, instead, it will just reclaim it for further use. If you specify VACUUM FULL in that case PostgreSQL will return free space back to the operating system, but running such action requires locking the tables which depending on the database size and the time it takes might not be optimal solution to run anytime....

June 9, 2019 · 1 min · Ivan Tomica

Gitlab Patch upgrades

I’ve been hosting my Gitlab instance for some time now. Gives me the freedom of experimenting with various features and also forces me to learn a thing or two about it. Install I currently have has been done via installation from source. Reason for that was that Omnibus package has certain things in which would break other components on that system. So long story short, the main issue I had with it was upgrading it to latest patch release....

May 5, 2019 · 3 min · Ivan Tomica

Apache: No space left on device

When apache reports no space left on device: couldn't create accept lock and you’ve checked both disk space and inode usage of disk and they both report as fine check active semaphores: ipcs -s If there’s high number of them, Apache probably hasn’t cleared up after itself and some semaphores are stuck. Clear them out with: for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done If you’re completely out of semaphores (some other apps using maximum number) you may consider tweaking kernel limits in sysctl....

April 12, 2019 · 1 min · Ivan Tomica

Launching Flatpak applications from command line

Recently I started experimenting with Flatpak. Mainly trying to use it for day-to-day apps like Slack or Skype. Flatpak applications are usually started by launching: flatpak run com.skype.Client You can see that this can quickly get pretty messy. Flatpak does provide the “.desktop” file for each of the application, and if you’re using desktop environment conforming to those standards, application will be listed in your application menu. If you’re on the other hand not using such environment, and like me, use some random WM or just prefer launching applications via command line we can make this a bit easier....

April 10, 2019 · 1 min · Ivan Tomica

Reboot with kexec on Ubuntu 18.04

First off, what is kexec? - It is a system call that enables you to load and boot into another kernel from currently running kernel. That effectively means; doing reboot without going through the whole POST/Firmware load process. To use kexec we can rely on systemd to handle process for us. The only work we need to do is to install kexec-tools package and adjust some configs sudo apt-get update sudo apt-get install kexec-tools Since Ubuntu usually relies on booting from grub we can tweak some settings to default to loading default grub kernel when we run kexec....

March 16, 2019 · 2 min · Ivan Tomica

Remove EFI grub timeout

Ever since I’ve set up EFI boot on my machine using grub I had this issue with timeout option not wanting to go away. Digging into the issue I first looked at /boot/grub/grub.cfg where I found this piece of code: if [ $grub_platform = efi ]; then set timeout=30 if [ x$feature_timeout_style = xy ] ; then set timeout_style=menu fi fi “This is weird” I said to myself, where does that come from?...

February 16, 2019 · 1 min · Ivan Tomica

Moving Ubuntu to Root-on-ZFS

My main rig is running Ubuntu 18.04. To be more precise I opted out at install time to use Ubuntu Mate 18.04 but later on installed AwesomeWM and use that instead now. But without digressing much, I decided it was time to move my root (/) to ZFS. Why? - Because it is awesome! ZFS is my favorite FS of choice for some time now. I don’t use it everywhere (am trying to be smart about it) but I prefer to do whenever I have the chance....

February 1, 2019 · 5 min · Ivan Tomica

Atlassian Confluence in Docker

Recently I’ve been tasked to set up Confluence server installation. One of my friends was in need and I decided it would be nice to play a bit with the whole setup. As this is pro-bono and really not quite production install (meaning they use it, but it is not so downtime critical) there was a place to experiment with it a bit thus I decided to run Confluence in a Docker....

January 29, 2019 · 2 min · Ivan Tomica

Fixing URxvt copy/paste

URxvt, or if you wish to call it rxvt-unicode, has this weird thing turned on by default where it binds ctrl+shift keys to all sorts of insanity (keycap picture insert mode and stuff like that). Dammit, I want my “normal” terminal behavior back! By “normal” I think that if I press: Ctrl + Shift + V -> paste contents of my main clipboard (from X) Ctrl + Shift + C -> copy current selection to clipboard So to restore that functionality here’s the magic thing you need in your ....

January 23, 2019 · 1 min · Ivan Tomica

Weechat IRC client with ZNC

Although I don’t use IRC as much as I used to do I still have ZNC set up to connect and keep me joined in channels. As Weechat is my preferred IRC client here are the settings I use to connect my accounts to the ZNC bouncer. /secure passphrase WEECHAT_PASSWORD /secure set znc_password YOUR_ZNC_PASSWORD /set irc.server_default.nicks NICKNAME /server add freenode YOUR_ZNC_ADDRESS/6697 -ssl -autoconnect /set YOUR_USERNAME@CLIENT_NAME/freenode:${sec.data.znc_password} Here’s further explanations of some variables I’ve mentioned above:...

December 28, 2018 · 1 min · Ivan Tomica