agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feed[PATCH v48 6/7] Error out any process that would block at REPACK
554+ messages / 3 participants
[nested] [flat]
* [PATCH v48 6/7] Error out any process that would block at REPACK
@ 2026-03-25 19:35 Álvaro Herrera <alvherre@kurilemu.de>
0 siblings, 0 replies; 554+ messages in thread
From: Álvaro Herrera @ 2026-03-25 19:35 UTC (permalink / raw)
Any process waiting on REPACK to release its lock would actually cause
it to deadlock when it tries to upgrade its lock to AEL, losing all work
done to that point. We avoid this by teaching the deadlock detector to
raise an error when this condition is detected.
---
src/backend/commands/repack.c | 52 ++++++++----
src/backend/storage/lmgr/deadlock.c | 15 ++++
src/include/storage/proc.h | 6 +-
src/test/modules/injection_points/Makefile | 1 +
.../expected/repack_deadlock.out | 63 ++++++++++++++
src/test/modules/injection_points/meson.build | 1 +
.../specs/repack_deadlock.spec | 83 +++++++++++++++++++
7 files changed, 202 insertions(+), 19 deletions(-)
create mode 100644 src/test/modules/injection_points/expected/repack_deadlock.out
create mode 100644 src/test/modules/injection_points/specs/repack_deadlock.spec
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index a514053b777..781a471fc1d 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -276,6 +276,16 @@ ExecRepack(ParseState *pstate, RepackStmt *stmt, bool isTopLevel)
/* Determine the lock mode to use. */
lockmode = RepackLockLevel((params.options & CLUOPT_CONCURRENT) != 0);
+ /*
+ * If in concurrent mode, set the PROC_IN_CONCURRENT_REPACK flag. This
+ * makes the deadlock checker cause anyone that would conflict with us to
+ * error out. It's important to set this flag ahead of actually locking
+ * the relation; it won't of course affect anyone until we do have a lock
+ * that others can conflict with.
+ */
+ if ((params.options & CLUOPT_CONCURRENT) != 0)
+ MyProc->statusFlags |= PROC_IN_CONCURRENT_REPACK;
+
/*
* If a single relation is specified, process it and we're done ... unless
* the relation is a partitioned table, in which case we fall through.
@@ -476,11 +486,8 @@ RepackLockLevel(bool concurrent)
* If indexOid is InvalidOid, the table will be rewritten in physical order
* instead of index order.
*
- * Note that, in the concurrent case, the function releases the lock at some
- * point, in order to get AccessExclusiveLock for the final steps (i.e. to
- * swap the relation files). To make things simpler, the caller should expect
- * OldHeap to be closed on return, regardless CLUOPT_CONCURRENT. (The
- * AccessExclusiveLock is kept till the end of the transaction.)
+ * On return, OldHeap is closed but locked with AccessExclusiveLock - the lock
+ * will be released at end of the transaction.
*
* 'cmd' indicates which command is being executed, to be used for error
* messages.
@@ -512,10 +519,12 @@ cluster_rel(RepackCommand cmd, Relation OldHeap, Oid indexOid,
/*
* Make sure we're not in a transaction block.
*
- * The reason is that repack_setup_logical_decoding() could deadlock
- * if there's an XID already assigned. It would be possible to run in
- * a transaction block if we had no XID, but this restriction is
- * simpler for users to understand and we don't lose anything.
+ * The reason is that repack_setup_logical_decoding() could wait
+ * indefinitely for our XID to complete. (The deadlock detector would
+ * not recognize it because we'd be waiting for ourselves, i.e. no
+ * real lock conflict.) It would be possible to run in a transaction
+ * block if we had no XID, but this restriction is simpler for users
+ * to understand and we don't lose anything.
*/
PreventInTransactionBlock(isTopLevel, "REPACK (CONCURRENTLY)");
@@ -998,10 +1007,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Note that the worker has to wait for all transactions with XID
* already assigned to finish. If some of those transactions is
* waiting for a lock conflicting with ShareUpdateExclusiveLock on our
- * table (e.g. it runs CREATE INDEX), we can end up in a deadlock.
- * Not sure this risk is worth unlocking/locking the table (and its
- * clustering index) and checking again if it's still eligible for
- * REPACK CONCURRENTLY.
+ * table (e.g. it runs CREATE INDEX), it should encounter ERROR in the
+ * deadlock checking code.
*/
start_repack_decoding_worker(tableOid);
@@ -3090,7 +3097,16 @@ rebuild_relation_finish_concurrent(Relation NewHeap, Relation OldHeap,
LockRelationOid(OldHeap->rd_rel->reltoastrelid, AccessExclusiveLock);
/*
- * Tuples and pages of the old heap will be gone, but the heap will stay.
+ * Now that we have all access-exclusive locks on all relations, we no
+ * longer want other processes to error out when trying to acquire a
+ * conflicting lock. Therefore, unset our flag.
+ */
+ MyProc->statusFlags &= ~PROC_IN_CONCURRENT_REPACK;
+
+ /*
+ * Tuples and pages of the old heap will be gone, but the heap itself will
+ * stay. In order for predicate locks to continue to work, convert them
+ * to relation-level locks. We do this both for table and indexes.
*/
TransferPredicateLocksToHeapRelation(OldHeap);
foreach_ptr(RelationData, index, indexrels)
@@ -3288,9 +3304,11 @@ start_repack_decoding_worker(Oid relid)
/*
* The decoding setup must be done before the caller can have XID assigned
- * for any reason, otherwise the worker might end up in a deadlock,
- * waiting for the caller's transaction to end. Therefore wait here until
- * the worker indicates that it has the logical decoding initialized.
+ * for any reason, otherwise the worker might end up waiting for the
+ * caller's transaction to end. (Deadlock detector does not consider this
+ * a conflict because the worker is in the same locking group as the
+ * backend that launched it.) Therefore wait here until the worker
+ * indicates that it has the logical decoding initialized.
*/
ConditionVariablePrepareToSleep(&shared->cv);
for (;;)
diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c
index b8962d875b6..c20ac682b0d 100644
--- a/src/backend/storage/lmgr/deadlock.c
+++ b/src/backend/storage/lmgr/deadlock.c
@@ -620,6 +620,21 @@ FindLockCycleRecurseMember(PGPROC *checkProc,
proc->statusFlags & PROC_IS_AUTOVACUUM)
blocking_autovacuum_proc = proc;
+ /*
+ * Similarly, if we note that we're blocked by some
+ * process running REPACK (CONCURRENTLY), just fail. That
+ * process is going to upgrade its lock at some point, and
+ * it would be inappropriate for any other process to
+ * cause that to fail.
+ */
+ if (checkProc == MyProc &&
+ proc->statusFlags & PROC_IN_CONCURRENT_REPACK)
+ ereport(ERROR,
+ errcode(ERRCODE_OBJECT_IN_USE),
+ errmsg("could not wait for concurrent REPACK"),
+ errdetail("Process %d waits for REPACK running on process %d",
+ MyProc->pid, proc->pid));
+
/* We're done looking at this proclock */
break;
}
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index 1dad125706e..8ad9718f3d6 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -69,10 +69,12 @@ struct XidCache
#define PROC_AFFECTS_ALL_HORIZONS 0x20 /* this proc's xmin must be
* included in vacuum horizons
* in all databases */
+#define PROC_IN_CONCURRENT_REPACK 0x40 /* REPACK (CONCURRENTLY) */
-/* flags reset at EOXact */
+/* flags reset at EOXact. A bit of a misnomer ... */
#define PROC_VACUUM_STATE_MASK \
- (PROC_IN_VACUUM | PROC_IN_SAFE_IC | PROC_VACUUM_FOR_WRAPAROUND)
+ (PROC_IN_VACUUM | PROC_IN_SAFE_IC | PROC_VACUUM_FOR_WRAPAROUND | \
+ PROC_IN_CONCURRENT_REPACK)
/*
* Xmin-related flags. Make sure any flags that affect how the process' Xmin
diff --git a/src/test/modules/injection_points/Makefile b/src/test/modules/injection_points/Makefile
index 2cd7d87c533..f7663859fe2 100644
--- a/src/test/modules/injection_points/Makefile
+++ b/src/test/modules/injection_points/Makefile
@@ -15,6 +15,7 @@ REGRESS_OPTS = --dlpath=$(top_builddir)/src/test/regress
ISOLATION = basic \
inplace \
repack \
+ repack_deadlock \
repack_toast \
syscache-update-pruned \
heap_lock_update
diff --git a/src/test/modules/injection_points/expected/repack_deadlock.out b/src/test/modules/injection_points/expected/repack_deadlock.out
new file mode 100644
index 00000000000..a86e4767536
--- /dev/null
+++ b/src/test/modules/injection_points/expected/repack_deadlock.out
@@ -0,0 +1,63 @@
+Parsed test spec with 2 sessions
+
+starting permutation: wait_before_lock add_column wakeup_before_lock check1
+injection_points_attach
+-----------------------
+
+(1 row)
+
+step wait_before_lock:
+ REPACK (CONCURRENTLY) repack_deadlock USING INDEX repack_deadlock_pkey;
+ <waiting ...>
+step add_column:
+ alter table repack_deadlock add column noise text;
+ <waiting ...>
+step add_column: <... completed>
+ERROR: could not wait for concurrent REPACK
+step wakeup_before_lock:
+ SELECT injection_points_wakeup('repack-concurrently-before-lock');
+
+injection_points_wakeup
+-----------------------
+
+(1 row)
+
+step wait_before_lock: <... completed>
+step check1:
+ INSERT INTO relfilenodes(node)
+ SELECT relfilenode FROM pg_class WHERE relname='repack_deadlock';
+
+ SELECT count(DISTINCT node) FROM relfilenodes;
+
+ SELECT i, j FROM repack_deadlock ORDER BY i, j;
+
+ INSERT INTO data_s1(i, j)
+ SELECT i, j FROM repack_deadlock;
+
+ SELECT count(*)
+ FROM data_s1 d1 FULL JOIN data_s2 d2 USING (i, j)
+ WHERE d1.i ISNULL OR d2.i ISNULL;
+
+count
+-----
+ 1
+(1 row)
+
+i|j
+-+-
+1|1
+2|2
+3|3
+4|4
+(4 rows)
+
+count
+-----
+ 4
+(1 row)
+
+injection_points_detach
+-----------------------
+
+(1 row)
+
diff --git a/src/test/modules/injection_points/meson.build b/src/test/modules/injection_points/meson.build
index a414abb924b..1cd88d6db65 100644
--- a/src/test/modules/injection_points/meson.build
+++ b/src/test/modules/injection_points/meson.build
@@ -46,6 +46,7 @@ tests += {
'basic',
'inplace',
'repack',
+ 'repack_deadlock',
'repack_toast',
'syscache-update-pruned',
'heap_lock_update',
diff --git a/src/test/modules/injection_points/specs/repack_deadlock.spec b/src/test/modules/injection_points/specs/repack_deadlock.spec
new file mode 100644
index 00000000000..9d23a6588c2
--- /dev/null
+++ b/src/test/modules/injection_points/specs/repack_deadlock.spec
@@ -0,0 +1,83 @@
+# Test REPACK with a concurrent transaction that would cause a deadlock
+setup
+{
+ CREATE EXTENSION injection_points;
+
+ CREATE TABLE repack_deadlock(i int PRIMARY KEY, j int);
+ INSERT INTO repack_deadlock(i, j) VALUES (1, 1), (2, 2), (3, 3), (4, 4);
+
+ CREATE TABLE relfilenodes(node oid);
+
+ CREATE TABLE data_s1(i int, j int);
+ CREATE TABLE data_s2(i int, j int);
+}
+
+teardown
+{
+ DROP TABLE repack_deadlock;
+ DROP EXTENSION injection_points;
+
+ DROP TABLE relfilenodes;
+ DROP TABLE data_s1;
+ DROP TABLE data_s2;
+}
+
+session s1
+setup
+{
+ SELECT injection_points_set_local();
+ SELECT injection_points_attach('repack-concurrently-before-lock', 'wait');
+}
+# Perform the initial load and wait for s2 to do some data changes.
+step wait_before_lock
+{
+ REPACK (CONCURRENTLY) repack_deadlock USING INDEX repack_deadlock_pkey;
+}
+# Check the table from the perspective of s1.
+#
+# Besides the contents, we also check that relfilenode has changed.
+
+# Have each session write the contents into a table and use FULL JOIN to check
+# if the outputs are identical.
+step check1
+{
+ INSERT INTO relfilenodes(node)
+ SELECT relfilenode FROM pg_class WHERE relname='repack_deadlock';
+
+ SELECT count(DISTINCT node) FROM relfilenodes;
+
+ SELECT i, j FROM repack_deadlock ORDER BY i, j;
+
+ INSERT INTO data_s1(i, j)
+ SELECT i, j FROM repack_deadlock;
+
+ SELECT count(*)
+ FROM data_s1 d1 FULL JOIN data_s2 d2 USING (i, j)
+ WHERE d1.i ISNULL OR d2.i ISNULL;
+}
+teardown
+{
+ SELECT injection_points_detach('repack-concurrently-before-lock');
+}
+
+session s2
+# Change the existing data. UPDATE changes both key and non-key columns. Also
+# update one row twice to test whether tuple version generated by this session
+# can be found.
+step add_column
+{
+ alter table repack_deadlock add column noise text;
+}
+
+step wakeup_before_lock
+{
+ SELECT injection_points_wakeup('repack-concurrently-before-lock');
+}
+
+# Test if data changes introduced while one session is performing REPACK
+# CONCURRENTLY find their way into the table.
+permutation
+ wait_before_lock
+ add_column
+ wakeup_before_lock
+ check1
--
2.47.3
--qfkt2ktdpcfeypib
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v48-0007-Teach-snapshot-builder-to-skip-transactions-runn.patch"
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v1] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allowed members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
src/bin/psql/describe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--bukXArRbhiisqidC--
^ permalink raw reply [nested|flat] 554+ messages in thread
* [PATCH v2] Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:16 Christoph Berg <myon@debian.org>
0 siblings, 0 replies; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:16 UTC (permalink / raw)
The server already allows members of pg_read_all_stats to see the size
of all databases, but psql's \l+ was too restrictive.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..4d5ee11ddd9 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Except for superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role, size information is only
+ available for databases that the current user can connect to.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.53.0
--GvhE+GC2PI361jLV--
^ permalink raw reply [nested|flat] 554+ messages in thread
* Allow pg_read_all_stats to see database size in \l+
@ 2026-07-22 11:26 Christoph Berg <myon@debian.org>
2026-07-22 12:34 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
0 siblings, 1 reply; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 11:26 UTC (permalink / raw)
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; +Cc: Zsolt Parragi <zsolt.parragi@percona.com>
psql \l+ didn't consider pg_read_all_stats when determining whether
the user was allowed to see the database size.
Split off from the "Available disk space per tablespace" patch since
it's really an independent fix. Thanks Zsolt for pointing that out.
This might be considered for backpatching.
Christoph
^ permalink raw reply [nested|flat] 554+ messages in thread
* Re: Allow pg_read_all_stats to see database size in \l+
2026-07-22 11:26 Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
@ 2026-07-22 12:34 ` Fujii Masao <masao.fujii@gmail.com>
2026-07-22 13:12 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
0 siblings, 1 reply; 554+ messages in thread
From: Fujii Masao @ 2026-07-22 12:34 UTC (permalink / raw)
To: Christoph Berg <myon@debian.org>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Zsolt Parragi <zsolt.parragi@percona.com>
On Wed, Jul 22, 2026 at 8:26 PM Christoph Berg <myon@debian.org> wrote:
>
> psql \l+ didn't consider pg_read_all_stats when determining whether
> the user was allowed to see the database size.
+1 to this fix.
> Split off from the "Available disk space per tablespace" patch since
> it's really an independent fix. Thanks Zsolt for pointing that out.
>
> This might be considered for backpatching.
The pg_read_all_stats check should be fine in master, since psql there
no longer supports pre-v10 servers, which don't have that role. But,
if this is backpatched, psql still needs to work with pre-v10 servers,
so we'll probably need a server version check (e.g., pset.sversion >= 100000)
before checking for pg_read_all_stats, at least in the older stable branches.
Also, should the following description of the \l+ meta-command in
the psql docs be updated?
(Size information is only available for databases that the current
user can connect to.)
Regards,
--
Fujii Masao
^ permalink raw reply [nested|flat] 554+ messages in thread
* Re: Allow pg_read_all_stats to see database size in \l+
2026-07-22 11:26 Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 12:34 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
@ 2026-07-22 13:12 ` Christoph Berg <myon@debian.org>
2026-07-22 14:38 ` Re: Allow pg_read_all_stats to see database size in \l+ Álvaro Herrera <alvherre@kurilemu.de>
0 siblings, 1 reply; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 13:12 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Zsolt Parragi <zsolt.parragi@percona.com>
Thanks for the review!
Re: Fujii Masao
> The pg_read_all_stats check should be fine in master, since psql there
> no longer supports pre-v10 servers, which don't have that role. But,
> if this is backpatched, psql still needs to work with pre-v10 servers,
> so we'll probably need a server version check (e.g., pset.sversion >= 100000)
> before checking for pg_read_all_stats, at least in the older stable branches.
The SQL-generating code there is already quite complex, and since no
one complained, perhaps just skip the backpatching if it's complicated.
I tried the patch back to version 9.3 and the query still works even
when the role doesn't exist there. (9.2 and earlier failed due to the
protocol version grease.)
> Also, should the following description of the \l+ meta-command in
> the psql docs be updated?
>
> (Size information is only available for databases that the current
> user can connect to.)
Done in v2.
Christoph
^ permalink raw reply [nested|flat] 554+ messages in thread
* Re: Allow pg_read_all_stats to see database size in \l+
2026-07-22 11:26 Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 12:34 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
2026-07-22 13:12 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
@ 2026-07-22 14:38 ` Álvaro Herrera <alvherre@kurilemu.de>
2026-07-22 14:52 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
0 siblings, 1 reply; 554+ messages in thread
From: Álvaro Herrera @ 2026-07-22 14:38 UTC (permalink / raw)
To: Christoph Berg <myon@debian.org>; +Cc: Fujii Masao <masao.fujii@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Zsolt Parragi <zsolt.parragi@percona.com>
On 2026-Jul-22, Christoph Berg wrote:
> Thanks for the review!
>
> Re: Fujii Masao
> > The pg_read_all_stats check should be fine in master, since psql there
> > no longer supports pre-v10 servers, which don't have that role. But,
> > if this is backpatched, psql still needs to work with pre-v10 servers,
> > so we'll probably need a server version check (e.g., pset.sversion >= 100000)
> > before checking for pg_read_all_stats, at least in the older stable branches.
>
> The SQL-generating code there is already quite complex, and since no
> one complained, perhaps just skip the backpatching if it's complicated.
I think it's simple enough:
@@ -1069,12 +1069,16 @@ listAllDbs(const char *pattern, bool verbose)
appendPQExpBufferStr(&buf, " ");
printACLColumn(&buf, "d.datacl");
if (verbose && pset.sversion >= 80200)
+ {
appendPQExpBuffer(&buf,
",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ " %s"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\"",
+ pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
gettext_noop("Size"));
+ }
if (verbose && pset.sversion >= 80000)
appendPQExpBuffer(&buf,
",\n t.spcname as \"%s\"",
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
^ permalink raw reply [nested|flat] 554+ messages in thread
* Re: Allow pg_read_all_stats to see database size in \l+
2026-07-22 11:26 Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 12:34 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
2026-07-22 13:12 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 14:38 ` Re: Allow pg_read_all_stats to see database size in \l+ Álvaro Herrera <alvherre@kurilemu.de>
@ 2026-07-22 14:52 ` Christoph Berg <myon@debian.org>
2026-07-23 09:44 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
0 siblings, 1 reply; 554+ messages in thread
From: Christoph Berg @ 2026-07-22 14:52 UTC (permalink / raw)
To: Álvaro Herrera <alvherre@kurilemu.de>; +Cc: Fujii Masao <masao.fujii@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Zsolt Parragi <zsolt.parragi@percona.com>
Re: Álvaro Herrera
> + pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
Should I create patch files for 14..19?
Christoph
^ permalink raw reply [nested|flat] 554+ messages in thread
* Re: Allow pg_read_all_stats to see database size in \l+
2026-07-22 11:26 Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 12:34 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
2026-07-22 13:12 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 14:38 ` Re: Allow pg_read_all_stats to see database size in \l+ Álvaro Herrera <alvherre@kurilemu.de>
2026-07-22 14:52 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
@ 2026-07-23 09:44 ` Fujii Masao <masao.fujii@gmail.com>
2026-07-23 10:44 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
0 siblings, 1 reply; 554+ messages in thread
From: Fujii Masao @ 2026-07-23 09:44 UTC (permalink / raw)
To: Christoph Berg <myon@debian.org>; +Cc: Álvaro Herrera <alvherre@kurilemu.de>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Zsolt Parragi <zsolt.parragi@percona.com>
On Wed, Jul 22, 2026 at 11:52 PM Christoph Berg <myon@debian.org> wrote:
>
> Re: Álvaro Herrera
> > + pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
>
> Should I create patch files for 14..19?
I've prepared patches for the older stable branches and attached them.
While doing so, I also updated the documentation changes.
Regards,
--
Fujii Masao
From 2e9ecd200233768eccafa273abbaf8f667922c0b Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Thu, 23 Jul 2026 17:39:43 +0900
Subject: [PATCH v3] psql: Allow pg_read_all_stats to see database size in \l+
pg_database_size() allows access to users who have either CONNECT
privilege on the target database or membership in the
pg_read_all_stats role. However, previously, psql's \l+ checked only for
CONNECT, so users with pg_read_all_stats still saw "No Access" for
databases they could not connect to.
Fix this by making \l+ also check
pg_has_role('pg_read_all_stats', 'USAGE'), matching
pg_database_size()'s permission rules.
For back branches, emit the pg_read_all_stats check only when
connected to PostgreSQL 10 or later, since earlier releases do not have
that predefined role.
Backpatch to all supported versions.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 7c05afd4719..6be4648d90e 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Size information is available for databases that the current user can
+ connect to, or to superusers and roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index af3935b0078..f258a33a808 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -1007,16 +1007,20 @@ listAllDbs(const char *pattern, bool verbose)
appendPQExpBufferStr(&buf, " ");
printACLColumn(&buf, "d.datacl");
if (verbose)
+ {
appendPQExpBuffer(&buf,
",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ " %s"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
",\n t.spcname as \"%s\""
",\n pg_catalog.shobj_description(d.oid, 'pg_database') as \"%s\"",
+ pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
gettext_noop("Size"),
gettext_noop("Tablespace"),
gettext_noop("Description"));
+ }
appendPQExpBufferStr(&buf,
"\nFROM pg_catalog.pg_database d\n");
if (verbose)
--
2.55.0
From 3abb56b17562e626bc18dc83818905e9dd84d50e Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Thu, 23 Jul 2026 17:39:43 +0900
Subject: [PATCH v3] psql: Allow pg_read_all_stats to see database size in \l+
pg_database_size() allows access to users who have either CONNECT
privilege on the target database or membership in the
pg_read_all_stats role. However, previously, psql's \l+ checked only for
CONNECT, so users with pg_read_all_stats still saw "No Access" for
databases they could not connect to.
Fix this by making \l+ also check
pg_has_role('pg_read_all_stats', 'USAGE'), matching
pg_database_size()'s permission rules.
For back branches, emit the pg_read_all_stats check only when
connected to PostgreSQL 10 or later, since earlier releases do not have
that predefined role.
Backpatch to all supported versions.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index ca3b3db59c8..49c5dd648e3 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2571,8 +2571,9 @@ SELECT
only databases whose names match the pattern are listed.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Size information is available for databases that the current user can
+ connect to, or to superusers and roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 3823dca7be2..3fccc543bad 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -953,16 +953,20 @@ listAllDbs(const char *pattern, bool verbose)
appendPQExpBufferStr(&buf, " ");
printACLColumn(&buf, "d.datacl");
if (verbose)
+ {
appendPQExpBuffer(&buf,
",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ " %s"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
",\n t.spcname as \"%s\""
",\n pg_catalog.shobj_description(d.oid, 'pg_database') as \"%s\"",
+ pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
gettext_noop("Size"),
gettext_noop("Tablespace"),
gettext_noop("Description"));
+ }
appendPQExpBufferStr(&buf,
"\nFROM pg_catalog.pg_database d\n");
if (verbose)
--
2.55.0
From 518a15679cb708646fab30e43536f926dbc77233 Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Thu, 23 Jul 2026 17:39:43 +0900
Subject: [PATCH v3] psql: Allow pg_read_all_stats to see database size in \l+
pg_database_size() allows access to users who have either CONNECT
privilege on the target database or membership in the
pg_read_all_stats role. However, previously, psql's \l+ checked only for
CONNECT, so users with pg_read_all_stats still saw "No Access" for
databases they could not connect to.
Fix this by making \l+ also check
pg_has_role('pg_read_all_stats', 'USAGE'), matching
pg_database_size()'s permission rules.
For back branches, emit the pg_read_all_stats check only when
connected to PostgreSQL 10 or later, since earlier releases do not have
that predefined role.
Backpatch to all supported versions.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 388efae56ef..d4670e10c84 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2531,8 +2531,9 @@ SELECT
only databases whose names match the pattern are listed.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Size information is available for databases that the current user can
+ connect to, or to superusers and roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 8fe39475fa1..b853b0860f3 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -1069,12 +1069,16 @@ listAllDbs(const char *pattern, bool verbose)
appendPQExpBufferStr(&buf, " ");
printACLColumn(&buf, "d.datacl");
if (verbose && pset.sversion >= 80200)
+ {
appendPQExpBuffer(&buf,
",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ " %s"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\"",
+ pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
gettext_noop("Size"));
+ }
if (verbose && pset.sversion >= 80000)
appendPQExpBuffer(&buf,
",\n t.spcname as \"%s\"",
--
2.55.0
Attachments:
[text/plain] v3-0001-pg16_pg19-psql-Allow-pg_read_all_stats-to-see-database-size.txt (2.7K, ../../CAHGQGwHtjBFkfQmDXCgB2_aVG=HL8nfOu3mWdPqO0DZNpYtgOQ@mail.gmail.com/2-v3-0001-pg16_pg19-psql-Allow-pg_read_all_stats-to-see-database-size.txt)
download | inline diff:
From 2e9ecd200233768eccafa273abbaf8f667922c0b Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Thu, 23 Jul 2026 17:39:43 +0900
Subject: [PATCH v3] psql: Allow pg_read_all_stats to see database size in \l+
pg_database_size() allows access to users who have either CONNECT
privilege on the target database or membership in the
pg_read_all_stats role. However, previously, psql's \l+ checked only for
CONNECT, so users with pg_read_all_stats still saw "No Access" for
databases they could not connect to.
Fix this by making \l+ also check
pg_has_role('pg_read_all_stats', 'USAGE'), matching
pg_database_size()'s permission rules.
For back branches, emit the pg_read_all_stats check only when
connected to PostgreSQL 10 or later, since earlier releases do not have
that predefined role.
Backpatch to all supported versions.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 7c05afd4719..6be4648d90e 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Size information is available for databases that the current user can
+ connect to, or to superusers and roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index af3935b0078..f258a33a808 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -1007,16 +1007,20 @@ listAllDbs(const char *pattern, bool verbose)
appendPQExpBufferStr(&buf, " ");
printACLColumn(&buf, "d.datacl");
if (verbose)
+ {
appendPQExpBuffer(&buf,
",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ " %s"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
",\n t.spcname as \"%s\""
",\n pg_catalog.shobj_description(d.oid, 'pg_database') as \"%s\"",
+ pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
gettext_noop("Size"),
gettext_noop("Tablespace"),
gettext_noop("Description"));
+ }
appendPQExpBufferStr(&buf,
"\nFROM pg_catalog.pg_database d\n");
if (verbose)
--
2.55.0
[text/plain] v3-0001-pg15-psql-Allow-pg_read_all_stats-to-see-database-size.txt (2.8K, ../../CAHGQGwHtjBFkfQmDXCgB2_aVG=HL8nfOu3mWdPqO0DZNpYtgOQ@mail.gmail.com/3-v3-0001-pg15-psql-Allow-pg_read_all_stats-to-see-database-size.txt)
download | inline diff:
From 3abb56b17562e626bc18dc83818905e9dd84d50e Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Thu, 23 Jul 2026 17:39:43 +0900
Subject: [PATCH v3] psql: Allow pg_read_all_stats to see database size in \l+
pg_database_size() allows access to users who have either CONNECT
privilege on the target database or membership in the
pg_read_all_stats role. However, previously, psql's \l+ checked only for
CONNECT, so users with pg_read_all_stats still saw "No Access" for
databases they could not connect to.
Fix this by making \l+ also check
pg_has_role('pg_read_all_stats', 'USAGE'), matching
pg_database_size()'s permission rules.
For back branches, emit the pg_read_all_stats check only when
connected to PostgreSQL 10 or later, since earlier releases do not have
that predefined role.
Backpatch to all supported versions.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index ca3b3db59c8..49c5dd648e3 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2571,8 +2571,9 @@ SELECT
only databases whose names match the pattern are listed.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Size information is available for databases that the current user can
+ connect to, or to superusers and roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 3823dca7be2..3fccc543bad 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -953,16 +953,20 @@ listAllDbs(const char *pattern, bool verbose)
appendPQExpBufferStr(&buf, " ");
printACLColumn(&buf, "d.datacl");
if (verbose)
+ {
appendPQExpBuffer(&buf,
",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ " %s"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
",\n t.spcname as \"%s\""
",\n pg_catalog.shobj_description(d.oid, 'pg_database') as \"%s\"",
+ pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
gettext_noop("Size"),
gettext_noop("Tablespace"),
gettext_noop("Description"));
+ }
appendPQExpBufferStr(&buf,
"\nFROM pg_catalog.pg_database d\n");
if (verbose)
--
2.55.0
[application/octet-stream] v3-0001-pg20-psql-Allow-pg_read_all_stats-to-see-database-size.patch (2.4K, ../../CAHGQGwHtjBFkfQmDXCgB2_aVG=HL8nfOu3mWdPqO0DZNpYtgOQ@mail.gmail.com/4-v3-0001-pg20-psql-Allow-pg_read_all_stats-to-see-database-size.patch)
download | inline diff:
From 6f09f60f87ff45e4bd94284b4ad8837da8cf2f4b Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Wed, 22 Jul 2026 13:16:16 +0200
Subject: [PATCH v3] psql: Allow pg_read_all_stats to see database size in \l+
pg_database_size() allows access to users who have either CONNECT
privilege on the target database or membership in the
pg_read_all_stats role. However, previously, psql's \l+ checked only for
CONNECT, so users with pg_read_all_stats still saw "No Access" for
databases they could not connect to.
Fix this by making \l+ also check
pg_has_role('pg_read_all_stats', 'USAGE'), matching
pg_database_size()'s permission rules.
For back branches, emit the pg_read_all_stats check only when
connected to PostgreSQL 10 or later, since earlier releases do not have
that predefined role.
Backpatch to all supported versions.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 56c2692e618..61d1713589b 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2817,8 +2817,9 @@ SELECT
are displayed in expanded mode.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Size information is available for databases that the current user can
+ connect to, or to superusers and roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index a2f09c26369..ad9c8affb4f 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -986,7 +986,8 @@ listAllDbs(const char *pattern, bool verbose)
printACLColumn(&buf, "d.datacl");
if (verbose)
appendPQExpBuffer(&buf,
- ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ ",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') OR\n"
+ " pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\""
--
2.55.0
[text/plain] v3-0001-pg14-psql-Allow-pg_read_all_stats-to-see-database-size.txt (2.6K, ../../CAHGQGwHtjBFkfQmDXCgB2_aVG=HL8nfOu3mWdPqO0DZNpYtgOQ@mail.gmail.com/5-v3-0001-pg14-psql-Allow-pg_read_all_stats-to-see-database-size.txt)
download | inline diff:
From 518a15679cb708646fab30e43536f926dbc77233 Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Thu, 23 Jul 2026 17:39:43 +0900
Subject: [PATCH v3] psql: Allow pg_read_all_stats to see database size in \l+
pg_database_size() allows access to users who have either CONNECT
privilege on the target database or membership in the
pg_read_all_stats role. However, previously, psql's \l+ checked only for
CONNECT, so users with pg_read_all_stats still saw "No Access" for
databases they could not connect to.
Fix this by making \l+ also check
pg_has_role('pg_read_all_stats', 'USAGE'), matching
pg_database_size()'s permission rules.
For back branches, emit the pg_read_all_stats check only when
connected to PostgreSQL 10 or later, since earlier releases do not have
that predefined role.
Backpatch to all supported versions.
---
doc/src/sgml/ref/psql-ref.sgml | 5 +++--
src/bin/psql/describe.c | 4 ++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 388efae56ef..d4670e10c84 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2531,8 +2531,9 @@ SELECT
only databases whose names match the pattern are listed.
If <literal>+</literal> is appended to the command name, database
sizes, default tablespaces, and descriptions are also displayed.
- (Size information is only available for databases that the current
- user can connect to.)
+ Size information is available for databases that the current user can
+ connect to, or to superusers and roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
</para>
</listitem>
</varlistentry>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 8fe39475fa1..b853b0860f3 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -1069,12 +1069,16 @@ listAllDbs(const char *pattern, bool verbose)
appendPQExpBufferStr(&buf, " ");
printACLColumn(&buf, "d.datacl");
if (verbose && pset.sversion >= 80200)
+ {
appendPQExpBuffer(&buf,
",\n CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')\n"
+ " %s"
" THEN pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))\n"
" ELSE 'No Access'\n"
" END as \"%s\"",
+ pset.sversion >= 100000 ? "OR pg_catalog.pg_has_role('pg_read_all_stats', 'USAGE')\n" : "",
gettext_noop("Size"));
+ }
if (verbose && pset.sversion >= 80000)
appendPQExpBuffer(&buf,
",\n t.spcname as \"%s\"",
--
2.55.0
^ permalink raw reply [nested|flat] 554+ messages in thread
* Re: Allow pg_read_all_stats to see database size in \l+
2026-07-22 11:26 Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 12:34 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
2026-07-22 13:12 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 14:38 ` Re: Allow pg_read_all_stats to see database size in \l+ Álvaro Herrera <alvherre@kurilemu.de>
2026-07-22 14:52 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-23 09:44 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
@ 2026-07-23 10:44 ` Christoph Berg <myon@debian.org>
2026-07-25 10:15 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
0 siblings, 1 reply; 554+ messages in thread
From: Christoph Berg @ 2026-07-23 10:44 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@gmail.com>; +Cc: Álvaro Herrera <alvherre@kurilemu.de>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Zsolt Parragi <zsolt.parragi@percona.com>
Re: Fujii Masao
> I've prepared patches for the older stable branches and attached them.
>
> While doing so, I also updated the documentation changes.
Looks good to me, thanks!
I tested the PG15 patch and it works, including against a 9.6 server.
Christoph
^ permalink raw reply [nested|flat] 554+ messages in thread
* Re: Allow pg_read_all_stats to see database size in \l+
2026-07-22 11:26 Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 12:34 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
2026-07-22 13:12 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 14:38 ` Re: Allow pg_read_all_stats to see database size in \l+ Álvaro Herrera <alvherre@kurilemu.de>
2026-07-22 14:52 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-23 09:44 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
2026-07-23 10:44 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
@ 2026-07-25 10:15 ` Fujii Masao <masao.fujii@gmail.com>
0 siblings, 0 replies; 554+ messages in thread
From: Fujii Masao @ 2026-07-25 10:15 UTC (permalink / raw)
To: Christoph Berg <myon@debian.org>; +Cc: Álvaro Herrera <alvherre@kurilemu.de>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Zsolt Parragi <zsolt.parragi@percona.com>
On Thu, Jul 23, 2026 at 7:44 PM Christoph Berg <myon@debian.org> wrote:
> Looks good to me, thanks!
>
> I tested the PG15 patch and it works, including against a 9.6 server.
Thanks for the review and test! I've pushed the patch.
Regards,
--
Fujii Masao
^ permalink raw reply [nested|flat] 554+ messages in thread
end of thread, other threads:[~2026-07-25 10:15 UTC | newest]
Thread overview: 554+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-25 19:35 [PATCH v48 6/7] Error out any process that would block at REPACK Álvaro Herrera <alvherre@kurilemu.de>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v1] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:16 [PATCH v2] Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 11:26 Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 12:34 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
2026-07-22 13:12 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-22 14:38 ` Re: Allow pg_read_all_stats to see database size in \l+ Álvaro Herrera <alvherre@kurilemu.de>
2026-07-22 14:52 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-23 09:44 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
2026-07-23 10:44 ` Re: Allow pg_read_all_stats to see database size in \l+ Christoph Berg <myon@debian.org>
2026-07-25 10:15 ` Re: Allow pg_read_all_stats to see database size in \l+ Fujii Masao <masao.fujii@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox