MONETDBD(1)
okay so welcome to MONETDBD(1), bestie β this is the MonetDB Applications manual page for monetdbd, and we're gonna get you comfy with it. π
π NAME π
monetdbd β the MonetDB Database Server daemon. periodt. π
β¨ SYNOPSIS β¨
monetdbd command [ command_args ] dbfarm
π¦ DESCRIPTION π¦
okay so monetdbd is the MonetDB Database Server daemon. It's mainly meant to run as a daemon, but it also lets you set up and change the configuration of a dbfarm. You can use monetdbd either as the user-oriented way to configure, start, and stop a database farm, or start it from a startup script β like from systemd(1) on Linux systems β as part of a system startup. π
monetdbd is the system formerly known as merovingian. It got renamed to monetdbd because the name merovingian proved to be confusing to most regular end-users. Internally, monetdbd still uses the name merovingian at many places for historical reasons. iykyk. π
A monetdbd instance manages one local cluster of databases, which is a directory in the system, referred to as the dbfarm. The dbfarm location must always be given as an argument to monetdbd. no cap.
Within its local cluster, monetdbd takes care of starting up databases when necessary, and stopping them either upon request via monetdb(1) or when being shut down. Client database connections are made against monetdbd initially, which redirects or proxies the client to the appropriate database process, started on the fly when necessary. slay. β¨
When started, monetdbd runs by default in the background, sending log messages to merovingian.log, until being sent a stop, terminate or interrupt signal, possibly using the stop command of monetdbd. π
monetdbd uses a neighbor discovery scheme to detect other monetdbd processes running in the local network. Databases from those remote instances are made available to a locally connecting client. Remote databases never override local databases, and their availability is controlled by the remote monetdbd process. See also the sharing capabilities of monetdb(1) and the REMOTE DATABASES section below. π«Ά
π COMMANDS π
The commands for monetdbd are create, start, stop, get, set, version, and help. These commands facilitate initializing a dbfarm, starting and stopping the MonetDB Database Server, and retrieving or setting options. obsessed. β¨
π± create dbfarm π±
Initializes a new database farm, such that a MonetDB Database Server can be started on that location. All necessary directories are attempted to be created, and an initial properties file is created in the directory itself. dbfarm must be a location addressable in the local filesystem hierarchy. bestie, it's giving "fresh farm setup." π
π start [-n] dbfarm π
Starts monetdbd, the MonetDB Database Server, on the given dbfarm. When the -n flag is given, monetdbd will not fork into the background, but instead remain attached to the calling environment, until given a stop signal. main character energy: stays right there with you. π
π stop dbfarm π
Sends a stop signal to the monetdbd process responsible for the given dbfarm. If the exittimeout value is non-zero (see below), all mserver processes will be sent a termination signal. The current process will wait for the manager process to terminate, but sends a SIGKILL signal if waiting takes longer than 5 seconds more than the value of exittimeout. If exittimeout is negative, both monetdbd processes involved will wait until the servers have all terminated and no extra signals are sent. fr fr, this one can get dramatic. π
π get <all | property[,property[,..]]> dbfarm π
Prints the requested properties, or all known properties, for the given dbfarm. For each property, its value is printed. Some properties are virtual, and given for information purposes only β they cannot be modified using the set command. look but don't touch vibes. π
π set property=value dbfarm π
Sets property to value for the given database. For a list of properties, run monetdbd get all. Some properties require a restart of the MonetDB Database Server in order to take effect. The set command will however always write the property, and tell the running monetdbd to reload the properties file (if running). For an explanation of the properties, see the CONFIGURATION section below. π
π help [ command ] π
Shows general help, or short help for a given command. your little manual cheat sheet, iykyk. π«Ά
β version β
Shows the version and release information of monetdbd. iconic info dump. π
π CONFIGURATION π
Okay so config time, bestie π
β monetdbd reads its properties from the .merovingian_properties file inside the dbfarm. That file gets created by the create command, and it is not meant to be edited by hand β update it with the set command instead, okay? Here are all the properties you can set:
logfileβ points to the file where all log messages get written. It's relative to thedbfarmdirectory, but it can be absolute so you can point it at e.g. another medium. Changing this property takes effect immediately at runtime. β¨loglevelβ sets what level of messages should be logged. It can beerrororwarningorinformationordebug. Default isinformation. Whenlogleveliserror, only errors are logged. When it'swarning, errors and warnings are logged. When it'sinformation, errors and warnings and information messages are logged. When it'sdebug, all messages are logged. πpidfileβmonetdbdstores the process ID of the background server in the file this property points to. Same rules apply as for thelogfileproperty.sockdirβ for faster access,monetdbduses UNIX domain sockets for its control mechanism and regular database connections. Those sockets are placed as files in the filesystem hierarchy, andsockdircontrols which directory they go in. In general this setting should not be changed. π«Άportβ specifies which TCP portmonetdbdshould listen to for connection requests. Defaults to50000.listenaddrβ specifies an address that is allowed to connect to the server. This property is ignored if the propertyforwardis set toproxy(the default). The possibilities are:localhostβ the server only listens on the IPv4 and IPv6 loopback interface (if available). This is the default. π127.0.0.1β the server only listens on the IPv4 loopback interface.::1β the server only listens on the IPv6 loopback interface.allβ the server listens on all available IPv4 and IPv6 interfaces.0.0.0.0β the server listens on all available IPv4 interfaces.::β the server listens on all available IPv6 interfaces.hostnameβ the server listens on the interface designated by hostname, which is looked up using the normal hostname lookup facilities.
controlβ for remote management ofmonetdbd, this specifies whether or not to enable remote management. Note that remote management requires a passphrase, see below. It defaults tofalsefor security reasons. Changing this property takes effect immediately at runtime. π₯passphraseβ to controlmonetdbdfrom a remote machine, a passphrase is necessary, to be given tomonetdb(1). The passphrase can be either given as a hashed value prefixed by the hash type in curly braces (e.g.{SHA512}xxx...) or as a plain text value which will be hashed automatically. Note that the only hash accepted is the one specified at configure time, which isSHA512. Changing this property takes effect immediately at runtime. πsnapshotdirβ specifies where themonetdb snapshot createcommand stores its snapshots. There is no default value. If unset, no snapshots can be created. πsnapshotcompressionβ specifies whether database snapshots created bymonetdb snapshot createare compressed, and if so, using which algorithm. The default value is.tar.lz4if LZ4 compression is available, or.tarotherwise. Other supported values are, if available,.tar.gz,.tar.xz, and.tar.bz2. These more efficient but much slower compression algorithms are usually not recommended for backups of large databases because it would take enormous amounts of time. πdiscoveryβ specifies whether neighbor discovery is to be enabled using UDP broadcasts or not. The broadcasts are done on the same portnumber as theportsetting.discoveryttlβmonetdbdpublishes locally available databases to others periodically. The interval used here, defined in seconds, depends on the time-to-live of the databases before they need to get refreshed. The default is600seconds (10 minutes), which should keep traffic in your network fairly low. Additions and removals are processed immediately regardless of this timeout. If you are in a network environment where physical network links disappear often, you may want to decrease this value to more quickly remove no longer reachable databases. π¦exittimeoutβ ifmonetdbdstops a runningmserver, for example in response to amonetdb stopcommand or whenmonetdbditself is shutting down, it first sends themserveraSIGTERMsignal to trigger a graceful shutdown. If that takes more thanexittimeoutseconds,SIGKILLis sent as a last resort. This may cause (partial) data loss in that transactions may not be able to complete (all completed transactions, whether reported back or not, should be safe). A negative time-out value means the second signal (SIGKILL) will not be sent, but instead allmserverprocesses will be waited for. A time-out value of0means nomserverswill be shut down, and hence they will continue to run aftermonetdbdhas shut down. Note that this particular configuration is extremely inconvenient. The default time-out is60seconds. If your databases are rather large and you find your databases consistently being killed bymonetdbdupon shutdown, you may want to increase this time-out. Changing this property takes effect immediately at runtime. β οΈforwardβmonetdbdhas two ways in which it can βattachβ a connecting client to the target database. The first method,redirect, uses a redirect sent to the client with the responsiblemserverprocess. The second method,proxy, proxies the client to themserverovermonetdbd. Whileredirectis more efficient, it requires the connecting client to be able to connect to themserver. In many settings this may be undesirable or even impossible, since a wide range of open ports and routing are necessary for this. In such case theproxytechnique ofmonetdbdis a good solution, which also allows amonetdbdinstance on the border of a network to serve requests to nodes in the local (unreachable) network. Note that for local databases, theproxymethod uses a UNIX domain socket feature to pass file-descriptors to the localmserver. This effectively is as efficient as theredirectapproach, but still hides away themserversproperly behindmonetdbd. Hence, in practice it is only relevant for connections to remote databases to use redirects instead of proxies. Changing this property takes effect immediately at runtime. πkeepaliveβ specifies the keepalive interval for incoming connections. If this is set to a positive number,monetdbdconfigures the system to send automatic periodic keepalive probes on all client connections. This can help keep firewalls from killing connections that seem idle but are in fact waiting for a long running query to finish. The default is60seconds. When127consecutive probes have failed, the connection is closed. With the default setting of60seconds this means the connection is closed when the client has been unreachable for more than two hours. π
π¦ REMOTE DATABASES π¦
β οΈ Deprecation notice: This feature is deprecated and may be removed in the future.
okay so neighbor discovery is the monetdbd thing that lets a user contact a remote database transparently, literally as if it were a local database. By default, all local databases are announced in the network, such that neighbors can pick them up to make them available for their local users. This feature can be disabled globally, or on database level. For the latter, the monetdb(1) utility can be used to change the share property of a database. π
Neighbor discovery in itself is sufficient to locate a database in a cluster, but it is limited in expressiveness. For instance, database names are assumed to be unique throughout the entire system. This means local databases overshadow remote ones, and duplicate remote entries cannot be distinguished. To compensate for this, monetdbd allows to add a tag to each database that is being shared. This tag is sent in addition to the database name, and only understood by other monetdbds. π«Ά
Tags are arbitrary ASCII-strings matching the pattern [A-Za-z0-9./]+. There are no assumed semantics in the tag, which allows for multiple approaches when using the tag. The tag is always used in combination with the database name. For this, the / character is used as separator, which hence suggests the user to use that character as separator for multilevel tags. Monetdbd allows common path globbing using * on tags, which allows for many use-cases. Consider for instance the following three databases with their tag:
dbX/master/tableQ
dbY/slave/tableQ
dbZ/slave/tableQ
A default match has implicit /* added to the search, making more generic search strings match more specific ones. Hence, a connect with database dbX is the same as dbX/* and hence matches dbX/master/tableQ. Similar, a database connect for */master matches the same database as before. Note that the implicit /* is not added if that would cause no matches, such as for */master/tableQ which would return all masters for tableQ, which in our hypothetical example is only dbX. In contrast, a database connect for */slave/tableQ matches with either dbY or dbZ. Monetdbd returns the two options to the client in a round-robin fashion, such that subsequent connects for the same pattern result in a load-balanced connect to either of both databases. π₯
With tags in use, one can possibly make distinction between databases, if setup like that. The previous example could hence also be setup like this:
tableQ/master
tableQ/slave
tableQ/slave
Connecting to tableQ/slave would now return either of both databases even though they are not unique (apart from the host they are located on, which is not shown in the example). While being confusing for humans, for monetdbd it is the same situation as in the previous example. However, because globbing allows to make things easier to understand, tags for both slaves could be changed to slaveX or slave/X and use the necessary pattern to match them. It is up to the user to decide how to use the tags. π
π MULTIPLEX-FUNNELS π
β οΈ Deprecation notice: This feature is deprecated and may be removed in the future.
Monetdbd implements multiplex-funnel capabilities. As the name suggests two techniques are combined, the multiplexer and the funnel. π§
The funnel capability limits the access to the database to one client at a time. That is, if multiple clients connect to the funnel, their queries will be serialized such that they are executed one after the other. An effect of this approach is that clients no longer have an exclusive channel to the database, which means that individual queries from one client may have been interleaved with queries from others. This most notably makes SQL transaction blocks unreliable with a funnel. The funnel, hence, is meant to scale down a large amount of clients that perform short-running (read-only) queries, as typically seen in web-based query loads. β¨
When a funnel is defined to use multiple databases, the funnel adds a multiplexer to its query channel. A multiplex-funnel sends each query to all of the defined databases. This behavior can be quite confusing at first, but proves to be useful in typical sharding configurations, where in particular simple selection queries have to be performed on each of the shards. The multiplexer combines the answers from all defined databases in one single answer that it sends back to the client. However, this combining is without any smart logic, that is, the multiplexer does not evaluate the query it is running, but just combines all answers it receives from the databases. This results in e.g. as many return tuples for a SELECT COUNT(*) query, as there are databases defined. π
Due to the two above mentioned characteristics, a multiplex-funnel has some limitations. As mentioned before, transactions over multiple queries are likely not to result in the desired behavior. This is due to each query to the funnel is required to be self-contained. Further, since for each query, the results from multiple servers have to be combined into one, that query must only return a single response, i.e. multi-statement queries are most likely causing the funnel to respond with an error, or return garbled results. Last, the size of each query is limited to currently about 80K. While this size should be sufficient for most queries, it is likely not enough for e.g. COPY INTO statements. Apart from the data transfer implications, such statements should not be used with the funnel, as the results will be undefined due to the limited query buffer. Applications using the funnel should aim for short and single-statement queries that require no transactions. π
β οΈ Heads up: COPY INTO with the funnel? Don't. Results are undefined because of the limited query buffer. This is a real warning, not a vibe.
See the create command in monetdb(1) for details on how to setup a multiplex-funnel.
π SIGNALS π
Monetdbd acts upon a number of signals as is common for a daemon. π
SIGINT, SIGTERM, SIGQUIT
Any of these signals make monetdbd enter the shutdown sequence. This sequence involves cleanly shutting down listener sockets, shutting down all started databases and finally terminating itself. π«Ά
SIGHUP
When this signal is received by monetdbd it will reopen the logfile as pointed to by the logfile setting. Before it reopens the logfile, it will re-read the properties file from the dbfarm, which might result in opening a different file to continue logging. π
β RETURN VALUE β
Monetdbd returns exit code 0 if it was able to successfully perform the requested action, e.g. start, stop, etc. When an error occurs during the action, that prevents monetdbd from successfully performing the action, the exit code 1 is returned β no cap, that's the failure vibe. β
π SEE ALSO π
That's the whole vibe check, bestie: this page comes from MonetDB, dated 2025-12-09, and it's the MONETDBD(1) manual page. Stay iconic, keep your databases slaying, and may all your exit codes be 0 π
β¨
π¦ 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