Re: Reindex concurrently

Поиск
Список
Период
Сортировка
От SOzcn
Тема Re: Reindex concurrently
Дата
Msg-id CAJyV5AYxpD+kOzO2kNC5R81x0zQSzKpOdo5e8Bs6F=yk=VzZpQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reindex concurrently  (Ron Johnson <ronljohnsonjr@gmail.com>)
Ответы Re: Reindex concurrently  (Ron Johnson <ronljohnsonjr@gmail.com>)
Список pgsql-admin
Hello Ron,

There is no problem with using a bash script.
Is the crontab useful for those who have multiple DBs in a cluster? 

I thought it would be easier to manage in DB for ease of management. Before using the bash script option, I wanted to confirm whether this is possible on the DB.

Ron Johnson <ronljohnsonjr@gmail.com>, 13 Ara 2023 Çar, 20:53 tarihinde şunu yazdı:
On Wed, Dec 13, 2023 at 12:28 PM SOzcn <selahattinozcnma@gmail.com> wrote:
Hello,

The result is when I run the function; "Reindex concurrently cannot run inside a transaction block. "

Of course, it works as follows, but in my building, I taken the scripts same like as follows but when I run this in function, I got the error message. 

REINDEX INDEX CONCURRENTLY "players_id_idx";

commit;

REINDEX INDEX CONCURRENTLY "players_about_idx";

commit;

According to my research, the only way to do this is to write a bash script in Linux and insert it with the loop. But since I want to manage this in the database system, I wanted to ask here.

What's wrong with a bash script run from cron?  (You should see my crontab; it's ginormous, running scripts against databases on 8 different servers.)

В списке pgsql-admin по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Reindex concurrently
Следующее
От: Sbob
Дата:
Сообщение: Re: Best way to parse complex json string into table columns?