Re: Request to confirm which command is use for exclusive operation

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Yogesh Sharma <yogeshraj95(at)gmail(dot)com>
Cc: pgsql-general general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Request to confirm which command is use for exclusive operation
Date: 2017-03-08 15:56:57
Message-ID: CAKFQuwbLmGOyKtXK0x44LK-HejV99nW00JwMK4sG-R3jOBvHkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 7, 2017 at 11:21 PM, Yogesh Sharma <yogeshraj95(at)gmail(dot)com>
wrote:

> Dear David,
>
> I want to apply explicitly lock mechanism once inset operation is in
> progress then REINDEX will wait.
> And vice versa.
> So, please let me know this type of handling is possible.
>
>
​You want to exclusively lock a table during every insert just because
something might run a concurrent reindex?

If you want to write a higher-level locking scheme for your system and not
use what is provided natively by PostgreSQL that's your choice. Its not
worth volunteering my time to help do that, though. The docs have
considerable info regarding explicit locking using the LOCK command. You
should start there.

I see in a subsequent response that you have doubts that REINDEX is
actually working properly. If you are able to demonstrate that maybe the
underlying problem could be addressed.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2017-03-08 16:01:57 Re: Request to confirm which command is use for exclusive operation
Previous Message John Iliffe 2017-03-08 15:44:25 Re: Unable to start postgresql