From: | SOzcn <selahattinozcnma(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | James Pang <jamespang886(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: create index concurrently blocked by other query |
Date: | 2024-03-25 09:35:16 |
Message-ID: | CAJyV5AaYxRheCSVP_AZ2nmO4fPvMjhBouu3QdTnAGdYe=R7G=w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
You can manage the index maintenance on the OS with Crontab if you want to
make it concurrently.
If you only need index maintenance you can schedule it with pg_cron.
The only way to do this is to write a bash script in Linux and insert it
with the loop. You can text the bash script for that.
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 23 Mar 2024 Cmt, 19:37 tarihinde şunu yazdı:
> James Pang <jamespang886(at)gmail(dot)com> writes:
> > PGv14, it's a time range partition table, we first create index ...
> on
> > ONLY parent table and it's done very fast, then we are doing "create
> index
> > concurrently ... on each partition table", then we saw it blocked by
> some
> > other sessopm "select on other tables" , is it expected ?
>
> Yes, read the documentation. CONCURRENTLY avoids blocking other
> transactions, at the cost of being easily blocked itself.
>
> regards, tom lane
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2024-03-25 12:07:52 | Re: create index concurrently blocked by other query |
Previous Message | Keith | 2024-03-24 02:46:08 | Re: PG_PARTMAN - Create Child With FillFactor |