2006-12-19 00:17:44 +01:00
|
|
|
Support a database-local fsync setting. Needs berkeley db patch.
|
|
|
|
|
2010-04-01 18:15:26 +02:00
|
|
|
--- ./lib/backend/db3.c.orig 2009-12-07 14:36:49.000000000 +0000
|
|
|
|
+++ ./lib/backend/db3.c 2010-03-25 14:35:39.000000000 +0000
|
|
|
|
@@ -62,10 +62,12 @@ static int db_fini(dbiIndex dbi, const c
|
2006-12-19 00:17:44 +01:00
|
|
|
return rc;
|
|
|
|
}
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
+#if 0
|
2009-08-28 15:54:03 +02:00
|
|
|
static int db3_fsync_disable(int fd)
|
2006-12-19 00:17:44 +01:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
2009-08-28 15:54:03 +02:00
|
|
|
#if (DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 5)
|
|
|
|
/*
|
2010-04-01 18:15:26 +02:00
|
|
|
@@ -168,10 +170,12 @@ static int db_init(dbiIndex dbi, const c
|
|
|
|
xx = cvtdberr(dbi, "dbenv->set_cachesize", xx, _debug);
|
|
|
|
}
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
+#if 0
|
|
|
|
if (dbi->dbi_no_fsync) {
|
|
|
|
xx = db_env_set_func_fsync(db3_fsync_disable);
|
|
|
|
xx = cvtdberr(dbi, "db_env_set_func_fsync", xx, _debug);
|
|
|
|
}
|
2006-12-19 00:17:44 +01:00
|
|
|
+#endif
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
if (dbi->dbi_shmkey) {
|
|
|
|
xx = dbenv->set_shm_key(dbenv, dbi->dbi_shmkey);
|
2010-04-01 18:15:26 +02:00
|
|
|
--- ./lib/backend/dbconfig.c.orig 2009-12-07 14:36:49.000000000 +0000
|
|
|
|
+++ ./lib/backend/dbconfig.c 2010-03-25 14:35:39.000000000 +0000
|
|
|
|
@@ -72,6 +72,8 @@ static const struct poptOption rdbOption
|
2006-12-19 00:17:44 +01:00
|
|
|
NULL, NULL },
|
2006-12-19 00:17:44 +01:00
|
|
|
{ "fcntl_locking",0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_FCNTL_LOCKING,
|
2006-12-19 00:17:44 +01:00
|
|
|
NULL, NULL },
|
2006-12-19 00:17:44 +01:00
|
|
|
+ { "nofsync", 0,POPT_BIT_SET, &db3dbi.dbi_oflags, DB_NOFSYNC,
|
2006-12-19 00:17:44 +01:00
|
|
|
+ NULL, NULL },
|
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
{ "btree", 0,POPT_ARG_VAL, &db3dbi.dbi_type, DB_BTREE,
|
|
|
|
NULL, NULL },
|
2010-04-01 18:15:26 +02:00
|
|
|
@@ -101,8 +103,6 @@ static const struct poptOption rdbOption
|
2006-12-19 00:17:44 +01:00
|
|
|
NULL, NULL },
|
|
|
|
{ "usedbenv", 0,POPT_ARG_NONE, &db3dbi.dbi_use_dbenv, 0,
|
|
|
|
NULL, NULL },
|
|
|
|
- { "nofsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_fsync, 0,
|
|
|
|
- NULL, NULL },
|
|
|
|
{ "nodbsync", 0,POPT_ARG_NONE, &db3dbi.dbi_no_dbsync, 0,
|
|
|
|
NULL, NULL },
|
|
|
|
{ "lockdbfd", 0,POPT_ARG_NONE, &db3dbi.dbi_lockdbfd, 0,
|