From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Zhaoxun Yan <yan(dot)zhaoxun(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ron <ronljohnsonjr(at)gmail(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Why does pg_rewind deny permission for pg_read_binary_file() other than 'dbname=postgres'? |
Date: | 2023-10-13 07:04:02 |
Message-ID: | CAKFQuwa_KjSwVoDfsRLVb320aMVkx3CynsW8dwxLoyrVWNGW7Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thursday, October 12, 2023, Zhaoxun Yan <yan(dot)zhaoxun(at)gmail(dot)com> wrote:
>
>
> 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 required
>
> Still, 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar | 2023-10-13 08:51:25 | Re: Automation |
Previous Message | Zhaoxun Yan | 2023-10-13 06:40:03 | Re: Fwd: Why does pg_rewind deny permission for pg_read_binary_file() other than 'dbname=postgres'? |