Verify that Collect_slow_queries: true is actually enabled.
Your YAML looks correct, but verify that it is actually being used with:
cat /etc/newrelic-infra/integrations.d/postgresql-config.yml
And then restart the agent:
sudo systemctl restart newrelic-infra