[GRASS-dev] [GRASS GIS] #2258: t.create creates DB always in the PERMANENT
GRASS GIS
trac at osgeo.org
Tue Apr 22 17:20:10 PDT 2014
#2258: t.create creates DB always in the PERMANENT
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: unspecified
Keywords: t.register | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by huhabla):
Replying to [comment:4 glynn]:
> Replying to [comment:3 huhabla]:
>
> > There is a reason why the temporal database is generated and used by
default in the PERMANENT directory.
>
> Does it handle the case where the user lacks the filesystem permissions
to write to PERMANENT?
There is no explicit error handling implemented. The creation process will
terminate with a Python exception.
>
> Does it handle race conditions, i.e. where two users both try to create
the database at the same time?
No. How does GRASS handle the race condition in case two user try to
create a mapset with the same name at the same time?
>
> Ordinarily, we assume that the user lacks write permission outside their
mapset.
The temporal framework supports two SQL database backends: sqlite and
postgresql. Sqlite is the default backend that can be used in case of
single user GRASS locations. In case of a multi-user GRASS environment the
postgresql database backend should be used instead, since it is able to
handle concurrent read/write and multi-user access better than sqlite. The
postgresql connection must be set explicitly with t.connect for each
mapset, since temporal database connections are mapset specific.
I absolutely prefer to use mapset specific sqlite database by default that
will merge at runtime with temporal databases from other mapsets to avoid
race conditions and filesystem permission problems. But unfortunately the
Python sqlite implementation does not support the merge of different
sqlite databases at runtime. Other file based databases were no option,
because of the lack of time support, or Python support and the
introduction of additional dependencies. Therefore the postgresql support
to avoid some problems of the sqlite backend.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2258#comment:5>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list