| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Add a statistics view to track usage of deprecated features |
| Date: | 2026-06-29 02:53:05 |
| Message-ID: | akHeEQtUFLZBJy6R@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Jun 29, 2026 at 10:24:02AM +0900, Shinya Kato wrote:
> I would like to propose a patch that adds a new cumulative statistics
> view, pg_stat_deprecated_features, which tracks how often each
> deprecated feature is used across the cluster.
I am unconvinced that this is useful. First, I doubt that we will
ever consider switching back to non-deprecated a feature that was
marked as deprecated, which is what this kind of counter could be used
for in terms of decision-making. To me, the important fact is not in
counting if they're used, it's in warning users that we think, as core
developers, that these features should not be used and that we have
reasons to have marked them as deprecated based on technical reasons.
GLOBAL has been parked as deprecated in c3bc76bdb0ac, back in 2012.
We keep these keywords because we may change their interpretation in
the future (see the recent business with global temporary tables from
Dean Rasheed, fancy patch set). LOCAL and GLOBAL for temp tables are
not really candidate for removal, and counting that they are used
keywords is an irrelevant fact. Keeping them for compatibility is
maintenance-free, basically.
Speaking of which, patch 0003 has the idea to touch a shared memory
state of pgstats for what is an authentication path. This is not a
good idea security-wise, first, and it can stress pgstats under
repeated authentication requests, which is worse than the potential
security aspect, performance-wise. So, no, do not do something like
that.
As a whole, there are more interesting things to do than spending a
stats kind ID on something like this kind of proposal.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | zengman | 2026-06-29 02:53:13 | Re: (SQL/PGQ) Clean up orphaned properties when dropping a label |
| Previous Message | Michael Paquier | 2026-06-29 02:39:20 | Re: Interest in Faster Unicode Normalization |