<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pg_db_role_setting on Postgres Scripts</title><link>https://www.postgresscripts.com/tags/pg_db_role_setting/</link><description>Recent content in Pg_db_role_setting on Postgres Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>PostgresScripts.com</copyright><lastBuildDate>Tue, 27 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.postgresscripts.com/tags/pg_db_role_setting/index.xml" rel="self" type="application/rss+xml"/><item><title>List Per-Role and Database Settings with pg_db_role_setting</title><link>https://www.postgresscripts.com/post/list-per-role-and-database-settings-with-pg-db-role-setting/</link><pubDate>Tue, 27 Oct 2026 00:00:00 +0000</pubDate><guid>https://www.postgresscripts.com/post/list-per-role-and-database-settings-with-pg-db-role-setting/</guid><description>
&lt;h2 id="list-per-role-and-database-settings-with-pg_db_role_setting"&gt;List Per-Role and Database Settings with pg_db_role_setting&lt;/h2&gt;
&lt;p&gt;A reporting user logs in and gets a &lt;code&gt;work_mem&lt;/code&gt; that matches nothing in &lt;code&gt;postgresql.conf&lt;/code&gt;. On the same server, &lt;code&gt;statement_timeout&lt;/code&gt; differs between two databases, and neither value is in a file. In &lt;a href="https://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt;, &lt;code&gt;ALTER ROLE ... SET&lt;/code&gt; and &lt;code&gt;ALTER DATABASE ... SET&lt;/code&gt; store their defaults in the &lt;a href="https://www.postgresql.org/docs/current/catalog-pg-db-role-setting.html"&gt;&lt;code&gt;pg_db_role_setting&lt;/code&gt;&lt;/a&gt; catalog, and those defaults &lt;a href="https://www.postgresql.org/docs/current/sql-alterrole.html"&gt;override &lt;code&gt;postgresql.conf&lt;/code&gt;&lt;/a&gt; when a session starts. The query below lists every override in the cluster by role and database.&lt;/p&gt;</description></item></channel></rss>