Re: Allow pg_read_all_stats to see database size in \l+ - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: Allow pg_read_all_stats to see database size in \l+
Date
Msg-id amDBusAY5ysRg-LQ@msg.df7cb.de
Whole thread
List 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

pgsql-hackers by date:

Previous
From: "ZizhuanLiu X-MAN"
Date:
Subject: Re: support create index on virtual generated column.
Next
From: Robert Haas
Date:
Subject: Re: incremental backup issue