Create a dedicated LightDB superuser account and a database for the ltcluster metadata, e.g.
createuser -s ltcluster createdb ltcluster -O ltcluster
For the examples in this document, the name ltcluster
will be
used for both user and database, but any names can be used.
For the sake of simplicity, the ltcluster
user is created
as a superuser. If desired, it's possible to create the ltcluster
user as a normal user. However for certain operations superuser permissions
are required; in this case the command line option --superuser
can be provided to specify a superuser.
It's also assumed that the ltcluster
user will be used to make the
replication connection from the standby to the primary; again this can be
overridden by specifying a separate replication user when registering each node.
ltcluster will install the ltcluster
extension, which creates a
ltcluster
schema containing the ltcluster's metadata tables as
well as other functions and views. We also recommend that you set the
ltcluster
user's search path to include this schema name, e.g.
ALTER USER ltcluster SET search_path TO ltcluster, "$user", public;