pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedQuery to help in debugging
2+ messages / 2 participants
[nested] [flat]
* Query to help in debugging
@ 2013-01-19 16:05 Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 2+ messages in thread
From: Bruce Momjian @ 2013-01-19 16:05 UTC (permalink / raw)
To: bricklen <bricklen@gmail.com>; +Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
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@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Query to help in debugging
@ 2013-01-19 16:46 Tom Lane <tgl@sss.pgh.pa.us>
parent: Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2013-01-19 16:46 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: bricklen <bricklen@gmail.com>; PostgreSQL-development <pgsql-hackers@postgresql.org>
Bruce Momjian <bruce@momjian.us> writes:
> 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.
I find the manual exclusion list to be poor style, and not at all
future-proof. Maybe we could use
select name, setting, source from pg_settings
where source not in ('default', 'override');
This would print a few not-all-that-interesting settings made by initdb,
but not having to adjust the exclusion list for different versions is
easily worth that. I think the source column is potentially useful when
we're casting this type of fishing net, too.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2013-01-19 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-01-19 16:05 Query to help in debugging Bruce Momjian <bruce@momjian.us>
2013-01-19 16:46 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox