From: | Holger Jakobs <holger(at)jakobs(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Reindex concurrently |
Date: | 2023-12-13 13:48:53 |
Message-ID: | 5c6950cb-5ce2-2740-a447-5d9ff8418edd@jakobs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Am 13.12.23 um 12:27 schrieb SOzcn:
> Hello team,
>
> We've been building a index maintenance scripts but in the function it
> doesn't work with concurrently, is there a way for manipulate that ?
> Just for example ; The reindexes are working without function. Have a
> nice day!
>
> select index_stat.test ();
>
> CREATE OR REPLACE FUNCTION index_stat.test()
>
> RETURNS void
>
> LANGUAGE plpgsql
>
> AS $function$
>
> begin
>
> REINDEX INDEX CONCURRENTLY "players_id_idx";
>
> commit;
>
> REINDEX INDEX CONCURRENTLY "players_about_idx";
>
> commit;
>
> end;
>
> $function$
>
> ;
>
Hello,
"doesn't work with" isn't a good description. Please always include the
error message given.
What I would suggest instead is try using a procedure instead of a function.
Cheers
Holger
--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar | 2023-12-13 13:50:35 | Verify data after backup and restore |
Previous Message | SOzcn | 2023-12-13 11:27:06 | Reindex concurrently |