filesys.so

来自「berkeley db 4.6.21的源码。berkeley db是一个简单的数」· SO 代码 · 共 65 行

SO
65
字号
m4_comment([$Id: filesys.so,v 10.35 2002/02/05 18:34:09 bostic Exp $])m4_ref_title(m4_tam Applications,    Recovery and filesystem operations,    recovery and @filesystem operations,    transapp/hotfail, transapp/reclimit)m4_p([dnlThe m4_db API supports creating, removing and renaming files.  Creatingfiles is supported by the m4_refT(dbh_open).  Removing files issupported by the m4_ref(dbenv_dbremove) and m4_refT(dbh_remove)s.Renaming files is supported by the m4_ref(dbenv_dbrename) andm4_refT(dbh_rename)s.  (There are two methods for removing and renamingfiles because one of the methods is transactionally protected and oneis not.)])m4_p([dnlm4_db does not permit specifying the m4_ref(DB_TRUNCATE) flag whenopening a file in a transaction-protected environment.  This is animplicit file deletion, but one that does not always require the sameoperating system file permissions as deleting and creating a file do.])m4_p([dnlIf you have changed the name of a file or deleted it outside of them4_db library (for example, you explicitly removed a file using yournormal operating system utilities), then it is possible that recoverywill not be able to find a database to which the log refers.  In thiscase, m4_ref(db_recover) will produce a warning message, saying it wasunable to locate a file it expected to find.  This message is only awarning because the file may have been subsequently deleted as part ofnormal database operations before the failure occurred, so is notnecessarily a problem.])m4_p([dnlGenerally, any filesystem operations that are performed outside them4_db interface should be performed at the same time as making asnapshot of the database.  To perform filesystem operations correctly,do the following:])m4_nlistbeginm4_nlist([dnlCleanly shut down database operations.m4_p([dnlTo shut down database operations cleanly, all applications accessingthe database environment must be shut down and a transaction checkpointmust be taken.  If the applications are not implemented so they can beshut down gracefully (that is, closing all references to the databaseenvironment), recovery must be performed after all applications havebeen killed to ensure that the underlying databases are consistent ondisk.])])m4_nlist([dnlPerform the filesystem operations; for example, remove or rename one ormore files.])m4_nlist([Make an archival snapshot of the database.m4_p([dnlAlthough this step is not strictly necessary, it is stronglyrecommended.  If this step is not performed, recovery from catastrophicfailure will require that recovery first be performed up to the time ofthe filesystem operations, the filesystem operations be redone, and thenrecovery be performed from the filesystem operations forward.])])m4_nlist([Restart the database applications.])m4_nlistendm4_page_footer

⌨️ 快捷键说明

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