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

Installing PostgreSQL in FreeBSD jail

To install and run PostgreSQL in FreeBSD jail you’ll need to enable allow.sysvipc system tuneable on that specific jail: List jails: jls Note jail ID and use following command to enable it for that running jail: jail -m jid=JAILID allow.sysvipc=1 This can also be accomplished by changing ezjail jail configuration file /usr/local/etc/ezjail/JAILNAME, ensure it contains: export jail_JAILNAME_parameters="allow.sysvipc=1" Install appropriate version of PostgreSQL. There are many different versions but I’ll use 9....

February 19, 2017 · 1 min · Ivan Tomica