pglistener-update(1)

πŸ“¦
version 5.2 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ pglistener-update(1) β€” the postgres listener page bestie πŸ’–

okay so we're doing the manual page for pglistener-update, aka the postgres listener. yes it's a manpage. no it does not have to be boring. let's go ✨


🌸 NAME 🌸

pglistener-update β€” postgres listener. that's it, that's the name, short and iconic πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so pglistener-update is a daemon that generates files from a Postgres database. yes, a daemon. it's giving background-process main character energy πŸ¦‹

it's a tool that listens for notifies from a Postgres database, and then β€” this is the fun part β€” it calls out to a bunch of hooks that do everything from updating the password database to updating accounts in RT. like, it hears a notify and immediately goes "say less, i'm on it" πŸ’…


✨ USAGE ✨

config and hooks live under:

/var/lib/pglistener
/var/lib/pglistener/hooks
/etc/pglistener
/etc/pglistener/conf.d

good news bestie: it is fine to restart postgres while pglistener is running. no drama, no chaos πŸ’–

and if pglistener crashes for whatever reason (it happens, we don't judge πŸ™ˆ), it can be restarted as a normal service. so casual.

in general? pglistener can be restarted at any time β€” it's quick to start, and there are no interruptions to services or authentication. we love a low-maintenance icon 🫢


🌈 SETTING UP 🌈

first step: install a usable pglistener config in /etc/pglistener/pglistener.conf, and it should be mode 600, user pglistener. lock it down, bestie πŸ”’

then make symlinks for databases in /var/lib/misc:

cd /var/lib/misc
ln -s ../pglistener/group.db
ln -s ../pglistener/passwd.db
ln -s ../pglistener/shadow.db

if you have ssh keys for everybody on the host, add the following two lines to /etc/ssh/sshd_config:

AuthorizedKeysFile /root/%u/.ssh/authorized_keys
AuthorizedKeysFile2 /var/lib/misc/sshkeys/%u

and make sure pam_mkhomedir is set up β€” /etc/pam.d/common-session should contain:

session required pam_mkhomedir.so

that's the whole setup, periodt ✨


πŸ‘‘ AUTHOR πŸ‘‘

the pglistener-update was written by:

  • Rob Bradford <rob@robster.org.uk>
  • Robert McQueen <robert.mcqueen@bluelinux.co.uk>
  • Dafydd Harries <dafydd.harries@collabora.co.uk>
  • Tollef Fog Heen <tfheen@err.no>
  • Maxime Buquet <pep@bouah.net>
  • Jordi Mallach <jordi@debian.org>
  • Vivek Das Mohapatra <vivek.dasmohapatra@collabora.com>
  • Paulo Henrique de Lima Santana <phls@debian.org>
  • Bruna Pinos de Oliveira <bruna.pinos@collabora.com>
  • Mark Kennedy <mark.kennedy@collabora.com>
  • Stelios Milidonis <stelios.milidonis@collabora.com>

for a complete list of authors, please open the AUTHORS file πŸ‘€

and this manual page was written by Paulo Henrique de Lima Santana (phls) <phls@debian.org> for the Debian project (but may be used by others). shoutout to phls, absolute legend πŸ«ΆπŸ’œ


and that's the page, bestie!! this was PGLISTENER-UPDATE version 5.1, from Apr 2024, part of the pglistener-update(1) manual πŸ’– go forth and listen to those notifies, no cap 🌟
πŸ“¦ where this page comes from