Re: why there is not VACUUM FULL CONCURRENTLY?
От | jian he |
---|---|
Тема | Re: why there is not VACUUM FULL CONCURRENTLY? |
Дата | |
Msg-id | CACJufxFfm=E1PA80Uxj26rqaRFVrHNiTycdADD1z4F+c8nQFDw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: why there is not VACUUM FULL CONCURRENTLY? (Antonin Houska <ah@cybertec.at>) |
Список | pgsql-hackers |
On Fri, Apr 11, 2025 at 5:28 PM Antonin Houska <ah@cybertec.at> wrote: > > Please check the next version [1]. Thanks for your input. > > [1] https://www.postgresql.org/message-id/97795.1744363522%40localhost > Hi, I’ve briefly experimented with v13-0001. EXPLAIN tab complete: explain (verbose O OFF ON since we already touched the tab-complete for repack. We can do it similarly. you may see src/bin/psql/tab-complete.in.c line 4288. ------------------------------ Currently REPACK Synopsis section looks like the screenshot attached. make it one line REPACK [ ( option [, ...] ) ] [ table_name [ USING INDEX index_name ] ] would look intuitive, IMHO. ------------------------------ +repack_index_specification: + USING INDEX name { $$ = $3; } + | /*EMPTY*/ { $$ = NULL; } + ; in gram.y line 4685, we have ExistingIndex: USING INDEX name { $$ = $3; } ; so here, we can change it to repack_index_specification: ExistingIndex | /*EMPTY*/ { $$ = NULL; } ------------------------------------------------- +static List * +get_tables_to_repack(MemoryContext repack_context) +{ + relrelation = table_open(RelationRelationId, AccessShareLock); + scan = table_beginscan_catalog(relrelation, 0, NULL); + while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL) + { + RelToCluster *rtc; + Form_pg_class relrelation = (Form_pg_class) GETSTRUCT(tuple); + Oid relid = relrelation->oid; + + /* Only interested in relations. */ + if (get_rel_relkind(relid) != RELKIND_RELATION) + continue; The doc said (Without a table_name, REPACK processes every table and materialized view...) but seems plain ``REPACK(verbose) ; `` will not process materialized view?
В списке pgsql-hackers по дате отправления: