Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-06 Thread jose isaias cabrera
jus...@postgresql.org wrote... On 2014-11-06 03:12, nicolas riesch wrote: There is a bug in some Linux implementations (RedHat9 is the canonical example) that prevents fcntl() locks created by one thread from being modified in a different thread. As a data point, "Red Hat 9" is

Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-06 Thread John McKown
On Thu, Nov 6, 2014 at 7:51 AM, wrote: > On 2014-11-06 03:12, nicolas riesch wrote: > > >> There is a bug in some Linux implementations (RedHat9 is the canonical >> example) that prevents fcntl() locks created by one thread from being >> modified in a different thread.

Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-06 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/05/2014 02:05 PM, nicolas riesch wrote: > This means that EACH SUCCESSIVE function in the sequence above can > be processed on a DIFFERENT OS THREAD. That works just fine with SQLite, with one caveat. You should also make sure the wrapper

Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-06 Thread justin
On 2014-11-06 03:12, nicolas riesch wrote: There is a bug in some Linux implementations (RedHat9 is the canonical example) that prevents fcntl() locks created by one thread from being modified in a different thread. As a data point, "Red Hat 9" is incredibly ancient, from 2003:

Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-06 Thread Stephan Beal
On Thu, Nov 6, 2014 at 4:12 AM, nicolas riesch wrote: > http://www.sqlite.org/cvstrac/wiki?p=MultiThreading Be aware that the cvstrac pages are all historical, possibly outdated, and no longer maintained. -- - stephan beal

Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-05 Thread nicolas riesch
Hello, Maxim, I use your excellent driver, indeed ;-) About my post, the poison of doubt has just crept into my mind when I read this: http://www.sqlite.org/cvstrac/wiki?p=MultiThreading There is a bug in some Linux implementations (RedHat9 is the canonical example) that prevents fcntl()

Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-05 Thread Maxim Khitrov
On Wed, Nov 5, 2014 at 7:10 PM, nicolas riesch wrote: > Pardon me, I will try to reformulate my question more clearly. > > My scenario: > > - sqlite is set to Multi-thread mode (SQLITE_THREADSAFE=2), or Serialized > mode (SQLITE_THREADSAFE=1) > - I create N logical

Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-05 Thread nicolas riesch
Pardon me, I will try to reformulate my question more clearly. My scenario: - sqlite is set to Multi-thread mode (SQLITE_THREADSAFE=2), or Serialized mode (SQLITE_THREADSAFE=1) - I create N logical threads in my "Go" program. - Each logical thread creates a database connection, for its

Re: [sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-05 Thread Simon Slavin
On 5 Nov 2014, at 10:05pm, nicolas riesch wrote: > Even if the user writes a Go program with only one logical thread, he has > no control about which OS thread will process a function call. > > This means that EACH SUCCESSIVE function in the sequence above can be

[sqlite] Is sqlite thread-safety sufficient for use with "Go" language ?

2014-11-05 Thread nicolas riesch
I would like to use sqlite with "Go" (golang) language. There are already several drivers available in this language. But before using them, I would like to ensure it is really safe. The normal sequence to access a database is: sqlite3_prepare() loop sqlite3_step() sqlite3_column()