[TinyOWS-dev] WFS Transaction locks

Olivier Courtin olivier.courtin at gmail.com
Tue Sep 20 16:40:02 EST 2011

On Tue, Sep 20, 2011 at 9:41 PM, Carlos Ruiz <boolean10001 at yahoo.com> wrote:


> As you know, I haven't had no much time to help TinyOWS because my work and
> my master, but this week I had some time and I started to implement the WFS
> transaction locks.

Good news :)

> I'm using the PostGIS functions such as EnableLongTransactions, AddAuth,
> LockRow. Currently I'm working with the wfs_parse_operation function within
> the wfs_transaction.c file.
> I have some questions at this point:
> Does TinyOWS must abort the transaction if it cannot set locks on the
> transaction tables ?

As i understand the spec, there's two phases,
one to lock (LockFeature), one another (Transaction) to apply transaction(s)

And you could should to release Lock at the end of a/the Transaction,
or wait till the end of the time limit.

So operation must fails if:
- LockFeature is requested with LOCKACTION=ALL and not able
 to lock alls.
- Transaction is requested on an already locked feature.

> The PostGIS locking functions works at row level, I don't know if it's
> better to work at table level to avoid setting locks to every row specified
> in the WFS transaction, because right now TinyOWS must lock row by row with
> a SELECT LockRow(...) statement.

The WFS way to do it, is to handle feature by feature,
so row by row for the undelying spatial database seems fine.

Lock by table, is indeed only a (very) specific use case.

> What do you think ?

Some others thoughts,
- DefaultLockExpiry should be set by default to a reasonable small value

- A boolean should be set in the config file to activate yes or no,
the lock support

- What about a way to release one/all locks from administrator point of view ?

> I have advanced too much with this and I hope to send you the patch soon.
> P.S. I'm working with the 614 revision.

Goodie, so it's look it could be included in the next 1.1 release.,
if the patch is good enough.

Could you write an RFC to describe the mains implementation points ?
(will be needed at a moment to pass through PSC validation)


More information about the TinyOWS-dev mailing list