When connecting with any user but root, you always get this message:
Error: pq: user jeldess does not have SELECT privilege on table descriptor
Failed running "dump"
Only the root user has privileges for the system.descriptor table, so only the root user can run cockroach dump. Instead, I would expect any user to be able to dump a table, as long as that user has SELECT privileges on the database and table.
Example:
# Connect as user jseldess:
$ cockroach dump test dumptest --user=jeldess
Error: pq: user jeldess does not have SELECT privilege on table descriptor
Failed running "dump"
# Connect as user root (default):
$ cockroach dump test dumptest
CREATE TABLE dumptest (
a INT NOT NULL,
b DECIMAL(10) NULL,
CONSTRAINT "primary" PRIMARY KEY (a),
FAMILY "primary" (a, b)
);
INSERT INTO dumptest VALUES
(1, 1.1),
(2, 2.2),
(3, 3.3);
When connecting with any user but
root, you always get this message:Error: pq: user jeldess does not have SELECT privilege on table descriptor Failed running "dump"Only the
rootuser has privileges for thesystem.descriptortable, so only therootuser can runcockroach dump. Instead, I would expect any user to be able to dump a table, as long as that user hasSELECTprivileges on the database and table.Example: