Now pg_rewind has no problem when user=rewinder & dbname=repmgr:
$ pg_rewind -D /pgdata --source-server='host=172.17.1.2 port=5432 user=rewinder dbname=repmgr connect_timeout=5'
pg_rewind: source and target cluster are on the same timeline
pg_rewind: no rewind requiredStill, I wish psql can specify this database limitation explicitly, either enforcing the command with 'IN DATABASE [dbname]', or emphasize it in feedback rather than a simple 'GRANT'.
Please no. All objects only exist in a single database and you must be signed into a database to execute SQL, and you cannot execute cross-database. Specifying “in database” would just be annoying and redundant. Same goes with a message saying “you executed this command in database postgres.” Especially for grant, where the worst that happens is you still can’t do something you thought you enabled.
David J.