| From: | Christoph Berg <myon(at)debian(dot)org> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Subject: | Re: Allow pg_read_all_stats to see database size in \l+ |
| Date: | 2026-07-22 13:12:26 |
| Message-ID: | amDBusAY5ysRg-LQ@msg.df7cb.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Allow-pg_read_all_stats-to-see-database-size-in-l.patch | text/x-diff | 1.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2026-07-22 13:12:32 | Re: incremental backup issue |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-07-22 13:07:20 | [Bug] pg_upgrade could fail for non-superuser subscriptions using foreign servers |