Re: reindexing db

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: reindexing db
Date: 2020-12-08 08:32:37
Message-ID: 5cd1d643-b205-57cb-dd80-7054ffb0facc@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 12/8/20 1:46 AM, Paul Förster wrote:
> Hi Ron,
>
>> On 08. Dec, 2020, at 08:42, Ron <ronljohnsonjr(at)gmail(dot)com> wrote:
>>
>> DB=test
>> while read line;
>> do
>> psql $DB "REINDEX TABLE $line CONCURRENTLY;"
>> done < list_of_tables.txt
> yes, you can do that of course. In this case, I would add an "&" after the psql and probably a "wait" at the end. This should get the job done in parallel. :-)
>
> That of course depends on how fast the machine is and how much load it can take. :-)

The purpose of GNU Parallels is to not flood a system.  Adding the "--jobs="
feature to reindexdb (along with enumerating tables using "--tables") would
serve the same purpose.

--
Angular momentum makes the world go 'round.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Paul Förster 2020-12-08 10:01:21 Re: reindexing db
Previous Message Paul Förster 2020-12-08 07:46:39 Re: reindexing db