[Date Prev][Date Next]
Question on Sleepycat docs re: pagesize cautions
Excerpting from the Berkeley DB reference manual section of Chapter 9
titled "Berkeley DB Recoverability":
... it is necessary to consider the underlying page size of the Berkeley
DB databases. The Berkeley DB library performs all database writes using
the page size specified by the application, and Berkeley DB assumes
pages are written atomically....
and from "Selecting a page size"
... The size of the pages used in the underlying database can be
specified by calling the DB->set_pagesize method. The minimum page size
is 512 bytes and the maximum page size is 64K bytes, and must be a power
of two. If no page size is specified by the application, a page size is
selected based on the underlying filesystem I/O block size. (A page size
selected in this way has a lower limit of 512 bytes and an upper limit
of 16K bytes.) ...
It does not appear to me that "set_pagesize" is one of the options that
can appear in DB_CONFIG (it's not a DB_ENV method) so I'm assuming that my
ext3 filesystem pagesize of 4096 will be used, and that the cautionary
statement "In the case of a hot backup, the utility you use to copy the
databases must read database pages atomically" found in "Database log file
archival" does not need to concern me if I use cp to archive my
database files? Or should I use "dd bs=4096" to be safe?