Re: [sqlite] page_size on ATTACH-ed databases

2016-08-17 Thread Clemens Ladisch
Ward WIllats wrote: > sqlite> attach database '/tmp/RareData.db' as rd; < ATTACH SECOND DB > sqlite> pragma page_size=512; <- SET MAIN DB PAGE SIZE > ... > sqlite> pragma journal_mode=WAL; This sets the journal mode of _both_ databases to WAL. This requires that both database

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-16 Thread Scott Robison
On Tue, Aug 16, 2016 at 12:24 PM, Ward WIllats wrote: > Good thought. But no. In fact, I should have included the line where I > deleted it before taking the trace below. > > ~# rm /tmp/RareData.db > ~# /usr/local/bin/sqlite3 /opt/foundation/core_db.db > SQLite version

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-16 Thread Ward WIllats
Good thought. But no. In fact, I should have included the line where I deleted it before taking the trace below. ~# rm /tmp/RareData.db ~# /usr/local/bin/sqlite3 /opt/foundation/core_db.db SQLite version 3.10.1 2016-01-13 21:41:56 > On Aug 16, 2016, at 11:17 AM, Scott Hess

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-16 Thread Scott Hess
Is there any possibility that the attached db already existed before you ran this? Because once a db exists (contains pages) the page size is fixed until you run vacuum. On Tue, Aug 16, 2016 at 10:53 AM, Ward WIllats wrote: > >>> On Aug 12, 2016, at 11:44 PM, Dan

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-16 Thread Ward WIllats
>> On Aug 12, 2016, at 11:44 PM, Dan Kennedy wrote: >> >> On 08/13/2016 01:14 AM, Ward WIllats wrote: >> >> Can't reproduce this problem here. Are you able to reproduce it with the >> shell tool? >> > > > Yes, if I use the shell on our embedded system

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-13 Thread Ward WIllats
> On Aug 12, 2016, at 11:44 PM, Dan Kennedy wrote: > > On 08/13/2016 01:14 AM, Ward WIllats wrote: > > Can't reproduce this problem here. Are you able to reproduce it with the > shell tool? > Yes, if I use the shell on our embedded system (OpenWRT/Linux). I should

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-13 Thread Dan Kennedy
On 08/13/2016 01:14 AM, Ward WIllats wrote: Consider: 1. Create a new database, set the pragma page_size=512 2. Create a new database on the connection with ATTACH DATABASE '/tmp/number_two.db' AS second; 3. Issue pragma second.page_size=4096 to try and set the page size on the attached DB

[sqlite] page_size on ATTACH-ed databases

2016-08-12 Thread Ward WIllats
Consider: 1. Create a new database, set the pragma page_size=512 2. Create a new database on the connection with ATTACH DATABASE '/tmp/number_two.db' AS second; 3. Issue pragma second.page_size=4096 to try and set the page size on the attached DB to 4096. 4. Read back with pragma