Which (table) lock mode to use - Mailing list pgsql-general

From Ben
Subject Which (table) lock mode to use
Date
Msg-id 5f4a64610412141655640e56a6@mail.gmail.com
Whole thread Raw
Responses Re: Which (table) lock mode to use
List pgsql-general
Hi

I have this scenario and would like to use lock table for this but I
don't know which mode I should use.

When I delete/update/insert a record from/to a table, I need to update
some fields of all the records in this table. During this process I
don't want anyone to insert, update or delete the data but allow them
to select the data at the original state.

I am currently using:

LOCK TABLE tbl_name IN SHARE ROW EXCLUSIVE MODE

Is this the correct mode to use?

Thanks,
Ben

pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Corrupt RTREE index
Next
From: Tim Vadnais
Date:
Subject: VACUUM FULL [ANALYZE] problem