It seems to be working ok. Below you can see me attaching a new database and limiting its page count. After limiting it, when I try to create a new table in the attached database it gives an error. When I try to make a new table in the main database it succeeds. And you can see that it keeps the max_page_count separate for each database. SQLite version 3.32.3 2020-06-18 14:00:33 Enter ".help" for usage hints. sqlite> .header on sqlite> create table t1 (foo text); sqlite> create table t2 (foo text); sqlite> pragma page_count; page_count 3 sqlite> attach database 'db2.sqlite' as test; sqlite> create table test.t1 (foo text); sqlite> pragma test.page_count; page_count 2 sqlite> pragma test.max_page_count; max_page_count 1073741823 sqlite> pragma test.max_page_count = 2; max_page_count 2 sqlite> create table test.t2 (foo text); Error: database or disk is full sqlite> create table t3 (foo text); sqlite> pragma main.page_count; page_count 4 sqlite> pragma main.max_page_count; max_page_count 1073741823 sqlite> pragma test.max_page_count; max_page_count 2 sqlite>