Install newer (or latest) PostgreSQL on TurnKey

PostgreSQL logo

TurnKey Hub user Vishal recently asked about installing PostgreSQL v14+ on TurnKey. He noted that he was interested in Postgres 14 or higher because of the new IVM extension (incrementally updating materialized views). I started answering his support request, but then thought I might as well post this on the blog as perhaps it provides value for others?!

Firstly, some context and background...

Convert a PostgreSQL database from LATIN1 to UTF-8

When we initially launched the Hub in private beta, we made the mistake of not specifying UTF-8 encoding in the database cluster, which had the unfortunate side effect of raising an exception every time a user would submit non-ascii characters in an input field.