Re: reindexing db

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: reindexing db
Date: 2020-12-08 07:46:39
Message-ID: 01FAC841-0FF0-4B63-A507-C76EFB62A97F@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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. :-)

Cheers,
Paul

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2020-12-08 08:32:37 Re: reindexing db
Previous Message Ron 2020-12-08 07:42:44 Re: reindexing db