Query to help in debugging

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: bricklen <bricklen(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Query to help in debugging
Date: 2013-01-19 16:05:12
Message-ID: 20130119160512.GA369@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Fri, Jan 18, 2013 at 07:35:43AM -0800, bricklen wrote:
> Please post the results of the following query:
>
> SELECT 'version'::text AS "name",
> version() AS "current_setting"
> UNION ALL
> SELECT name,
> current_setting(name)
> FROM pg_settings
> WHERE NOT source='default'AND NOT name IN
> ('config_file','data_directory','hba_file','ident_file','log_timezone','DateStyle','lc_messages','lc_monetary','lc_numeric','lc_time','timezone_abbreviations','default_text_search_config','application_name','transaction_deferrable','transaction_isolation','transaction_read_only');

Above is a very creative query that was posted to the bugs list by
bricklen. It reports all non-default server settings, plus version().
Here is a realigned version:

SELECT 'version'::text AS name, version() AS current_setting
UNION ALL
SELECT name, current_setting(name)
FROM pg_settings
WHERE source != 'default' AND
name NOT IN
(
'config_file','data_directory','hba_file','ident_file','log_timezone',
'DateStyle','lc_messages','lc_monetary','lc_numeric','lc_time',
'timezone_abbreviations','default_text_search_config','application_name',
'transaction_deferrable','transaction_isolation','transaction_read_only'
);

and the output from my server with an unmodified postgresql.conf:

name | current_setting
-----------------+-------------------------------------------------------------------------------------------------
version | PostgreSQL 9.3devel on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.4.5-8) 4.4.5, 64-bit
client_encoding | UTF8
lc_collate | en_US.UTF-8
lc_ctype | en_US.UTF-8
max_connections | 100
max_stack_depth | 2MB
server_encoding | UTF8
shared_buffers | 128MB
TimeZone | US/Eastern
wal_buffers | 4MB
(10 rows)

I am wondering if we should make this query more widely used, perhaps by
putting it in our docs about reporting bugs, or on our website.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-01-19 16:27:28 Re: BUG #7815: Upgrading PostgreSQL from 9.1 to 9.2 with pg_upgrade/postgreql-setup fails - invalid status retrieve
Previous Message Bruce Momjian 2013-01-19 15:02:42 Re: BUG #7815: Upgrading PostgreSQL from 9.1 to 9.2 with pg_upgrade/postgreql-setup fails - invalid status retrieve

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2013-01-19 16:20:19 Re: Query to help in debugging
Previous Message Jon Erdman 2013-01-19 15:54:57 Re: My first patch! (to \df output)