I try to write multiple Raster images to a single PostGis table. Writing the records sequentially is working as designed.
But I am using FME Cloud and want to write records parallel using multiple engines. The first record is written, but seems to lock the table. Therefor all other processes fail.
How can I avoid the table lock in PostGis?
Any suggestions?
Best answer by courtney_m
There is a "Features Per Transaction" parameter on the PostGIS Writer - try setting this to 1. If this is >1, the workspace might be triggering a bulk insert. If this is the case, the first job will issue table-level lock in PostGIS, which will cause the subsequent jobs to fail. If "Features Per Transaction" = 1, each job should only issue a row-level lock in PostGIS for each feature, as it is being written. This will not prevent the other jobs from writing to the same table.
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
There is a "Features Per Transaction" parameter on the PostGIS Writer - try setting this to 1. If this is >1, the workspace might be triggering a bulk insert. If this is the case, the first job will issue table-level lock in PostGIS, which will cause the subsequent jobs to fail. If "Features Per Transaction" = 1, each job should only issue a row-level lock in PostGIS for each feature, as it is being written. This will not prevent the other jobs from writing to the same table.
There is a "Features Per Transaction" parameter on the PostGIS Writer - try setting this to 1. If this is >1, the workspace might be triggering a bulk insert. If this is the case, the first job will issue table-level lock in PostGIS, which will cause the subsequent jobs to fail. If "Features Per Transaction" = 1, each job should only issue a row-level lock in PostGIS for each feature, as it is being written. This will not prevent the other jobs from writing to the same table.
Yes, setting the Features per Transactions did resolve the problem. Also creating the table before inserting the data, instead of having FME create the table helped.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.