Skip to main content
Solved

Writing Raster to PostGis locks table


erik_jan
Contributor
Forum|alt.badge.img+18

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.

View original
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.

2 replies

courtney_m
Contributor
Forum|alt.badge.img+12
  • Contributor
  • Best Answer
  • December 3, 2015

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.


erik_jan
Contributor
Forum|alt.badge.img+18
  • Author
  • Contributor
  • December 3, 2015
courtney_m wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings