# PostgreSQL documentation leads to errors

**URL:** <https://community.netdata.cloud/t/postgresql-documentation-leads-to-errors/3907>\
**Category:** Help\
**Tags:** configuration, agent\
**Created:** [February 28, 2023, 12:43pm UTC](https://community.netdata.cloud/t/postgresql-documentation-leads-to-errors/3907 "2023-02-28T12:43:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinrenskers](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/kevinrenskers/32/2643_2.png) [@kevinrenskers](https://community.netdata.cloud/u/kevinrenskers)\
**Post date:** [February 28, 2023, 12:43pm UTC](https://community.netdata.cloud/t/postgresql-documentation-leads-to-errors/3907/1 "2023-02-28T12:43:01Z")

</div>

When following the PostgreSQL docs ([PostgreSQL monitoring with Netdata | Learn Netdata](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/postgres)), it tells you to create a netdata user, give it the pg\_monitor rights, and then to restart the netdata service. That doesn’t actually work, as the default config only uses the postgres user it seems. So how does one properly configure this monitor, for this user, when created as the docs suggested?

---

<div class="post-metadata">

**Author:** ![kevinrenskers](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/kevinrenskers/32/2643_2.png) [@kevinrenskers](https://community.netdata.cloud/u/kevinrenskers)\
**Post date:** [February 28, 2023, 1:04pm UTC](https://community.netdata.cloud/t/postgresql-documentation-leads-to-errors/3907/2 "2023-02-28T13:04:59Z")

</div>

Ok, this worked in the end:

```auto
jobs:
  - name: local
    dsn: 'host=/var/run/postgresql dbname=database_name user=netdata'

```

Would be nice to update the docs.

---

<div class="post-metadata">

**Author:** ![Christopher\_Akritid1](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/christopher_akritid1/32/419_2.png) [@Christopher\_Akritid1](https://community.netdata.cloud/u/Christopher_Akritid1)\
**Post date:** [February 28, 2023, 3:34pm UTC](https://community.netdata.cloud/t/postgresql-documentation-leads-to-errors/3907/3 "2023-02-28T15:34:10Z")

</div>

Thanks for this!  
[[Bug]: Default job for postgresql doesn't include the netdata user · Issue #14628 · netdata/netdata · GitHub](https://github.com/netdata/netdata/issues/14628) was created to fix the issue.

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [February 28, 2023, 4:17pm UTC](https://community.netdata.cloud/t/postgresql-documentation-leads-to-errors/3907/4 "2023-02-28T16:17:40Z")

</div>

Added 2 data collection jobs with `netdata` user in [1104](https://github.com/netdata/go.d.plugin/pull/1104/files).
