Category Archives: Other

Just a Tree

Trying some inline processing.js.

Make PostgreSQL default to UTF-8

From here :

UPDATE pg_database SET datistemplate=FALSE WHERE datname='template1';

DROP DATABASE template1;

CREATE DATABASE template1 WITH owner=postgres template=template0 encoding='UTF8';

UPDATE pg_database SET datistemplate=TRUE WHERE datname='template1';

I placed an iPhone screen down on my Nexus 4. The Nexus got confused, took a picture, then rebooted to contemplate what had just happened.

How to fix BIND’s journal out of sync error

This is a note for my future reference.

Example error:

zone journal rollforward failed: journal out of sync with zone
zone not loaded due to errors.

While named isn’t running, remove the .jnl file for the zone. It will be in the same directory as the zone files. Restart named and the error should be gone.

This error occurs if you have dynamic entries (say pushed by in by a DHCP server or other automatic mechanism) in a zone and then also change the zone files on disk (say deploying updates from a manual edit).

To prevent this in the future, freeze a zone before changing the zone file, then thaw after.

rndc freeze
vi /path/to/zonefile/
rndc reload
rndc thaw

Where I learned about this: