Re: Extended Statistics set/restore/clear functions.[
| От | Michael Paquier | 
|---|---|
| Тема | Re: Extended Statistics set/restore/clear functions.[ | 
| Дата | |
| Msg-id | aQmns_eQoiQ-92KA@paquier.xyz обсуждение исходный текст  | 
		
| Ответ на | Re: Extended Statistics set/restore/clear functions. (Tomas Vondra <tomas@vondra.me>) | 
| Список | pgsql-hackers | 
On Fri, Oct 31, 2025 at 09:22:55PM +0100, Tomas Vondra wrote: > Sorry for not paying much attention to this thread ... It was PGEU last week, it's not surprising knowing that you are in.. Europe :) > My opinion is that we should both use the new format and keep the > pg_dump code to allow upgrading from older pre-19 versions. Okay, thanks for the input. > There really is nothing special about the current format - I should have > used JSON (or any other established format) from the beginning. But I > only saw that as human-readable version of ephemeral data, it didn't > occur to me we'll use this to export/import stats cross versions. So if > we need to adjust that to make new use cases more convenient, let's bite > the bullet now. > > If doing both is too complex / ugly, I think the pg_upgrade capability > is more valuable. I'd rather keep the old, less convenient format to > have pg_upgrade support for all versions. Hmm. I have been eyeing at the dump code once again, and it's not that bad on a second lookup, so I'd be OK to incorporate the whole in a review. > Otherwise users may not benefit from this pg_upgrade feature for a > couple more years. Plenty of users delay upgrading until the EOL gets > close, and so might be unable to dump/restore extended stats for the > next ~5 years. Okay. I still think that we should split things a bit more in the patch set. Corey has sent me a proposal in this direction, where most of the entries can be reviewed and potentially applied separately: 1. pg_ndistinct output function change. 2. pg_ndistinct input function addition. 3. pg_dependencies output function change 4. pg_dependencies input function 5. Expose attribute statistics function and rename them attstat_* or statatt_* 6. pg_restore_extended_stats 7. pg_dump with no ability to fetch old-format pg_ndistinct/pg_dependences. 8. pg_dump working back as far as possible I am not completely sold about the changes in the input/output functions, but I'd be happy to consider more options with a rebased patch set (with the dump issue on older clusters issue, while on it). -- Michael
Вложения
В списке pgsql-hackers по дате отправления: