ansible-collections / community.postgresql

Manage PostgreSQL with Ansible
https://galaxy.ansible.com/ui/repo/published/community/postgresql/
Other
111 stars 90 forks source link

unsetting shared_preload_libraries leads to crash #744

Closed hunleyd closed 1 month ago

hunleyd commented 1 month ago
          `ALTER SYSTEM SET "shared_preload_libraries" TO ''`

gives the result in the file postgresql.auto.conf shared_preload_libraries = '""' WHICH WILL LEAD TO A CRASH

Originally posted by @Legushka in https://github.com/ansible-collections/community.postgresql/issues/78#issuecomment-2395578612

Andersson007 commented 1 month ago

@hunleyd thanks for creating the issue I'm confused. I've added the queries return value in https://github.com/ansible-collections/community.postgresql/pull/745 (which is ready for review) where we can see in the tests I added that the module executes the following:

- result.queries == ["ALTER SYSTEM SET shared_preload_libraries = ''"]

But if i add another Restart task, the service does not start probably because of the reported behavior. Can it be a bug of postgresql? Could you run the command manually in pgsql on your test instance and check the auto.conf file?

Andersson007 commented 1 month ago

I've installed it and checked with pgsql:

postgres=# ALTER SYSTEM SET shared_preload_libraries = '';
ALTER SYSTEM
postgres=# 
\q
postgres@fedora:~$ grep -r "shared_preload_libraries" 17/data/postgresql*
17/data/postgresql.auto.conf:shared_preload_libraries = '""'

Looks like PG's bug.

Andersson007 commented 1 month ago

how about https://github.com/ansible-collections/community.postgresql/pull/748 ?

hunleyd commented 1 month ago

this is indeed a PG bug @legushka . You should report the bug using the PG bug form