Another case.
If you have pgbouncer and routing is configured via the DB name db_master/db_slave, then in Laravel 9 and 10 you will catch the same error.
This is because the condition \vendor\laravel\framework\src\Illuminate\Database\Schema\Grammars\PostgresGrammar.php lines 76 and 86
table_catalog = ?
When building or deploying the application, you need to patch this file and remove this condition.
This was fixed in Laravel 11.