Re: Statistics Import and Export
От | Alexander Lakhin |
---|---|
Тема | Re: Statistics Import and Export |
Дата | |
Msg-id | 98b2fcf0-f701-369e-d63d-6be9739ce17c@gmail.com обсуждение исходный текст |
Ответ на | Re: Statistics Import and Export (Jeff Davis <pgsql@j-davis.com>) |
Список | pgsql-hackers |
Hello Jeff and Corey, 26.10.2024 01:18, Jeff Davis wrote: > On Tue, 2024-09-17 at 05:02 -0400, Corey Huinker wrote: >> I've taken most of Jeff's work, reincorporated it into roughly the >> same patch structure as before, and am posting it now. > I have committed the import side of this patch series; that is, the > function calls that can load stats into an existing cluster without the > need to ANALYZE. > > The pg_restore_*_stats() functions are designed such that pg_dump can > emit the calls. Some design choices of the functions worth noting: Please look at the following seemingly atypical behavior of the new functions: CREATE TABLE test(id int); SELECT pg_restore_attribute_stats( 'relation', 'test'::regclass, 'attname', 'id'::name, 'inherited', false); SELECT pg_restore_attribute_stats( 'relation', 'test'::regclass, 'attname', 'id'::name, 'inherited', false ) FROM generate_series(1, 2); ERROR: XX000: tuple already updated by self LOCATION: simple_heap_update, heapam.c:4353 Or: SELECT pg_clear_attribute_stats('test'::regclass, 'id'::name, false) FROM generate_series(1, 2); ERROR: XX000: tuple already updated by self LOCATION: simple_heap_delete, heapam.c:3108 Best regards, Alexander
В списке pgsql-hackers по дате отправления: