Re: [GENERAL] Request to confirm which command is use for exclusive operation - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Request to confirm which command is use for exclusive operation
Date
Msg-id CAKFQuwbLmGOyKtXK0x44LK-HejV99nW00JwMK4sG-R3jOBvHkA@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Request to confirm which command is use for exclusive operation  (Yogesh Sharma <yogeshraj95@gmail.com>)
List pgsql-general
On Tue, Mar 7, 2017 at 11:21 PM, Yogesh Sharma <yogeshraj95@gmail.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.

pgsql-general by date:

Previous
From: John Iliffe
Date:
Subject: Re: [GENERAL] Unable to start postgresql
Next
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] Request to confirm which command is use for exclusive operation