1#include <xrpl/server/Vacuum.h>
3#include <boost/format.hpp>
14 uintmax_t
const dbSize = file_size(dbPath);
15 XRPL_ASSERT(dbSize !=
static_cast<uintmax_t
>(-1),
"ripple:doVacuumDB : file_size succeeded");
19 std::cerr <<
"The database filesystem must have at least as "
20 "much free space as the size of "
21 << dbPath.string() <<
", which is " << dbSize <<
" bytes. Only " <<
available
22 <<
" bytes are available.\n";
27 auto& session = txnDB->getSession();
34 session <<
"PRAGMA page_size;", soci::into(pageSize);
39 XRPL_ASSERT(setup.
globalPragma,
"ripple:doVacuumDB : non-null global pragma");
42 session <<
"PRAGMA page_size;", soci::into(pageSize);
A generic endpoint for log messages.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool doVacuumDB(DatabaseCon::Setup const &setup, beast::Journal j)
doVacuumDB Creates, initialises, and performs cleanup on a database.
constexpr std::array< char const *, 8 > TxDBInit
constexpr char const * CommonDBPragmaTemp
std::array< std::string, 4 > txPragma
static std::unique_ptr< std::vector< std::string > const > globalPragma
boost::filesystem::path dataDir