The Eventide message store Postgres database package installs command line tools for administering the database.
- mdb-create-db
- mdb-delete-db
- mdb-recreate-db
- mdb-clear-messages
- mdb-update-db
- mdb-install-functions
- mdb-install-indexes
- mdb-install-views
- mdb-install-privileges
- mdb-print-messages
- mdb-print-stream-summary
- mdb-print-type-summary
- mdb-print-stream-type-summary
- mdb-print-category-type-summary
- mdb-print-type-stream-summary
- mdb-print-type-category-summary
- mdb-write-test-message
- mdb-open-database-scripts-dir
- mdb-print-message-store-version
::: tip
If you installed the tools via Bundler, prefix the following commands with bundle exec
, for example: bundle exec mdb-create-db
:::
Note: The message_store_postgres.json
settings file does not configure the connection used for any database administrative tasks, including creating the message store schema or printing reports. The administrative connection is controlled by the facilities provided by Postgres itself. For more details, see: https://www.postgresql.org/docs/current/libpq-envars.html.
mdb-create-db
mdb-delete-db
mdb-recreate-db
mdb-clear-messages
The schema update tools are useful when upgrading to a new release of the message store database.
mdb-update-db
This tool installs the functions, indexes, views, and privileges.
If any function, index, view, or privilege already exists, it will be replaced with the most recent definition. If any of these does not exist, they will be created.
mdb-install-functions
mdb-install-indexes
mdb-install-views
mdb-install-privileges
mdb-print-messages
Print Messages from a Specific Stream
STREAM_NAME=someStream mdb-print-messages
mdb-print-stream-summary
Print Stream Summary Statistics for a Stream Name
STREAM_NAME=someStream mdb-print-stream-summary
NOTE: The stream name is matched by substring using a SQL LIKE
clause
mdb-print-type-summary
Print Type Summary Statistics for a Type Name
TYPE=SomeType mdb-print-type-summary
NOTE: The type name is matched by substring using a SQL LIKE
clause
mdb-print-stream-type-summary
Print Stream and Type Summary Statistics for a Stream Name
STREAM_NAME=someStream mdb-print-stream-type-summary
NOTE: The stream name is matched by substring using a SQL LIKE
clause
mdb-print-category-type-summary
Print Category and Type Summary Statistics for a Category
CATEGORY=someCategory mdb-print-category-type-summary
NOTE: The category name is matched by substring using a SQL LIKE
clause
mdb-print-type-stream-summary
Print Type and Stream Summary Statistics for a Type Name
TYPE=SomeType mdb-print-type-stream-summary
NOTE: The type is matched by substring using a SQL LIKE
clause
mdb-print-type-category-summary
Print Type and Category Summary Statistics for a Type Name
TYPE=SomeType mdb-print-type-category-summary
NOTE: The type is matched by substring using a SQL LIKE
clause
mdb-write-test-message
The number of messages and the stream name can be specified using environment variables.
Write a test messages to a stream named someStream-111
STREAM_NAME=someStream-111 mdb-write-test-message
Write 10 test messages
INSTANCES=10 mdb-write-test-message
Write 10 test messages to a stream named someStream-111
STREAM_NAME=someStream-111 INSTANCES=10 mdb-write-test-message
mdb-open-database-scripts-dir
mdb-print-message-store-version
NOTE: The message store includes a server function named message_store_version
that reports the version of the database schema.
The database administration tools presume a database named message_store
.
If you prefer a different database name, you can specify it on the command line using environment variables:
DATABASE_NAME=some_other_database mdb-create-db