--- Charles Cazabon <[EMAIL PROTECTED]> wrote: > I'm using sqlite (through the pysqlite wrapper, but this behaviour seems > unrelated to the wrapper) in an application on various platforms. One process > create an sqlite database and starts writing data to it; another process opens > the sqlite database and reads from it. > > On most platforms, the reader sees new data appear in the database > periodically as the writer creates new records. But on Solaris, the reader > never sees any updates -- it only ever sees whatever data was in the database > when the reader first opened it, even though the writer is continuing to > insert new data periodically. > > I've seen similar behaviour with non-database files on Solaris -- writes to a > file across processes aren't seen by the reader unless the reader supplies the > O_RSYNC flag to the open(2) call. It seems to be a Solaris peculiarity, as I > don't see this behaviour on Linux, *BSD, or other commercial Unices. > > I've looked at the sqlite source code, and it does not appear to be supplying > the O_RSYNC or O_SYNC flags to open(2). > > So, my questions are: > > 1) Has anyone else run into this issue? Is there a known way to work around > it? > > 2) Should the open(2) call be modified to provide the O_RSYNC flag? Would > this have nasty side effects?
One would think that if such an issue existed in sqlite under Solaris someone would have reported it long ago - but you never know. I don't have access to Solaris at the moment, but you might try testing with 2 instances of the commandline shell, sqlite3, to make sure it's not a python driver issue. If you have any trouble building sqlite3 from sources, just post any compile issue to the list. Make sure you are running sqlite3 on a database file on a _local_ file system. Perform updates/inserts/deletes in one sqlite3 instance and see what happens when you do an appropriate select from the other sqlite3 instance. If it is proven that Solaris sqlite3 does indeed require the O_RSYNC flag in its open, I'm sure it could be put into os_unix.c with an appropriate #ifdef. ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------