⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 naming.so

📁 berkeley db 4.6.21的源码。berkeley db是一个简单的数据库管理系统
💻 SO
字号:
m4_comment([$Id: naming.so,v 10.50 2004/08/13 03:39:00 bostic Exp $])define(M4PAGELOCAL, [DB_HOME, db_home])m4_ref_title(Environment, File naming, file @naming, env/db_config, env/region)m4_p([dnlOne of the most important tasks of the database environment is tostructure file naming within m4_db.  Cooperating applications (ormultiple invocations of the same application) must agree on the locationof the database environment, log files and other files used by the m4_dbsubsystems, and, of course, the database files.  Although it is possibleto specify full pathnames to all m4_db methods, this is cumbersome andrequires applications be recompiled when database files are moved.])m4_p([dnlApplications are normally expected to specify a single directory homefor the database environment.  This can be done easily in the call tom4_ref(dbenv_open) by specifying a value for the m4_arg(db_home)argument.  There are more complex configurations in which it may bedesirable to override m4_arg(db_home) or provide supplementary pathinformation.])m4_section([Specifying file naming to m4_db])m4_p([dnlThe following list describes the possible ways in which file naminginformation may be specified to the m4_db library.  The specificcircumstances and order in which these ways are applied are describedin a subsequent paragraph.])m4_tagbeginm4_tag(m4_idef(db_home), [dnlIf the m4_arg(db_home) argument to m4_ref(dbenv_open) is non-NULL,its value may be used as the database home, and files named relative toits path.])m4_tag(m4_idef(DB_HOME), [dnlIf the DB_HOME environment variable is set when m4_ref(dbenv_open) iscalled, its value may be used as the database home, and files namedrelative to its path.m4_p([dnlThe DB_HOME environment variable is intended to permit users and systemadministrators to override application and installation defaults.  Forexample::])m4_indent([env DB_HOME=/database/my_home application])m4_p([dnlApplication writers are encouraged to support the m4_option(h) optionfound in the supporting m4_db utilities to let users specify a databasehome.])])m4_tag([m4_ref(DbEnv) methods], [dnlThere are three m4_ref(DbEnv) methods that affect file naming.  Them4_refT(dbenv_set_data_dir) specifies a directory to search for databasefiles.  The m4_refT(dbenv_set_lg_dir) specifies a directory in which tocreate logging files.  The m4_refT(dbenv_set_tmp_dir) specifies adirectory in which to create backing temporary files.  These methodsare intended to permit applications to customize a file location for adatabase.  For example, an application writer can place data files andlog files in different directories or instantiate a new log directoryeach time the application runs.])m4_tag(m4_ref(DB_CONFIG), [dnlThe same information specified to the m4_ref(DbEnv) methods may also bespecified using the m4_ref(DB_CONFIG) configuration file.])m4_tagendm4_section([Filename resolution in m4_db])m4_p([dnlThe following list describes the specific circumstances and order inwhich the different ways of specifying file naming information areapplied.  m4_db filename processing proceeds sequentially through thefollowing steps:])m4_tagbeginm4_tag([absolute pathnames], [dnlIf the filename specified to a m4_db function is an m4_italic(absolutepathname), that filename is used without modification by m4_db.m4_p([dnlOn UNIX systems, an absolute pathname is defined as any pathname thatbegins with a leading slash (m4_bold(/)).])m4_p([dnlOn Windows systems, an absolute pathname is any pathname that begins witha leading slash or leading backslash (m4_bold(m4_backslash([]))); or anypathname beginning with a single alphabetic character, a colon and aleading slash or backslash (for example, m4_path(C:/tmp)).])])m4_tag([m4_ref(DbEnv) methods, DB_CONFIG], [dnlIf a relevant configuration string (for example, set_data_dir), isspecified either by calling a m4_ref(DbEnv) method or as a line in theDB_CONFIG configuration file, the value is prepended to the filename.If the resulting filename is an absolute pathname, the filename is usedwithout further modification by m4_db.])m4_tag(db_home, [dnlIf the application specified a non-NULL m4_arg(db_home) argument tom4_ref(dbenv_open), its value is prepended to the filename.  If theresulting filename is an absolute pathname, the filename is used withoutfurther modification by m4_db.])m4_tag(DB_HOME, [dnlIf the m4_arg(db_home) argument is NULL, the DB_HOME environmentvariable was set, and the application has set the appropriatem4_ref(DB_USE_ENVIRON) or m4_ref(DB_USE_ENVIRON_ROOT) flags, its valueis prepended to the filename.  If the resulting filename is an absolutepathname, the filename is used without further modification by m4_db.])m4_tag(default, [dnlFinally, all filenames are interpreted relative to the current workingdirectory of the process.])m4_tagendm4_p([dnlThe common model for a m4_db environment is one in which only the DB_HOMEenvironment variable, or the m4_arg(db_home) argument is specified.  Inthis case, all data filenames are relative to that directory, and allfiles created by the m4_db subsystems will be created in that directory.])m4_p([dnlThe more complex model for a transaction environment might be one inwhich a database home is specified, using either the DB_HOME environmentvariable or the m4_arg(db_home) argument to m4_ref(dbenv_open); and thenthe data directory and logging directory are set to the relativepathnames of directories underneath the environment home.])m4_section(Examples)m4_p([dnlStore all files in the directory m4_path(/a/database):])include(ref/env/naming1.cs)m4_p([dnlCreate temporary backing files in m4_path(/b/temporary), and all other filesin m4_path(/a/database):])include(ref/env/naming2.cs)m4_p([dnlStore data files in m4_path(/a/database/datadir), log files inm4_path(/a/database/logdir), and all other files in the directorym4_path(/a/database):])include(ref/env/naming3.cs)m4_p([dnlStore data files in m4_path(/a/database/data1) and m4_path(/b/data2), andall other files in the directory m4_path(/a/database).  Any data filesthat are created will be created in m4_path(/b/data2), because it isthe first data file directory specified:])include(ref/env/naming4.cs)m4_page_footer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -