1#include <xrpld/app/rdb/Vacuum.h>
3#include <boost/format.hpp>
12 uintmax_t
const dbSize = file_size(dbPath);
13 XRPL_ASSERT(dbSize !=
static_cast<uintmax_t
>(-1),
"ripple:doVacuumDB : file_size succeeded");
17 std::cerr <<
"The database filesystem must have at least as "
18 "much free space as the size of "
19 << dbPath.string() <<
", which is " << dbSize <<
" bytes. Only " <<
available
20 <<
" bytes are available.\n";
25 auto& session = txnDB->getSession();
32 session <<
"PRAGMA page_size;", soci::into(pageSize);
37 XRPL_ASSERT(setup.
globalPragma,
"ripple:doVacuumDB : non-null global pragma");
40 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.
constexpr std::array< char const *, 8 > TxDBInit
constexpr char const * CommonDBPragmaTemp
bool doVacuumDB(DatabaseCon::Setup const &setup, beast::Journal j)
doVacuumDB Creates, initialises, and performs cleanup on a database.
std::array< std::string, 4 > txPragma
static std::unique_ptr< std::vector< std::string > const > globalPragma
boost::filesystem::path dataDir