MSERVER5(1)
π NAME π
mserver5 β the MonetDB server version 5. This is the mserver5 page from the MonetDB Applications manual, section 1, and it's literally the main-character server process. π
β¨ SYNOPSIS β¨
mserver5 [ options ]
π¦ DESCRIPTION π¦
okay so mserver5 (also written Mserver5) is the current MonetDB server, and it does all the processing when clients ask for a certain database. It's the one doing the actual work, but plot twist: it's usually more common to start, monitor, and connect to the mserver5 process through monetdbd(1), bestie. π«Ά
This manual describes the options that mserver5 understands. It's for people who really need to work with mserver5 itself. In regular cases, the programs monetdbd(1) and monetdb(1) control the many options and let you adjust them to appropriate values where sensible. For normal usage, it is preferred to apply any configuration through these programs. iykyk β¨
πΈ OPERATION πΈ
When the build-time configuration did not disable this, a mserver5 process presents the user with a console prompt. On this prompt, MAL commands can be executed. The architecture is set up to handle multiple streams of requests. The first thread started represents the server, which is the console prompt, reading from standard input and writing to standard output. π¦
The server thread started remains in existence until all other threads die. The server is stopped by sending it a termination signal (SIGINT, SIGTERM, SIGQUIT). periodt. π
π₯ MSERVER5 OPTIONS π₯
mserver5 can be started with options as arguments. Here's the whole menu, no skips, no "oops I forgot one" energy. π
--dbpath=pathβ Path wheremserver5should find a database. Shorthand for optiongdk_dbpath. Default value:/nix/store/6mdghwpnnzs4vqhhw8gxy258dg8l0aa9-monetdb-11.55.7/var/monetdb5/dbfarm/demo.--dbextra=pathβ Path wheremserver5should store transient data. Default value is the value of the--dbpathoption. If the value of path isin-memory, transient data is not stored on disk at all but kept in memory at all times. π«Ά--dbtrace=pathβ File name for the trace log file formserver5. Default value is the filemdbtrace.loginside the directory specified with the--dbpathoption. If path is equal tostdout, the trace will be written to the standard output which is normally captured bymonetdbd(1)and written to its log file. β¨--config=fileβ Config file to read options from. This file can contain all options that can be set with the--setflag. See CONFIG FILE FORMAT.--single-userβ Allow only a single user at a time. lowkey exclusive. π--readonlyβ The database is opened in read-only mode.--set option=valueβ Set individual configuration option. For possible options, see PARAMETERS sections.--loadmodule=moduleβ Load extra module in the form of a dynamic link library (.dllor.sofile) which should be located in thelib/monetdb5directory. This option can be repeated for different modules. Also see theloadmodulesentry inmonetdb(1). π§--without-geomβ Start the server without geom support, even if it is available. Normally the server will refuse to start if geom is loaded, but the database was created by a server without geom support. With this option it is possible to start the server anyway. no cap. π--helpβ Print list of options.--versionβ Print version and compile configuration.--in-memoryβ Runmserver5in-memory. No data will be written to disk. The name of the database that a client can connect to isin-memory. π--read-password-initialize-and-exitβ Read an unencrypted password from standard input and use it to set the password for the monetdb administrator user, initialize the database, and exit. If the database was already initialized, the administrator password is not changed. This option is used bymonetdbd(1)when creating a new database with an administrator password and should not be used otherwise. π¨--process-wal-and-exitβ Stop the server immediately after processing the write-ahead log.--clean-BBPβ Clean up junkBATsfrom theBBP(i.e. the database). These areBATsthat were accidentally left around by older versions of the software (the current version is not known to do this) and so this option should not normally be used. π«--logging component=levelβ Set the specified logging component to the specified level as if the SQL query calllogging.setcomplevel(component,level)had been executed, except this is done before SQL is initialized. β--debug[=value],-d[value]β Set debug level. This is mostly for debugging purposes. The value together with the=sign is optional. If not specified, it defaults to2. In the short form-d, the value, if present, must immediately (i.e. without space) follow the option. The values of multiple instances of this flag are OR-ed together. The value is an integer, which can be (a bit-wise OR of):1β (THRDMASK) thread-specific debug output2β (CHECKMASK) property checking on newBATs16β (IOMASK) major IO activity32β (BATMASK)BAThandling128β (PARMASK) Thread management256β (TESTINGMASK) Used for testing512β (TMMASK) Transaction management1024β (TEMMASK) Locks and Triggers4096β (PERFMASK)BBPPerformance8192β (DELTAMASK) Delta debugging (?)16384β (LOADMASK) Module loading32768β (PUSHCANDMASK)65536β (TAILCHKMASK) Check sizes of.tailfiles during low-level commit1048576β (ACCELMASK) Accelerator debugging2097152β (ALGOMASK) show low level algorithm chosen16777216β (NOSYNCMASK) disable forcefully synchronizing files to disk. If this flag is set, there is no guarantee that the database remains consistent after a crash. DO NOT USE (unless you really don't care about your data). π33554432β (DEADBEEFMASK) disable βcleaningβ of freed memory inGDKfree()which only happens in a debug build (i.e. with assertions enabled) e.g., for performance measurements67108864β (ALLOCMASK) exhaustiveGDK malloc & freetracing for debugging (GDKdevelopers, only)268435456β (HEAPMASK) trace/debugHEAPextend; used only for development & debugging536870912β (FORCEMITOMASK) forcefully activate mitosis even on small tables, i.e., split small tables in as many (tiny) pieces as there are cores (threads) available; this allows us to test mitosis functionality without requiring large data sets (β at the expense of a potentially significant interpretation overhead for unnecessarily large plans); used only for development & testing; set automatically byMtest.pyπ§ͺ
--algorithmsβ Equivalent to--debug=(ALGOMASK).--forcemitoβ Equivalent to--debug=(FORCEMITOMASK | NOSYNCMASK).--heapsβ Equivalent to--debug=(HEAPMASK).--ioβ Equivalent to--debug=(IOMASK | PERFMASK).--memoryβ Equivalent to--debug=(ALLOCMASK).--modulesβ Equivalent to--debug=(LOADMASK).--performanceβ Equivalent to--debug=(DEADBEEFMASK).--propertiesβ Equivalent to--debug=(CHECKMASK).--threadsβ Equivalent to--debug=(THRDMASK | PARMASK).--transactionsβ Equivalent to--debug=(TMMASK | DELTAMASK | TEMMASK).
β¨ MSERVER5 PARAMETERS β¨
ok so mserver5 talks to the GDK kernel through MAL, aka the MonetDB Assembler Language π and MonetDB 5 has this whole extensive optimiser framework that transforms MAL plans into plans that are more optimal β or even functional, like distributed ones π¦. These parameters are the ones that control behaviour at the MAL level. iykyk.
monet_vault_keyβ so the authorisation tables inside mserver5 can be encrypted with a key, so that literally just reading the BATs doesn't spill your credentials π. This setting points to a file that stores the secret key that unlocks the password vault. The file can contain anything. It's read up to the first null-byte (\0), which means you can pad it to any length you want with trailing null-bytes to obfuscate how long the key is π. Wanna generate a key? You can do it with a tool likepwgenand just add a few of the passwords it generates together. Just β please β don't pick a key that's too small, bestie. π₯ Also important: if there's no vault key file, some default key is used to encrypt the authorisation tables. And changing this setting (which is effectively changing the key) for a database that already exists makes that database unusable, because nobody can log in anymore π. If you're usingmonetdbd(1), a per-database vault key gets set for you π«Ά.max_clientsβ controls how many client slots get allocated for clients to connect, and therefore caps the maximum number of clients connected at the same time. Ngl, MonetDB is not designed to handle massive amounts of connected clients. If that's your workload, the funnel capability frommonetdbd(1)might be the more suitable solution π. Default is64.mapi_usockβ the name of the UNIX domain socket file the server listens on for connections. If the name contains the substring${PORT}, that part gets replaced by the decimal representation of the TCP/IP port (themapi_portoption). That's especially useful if the port was specified as0β¨. Heads up though: there's usually a severe system-imposed limit on how long that file name can be π.mapi_portβ the TCP/IP port number the server listens on for connections. This only gets used if the value of themapi_listenaddroption isn't equal tonone. Default50000. If the value is0, the server uses a so-called ephemeral port, i.e. one the system assigns. Once it successfully starts listening on a port, you can grab the value of the port from the file.conninside the database (--dbpath) directory π.mapi_listenaddrβ the TCP/IP interface the server listens on for connections. The possibilities are:localhostβ the server listens only on the IPv4 and IPv6 loopback interface. This is the default πΈ.127.0.0.1β the server listens only on the IPv4 loopback interface.::1β the server listens only on the IPv6 loopback interface.allβ the server listens on all IPv4 and IPv6 interfaces.0.0.0.0β the server listens on all IPv4 interfaces.::β the server listens on all IPv6 interfaces.noneβ the server won't listen on any TCP/IP interface at all (so you need to use the UNIX domain socket interface, bestie π ).hostnameβ the server listens on whatever interface that hostname designates, looked up using the normal hostname lookup facilities π¦.
allow_hge_upgradeβ set this toyesto let the server upgrade the database from one without 128 bit integer support to one with 128 bit integer (also known asHUGEINT) support π₯. Note that the upgrade only happens if the server genuinely does support 128 bit integers. Also note: there is no going back from a database with 128 bit integer support to one without π. This option does nothing if no upgrade is required. Also, 128 bit integers need support from the C compiler and are therefore not available on all platforms β and it can be turned off at compile time too.
π SQL PARAMETERS π
The SQL component of MonetDB 5 runs on top of the MAL environment, and it has its own SQL-level specific settings, obviously π .
sql_debugβ enable debugging using a mask. This option should normally be disabled (0). Default:0.sql_optimizerβ the default SQL optimizer pipeline can be set per server. See theoptpipesetting inmonetdb(1)when you're usingmonetdbd. During SQL initialization, the optimizer pipeline is checked against the dependency information kept in the optimizer library to make sure there are no conflicts and that at least the pre-requisite optimizers are used β¨. The setting ofsql_optimizercan be either the list of optimizers to run. Default:default_pipe.
The following are possible pipes to use:
minimal_pipeβ the minimal pipeline necessary by the server to operate correctly.default_pipeβ the default pipeline, which contains themitosis-mergetable-reorderoptimizers, aimed at large tables and improved access locality π.no_mitosis_pipeβ identical to the default pipeline, except that optimizermitosisand dependent optimizers are omitted. It's used mainly to make some tests work deterministically, and to check/debug whether "unexpected" problems are related to mitosis (and/or mergetable) π.sequential_pipeβ identical to the default pipeline, except that optimizersmitosis,dataflowand dependent optimizers are omitted. It's used mainly to make some tests work deterministically, i.e. avoid ambiguous output, by avoiding parallelism π.
embedded_pyβ enable embedded Python. This means Python code can be called from SQL π. The value istrueor3for embedded Python 3. Note that by enabling embedded Python, users of the server are allowed to execute arbitrary Python code, and are therefore able to read and modify all data that the server process has access to π β so like, be sure about this one.embedded_r=trueβ enable embedded R. This means R code can be called from SQL. Note that by enabling embedded R, users of the server are allowed to execute arbitrary R code, and are therefore able to read and modify all data that the server process has access to π.embedded_c=trueβ enable embedded C. This means C code can be called from SQL. The C code gets compiled first and then executed, which means a C compiler must be available π οΈ. Note also that by enabling embedded C, users of the server are allowed to execute arbitrary C code, and are therefore able to read and modify all data that the server process has access to. And on top of all that β if the C code causes a crash, all bets are off ππ.idle_timeout=secondsβ set the idle timeout. If there's an active transaction and the client hasn't provided any input to the server for the specified amount of time, the server closes the connection and aborts (rolls back) the transaction β³. The default is0, which means no timeout.raw_strings=trueβ this boolean option controls how the sql scanner interprets string literals π. If the value isfalse, strings are interpreted as if they were delimited with E-quotes, meaning strings are interpreted as C strings and backslash characters are needed to escape special characters. If the value istrue, strings are interpreted as if they were delimited with R-quotes, meaning all characters are interpreted literally β¨. Single quote characters need to be doubled inside strings. The default value isfalse.
π CONFIG FILE FORMAT π
The configuration file that mserver5 can read consists of parameters of the form name=value. The file is line-based, and each newline-terminated line represents either a comment or a parameter π¦. Only the first equals sign in a parameter is significant. Whitespace before or after that first equals sign is not stripped. Trailing whitespace in a parameter value is retained verbatim π. Any line beginning with a hash (#) is ignored, and so are lines containing only whitespace. The values following the equals sign in parameters are all a string β quotes aren't needed, and if you write them they become part of the string π
.
π SEE ALSO π
monetdbd(1), monetdb(1), mclient(1)
and that's the whole thing bestie, you're officially a MonetDB girlie now ππ«Ά this page came from MonetDB, dated 2025-12-09, and it's MSERVER5(1) β go forth and configure responsibly πβ¨
π¦ where this page comes from
- nixpkgs unstable: monetdb 11.55.7
- π the page's license: MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms