Documentation Database Servers Beat

From FedoraProject

Beat is openThis beat is now ready to have Fedora 25 content added by the beat writer

mysql and postgresql have been updated to use native systemd unit files for startup, in place of the SysV-style init scripts. This should eliminate various unfortunate problems that occurred in Fedora 15 due to systemd's rather poor handling of SysV scripts. Also, handling of cases where the database server is slow to start up is significantly better than it ever was in the SysV scripts, since in systemd there is no reason not to wait until the server is really ready.

In the case of postgresql, the "service postgresql initdb" and "service postgresql upgrade" actions that were supported by the SysV init script cannot be provided by the systemd unit file. There is a new standalone script postgresql-setup that provides these functions. For example, to initialize a new postgresql database, do something like

sudo postgresql-setup initdb

If you need to run more than one postgresql server on the same machine, you can duplicate and modify the postgresql.service file, as is customary with systemd services. Add the name of the new service file when you call postgresql-setup to have it extract the PGDATA setting from that service file instead of postgresql.service.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss are trademarks or registered trademarks of
Red Hat, Inc. or its subsidiaries in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
The Fedora Project is maintained and driven by the community and sponsored by Red Hat. This is a community
maintained site. Red Hat is not responsible for content.