Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Sašo Kiselkov
On 04/24/2013 10:25 PM, Richard Hipp wrote: > SQLite is using posix_fallocate() to allocate space for a region of shared > memory obtained using mmap(). If the space cannot be preallocated, then > when we use the mmapped region and an attempt is made to allocate the space > and the filesystem is f

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Nico Williams
On Wed, Apr 24, 2013 at 3:25 PM, Richard Hipp wrote: > On Wed, Apr 24, 2013 at 12:21 PM, Sašo Kiselkov wrote: >> ... > > SQLite is using posix_fallocate() to allocate space for a region of shared > memory obtained using mmap(). If the space cannot be preallocated, then > when we use the mmapped r

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Richard Hipp
On Wed, Apr 24, 2013 at 12:21 PM, Sašo Kiselkov wrote: > > Just as a quick follow-up on this, when I manually undefine > HAVE_POSIX_FALLOCATE, which makes SQLite fall back to the > truncate-and-write implementation, everything works fine. > > ZFS has been the filesystem of choice for SunOS-based s

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Nico Williams
On Wed, Apr 24, 2013 at 11:21 AM, Sašo Kiselkov wrote: > ZFS has been the filesystem of choice for SunOS-based systems for about > the last 5 years now, is becoming that for FreeBSD as we speak, and is More like 8 years :) > quickly gaining ground on Linux. The absence of support for > posix_fal

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Sašo Kiselkov
On 04/24/2013 05:17 PM, Sašo Kiselkov wrote: > On 04/24/2013 04:44 PM, Sašo Kiselkov wrote: >> On 04/24/2013 04:41 PM, Richard Hipp wrote: >>> On Wed, Apr 24, 2013 at 10:28 AM, Sašo Kiselkov >>> wrote: >>> On 04/24/2013 03:57 PM, Richard Hipp wrote: > On Wed, Apr 24, 2013 at 8:28 AM, Sašo

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Sašo Kiselkov
On 04/24/2013 04:44 PM, Sašo Kiselkov wrote: > On 04/24/2013 04:41 PM, Richard Hipp wrote: >> On Wed, Apr 24, 2013 at 10:28 AM, Sašo Kiselkov >> wrote: >> >>> On 04/24/2013 03:57 PM, Richard Hipp wrote: On Wed, Apr 24, 2013 at 8:28 AM, Sašo Kiselkov >>> wrote: > I'm running into I/O

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Sašo Kiselkov
On 04/24/2013 04:41 PM, Richard Hipp wrote: > On Wed, Apr 24, 2013 at 10:28 AM, Sašo Kiselkov wrote: > >> On 04/24/2013 03:57 PM, Richard Hipp wrote: >>> On Wed, Apr 24, 2013 at 8:28 AM, Sašo Kiselkov >> wrote: >>> I'm running into I/O errors when trying to access a sqlite3 database whic

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Richard Hipp
On Wed, Apr 24, 2013 at 10:28 AM, Sašo Kiselkov wrote: > On 04/24/2013 03:57 PM, Richard Hipp wrote: > > On Wed, Apr 24, 2013 at 8:28 AM, Sašo Kiselkov >wrote: > > > >> I'm running into I/O errors when trying to access a sqlite3 database > >> which is using WAL from my app. While using journal_mo

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Sašo Kiselkov
On 04/24/2013 04:28 PM, Sašo Kiselkov wrote: > On 04/24/2013 03:57 PM, Richard Hipp wrote: >> On Wed, Apr 24, 2013 at 8:28 AM, Sašo Kiselkov wrote: >> >>> I'm running into I/O errors when trying to access a sqlite3 database >>> which is using WAL from my app. While using journal_mode=delete, >>> ev

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Sašo Kiselkov
On 04/24/2013 03:57 PM, Richard Hipp wrote: > On Wed, Apr 24, 2013 at 8:28 AM, Sašo Kiselkov wrote: > >> I'm running into I/O errors when trying to access a sqlite3 database >> which is using WAL from my app. While using journal_mode=delete, >> everything is fine, but as soon as I switch over to j

Re: [sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Richard Hipp
On Wed, Apr 24, 2013 at 8:28 AM, Sašo Kiselkov wrote: > I'm running into I/O errors when trying to access a sqlite3 database > which is using WAL from my app. While using journal_mode=delete, > everything is fine, but as soon as I switch over to journal_mode=wal, I > just get a load of I/O errors

[sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Sašo Kiselkov
I'm running into I/O errors when trying to access a sqlite3 database which is using WAL from my app. While using journal_mode=delete, everything is fine, but as soon as I switch over to journal_mode=wal, I just get a load of I/O errors on any query, regardless if it is a SELECT or UPDATE/INSERT. A

[sqlite] I/O errors with WAL on ZFS

2013-04-24 Thread Sašo Kiselkov
I'm running into I/O errors when trying to access a sqlite3 database which is using WAL from my app. While using journal_mode=delete, everything is fine, but as soon as I switch over to journal_mode=wal, I just get a load of I/O errors on any query, regardless if it is a SELECT or UPDATE/INSERT. A