From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Antonin Houska <ah(at)cybertec(dot)at> |
Cc: | Matheus Alcantara <matheusssilv97(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, Michael Banck <mbanck(at)gmx(dot)net>, Junwang Zhao <zhjwpku(at)gmail(dot)com>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: why there is not VACUUM FULL CONCURRENTLY? |
Date: | 2025-06-07 14:41:35 |
Message-ID: | CACJufxFfm=E1PA80Uxj26rqaRFVrHNiTycdADD1z4F+c8nQFDw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Apr 11, 2025 at 5:28 PM Antonin Houska <ah(at)cybertec(dot)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?
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2025-06-07 15:25:55 | Re: PG 18 release notes draft committed |
Previous Message | Robert Treat | 2025-06-07 13:35:33 | Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX |