Hi @Björn Pohl , welcome to Microsoft Q&A forum.
As we already know there are few parameters that need restart of server, so we can prepare a query like below and fire whenever we need to check if restart is needed on the server or not:
select pending_restart from pg_settings where name = 'track_commit_timestamp';
Here I changed the parameter 'track_commit_timestamp' and if the query returns 't'(true), a restart is needed.
After restart:
We can club multiple parameters in 'in clause' and use the same accordingly.
Please let us know if this helps.
----------
If answer helps, please mark it 'Accept Answer'