Re: Concurrent Inserts - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Concurrent Inserts
Date
Msg-id A737B7A37273E048B164557ADEF4A58B3658E33B@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: Concurrent Inserts  (sri harsha <sriharsha9992@gmail.com>)
List pgsql-general
sri harsha wrote:
>>>    Is there any way to stop concurrent inserts to happen on a single table ??

>> If you really want that, it is easy with table locks.

>     Actually i am using a FDW , in which the data is written into a single file. So when i do
> concurrent inserts , the data is written into the file simultaneously and this is causing a data
> corruption . Is TABLE LOCK the only option available ??

In that case I would say that the FDW is broken.

If concurrent modifications corrupt the data, the FDW should make sure that not more
than one modification to the same data can happen at the same time, perhaps by using
PostgreSQL advisory locks or IPC mechanisms.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: sri harsha
Date:
Subject: Re: Concurrent Inserts
Next
From: Spiros Ioannou
Date:
Subject: Re: partitioning query planner almost always scans all tables