.. title: Error: Assertion failed for PostgreSQL Cluster
.. slug: 21-Error-Assertion-failed-for-PostgreSQL-Cluster
.. date: Mon, 11 Jan 2021 13:37:22 +0100
.. category: 
.. tags: Technik
.. link: 
.. description: 
.. type: text

If you ever encounter this error message ::

	Assertion failed for PostgreSQL Cluster cluster-name

or ::

	Assertion failed on job for postgresql@11-cluster-name.service

after creating a cluster of the name "cluster-name" it might be because somewhere the hyphen is considered invalid. Just ::

	pg_dropcluster <version> cluster-name
	pg_createcluster <version> clustername

to drop and re-create the cluster without hyphen.

I created this blog entry because I could not find any reference to this specific error with this specific reason. It might be some Debian specific error as PostgreSQLs initdb command is wrapped by pg_createcluster which again isn't mentioned by PostgreSQL. Searching the web shows mostly results in context of Ubuntu and Debian.

 
