I have PostgreSQL 15.3. Then I install pg_stat_monitor. Then when I restart the database, it can’t start with this error:
-- Unit postgresql-15.service has begun starting up.
Jun 20 13:58:12 PostgresqlDB01 postmaster[1864274]: 2023-06-20 13:58:12.997 EEST [1864274] LOG: pgaudit extension initialized
Jun 20 13:58:13 PostgresqlDB01 postmaster[1864274]: 2023-06-20 13:58:12.998 EEST [1864274] FATAL: cannot request additional shared memory outside shmem_request_hook
Jun 20 13:58:13 PostgresqlDB01 postmaster[1864274]: 2023-06-20 13:58:12.998 EEST [1864274] LOG: database system is shut down
Jun 20 13:58:13 PostgresqlDB01 systemd[1]: postgresql-15.service: Main process exited, code=exited, status=1/FAILURE
Jun 20 13:58:13 PostgresqlDB01 systemd[1]: postgresql-15.service: Failed with result 'exit-code'.