A lot of stolon errors in db

We get a lot of random stolon logs on our db, and was wondering if this is a problem or can be safely ignored.

lax [info]checking stolon status
lax [info]keeper is healthy, db is healthy, role: master
lax [info]configuring operator
lax [info]error configuring operator user: can't scan into dest[3]: cannot scan null into *string

Getting this as well, are these safe to ignore?

Digging into it, this is coming from admin.ListUsers in fly’s postgres-ha repository.

This error is due to one of the users in your database not having a password set!

Here’s how to fix it using psql:

  1. Connect to your DB with psql
  2. Run the query below. This is straight from the ha-postgres repo, the exact same query ha-postgres runs!
select u.usename,
		usesuper as superuser,
		userepl as repluser,
		a.rolpassword as passwordhash,
		select array_agg(d.datname::text order by d.datname)
			from pg_database d
				WHERE datistemplate = false
				AND has_database_privilege(u.usename, d.datname, 'CONNECT')
	) as 
		pg_user u join pg_authid a on u.usesysid = a.oid 
	order by u.usename;
  1. Check which of the users does not have a passwordhash set.
  2. Give that user a password by entering \password <username of the user missing a password>
  3. Important! Restart your database fly.io app. I had to restart mine for the changes to be picked up.

Wow, good catch.

1 Like