Thread: Getting the initdb parameter values
I have an existing postgres database and I want to know what are the values of the parameters that were determined during initdb. Is there any way to know those values ? For example, doc http://www.postgresql.org/docs/8.1/interactive/runtime-config-resource.html says that the max value of ‘shared_buffers’ parameter is determined during initdb. Is there any pg_* table which I look into for such params ?
"Satish Burnwal (sburnwal)" <sburnwal@cisco.com> wrote: > I have an existing postgres database and I want to know what are > the values of the parameters that were determined during initdb. > Is there any way to know those values ? > Is there any pg_* table which I look into for such params? There is: http://www.postgresql.org/docs/8.1/interactive/view-pg-settings.html You could also look in the postgresql.conf file or use the SHOW command. http://www.postgresql.org/docs/8.1/interactive/runtime-config-file-locations.html http://www.postgresql.org/docs/8.1/interactive/sql-show.html -Kevin
Satish Burnwal (sburnwal) wrote: > > I have an existing postgres database and I want to know what are the > values of the parameters that were determined during initdb. Is there > any way to know those values ? > I normally use: select name,current_setting(name) from pg_settings where source='configuration file' To figure out all the things that were set at initdb time from a new running database. You can also look at the postgresql.conf file it generated and search for lines that are not commented out with "#" at the start. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us
su - postgres
psql dbname -c "show all"
> Date: Tue, 13 Apr 2010 13:13:58 -0400
> From: greg@2ndquadrant.com
> To: sburnwal@cisco.com
> CC: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Getting the initdb parameter values
>
> Satish Burnwal (sburnwal) wrote:
> >
> > I have an existing postgres database and I want to know what are the
> > values of the parameters that were determined during initdb. Is there
> > any way to know those values ?
> >
>
> I normally use:
>
> select name,current_setting(name) from pg_settings where
> source='configuration file'
>
> To figure out all the things that were set at initdb time from a new
> running database. You can also look at the postgresql.conf file it
> generated and search for lines that are not commented out with "#" at
> the start.
>
> --
> Greg Smith 2ndQuadrant US Baltimore, MD
> PostgreSQL Training, Services and Support
> greg@2ndQuadrant.com www.2ndQuadrant.us
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
psql dbname -c "show all"
> Date: Tue, 13 Apr 2010 13:13:58 -0400
> From: greg@2ndquadrant.com
> To: sburnwal@cisco.com
> CC: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Getting the initdb parameter values
>
> Satish Burnwal (sburnwal) wrote:
> >
> > I have an existing postgres database and I want to know what are the
> > values of the parameters that were determined during initdb. Is there
> > any way to know those values ?
> >
>
> I normally use:
>
> select name,current_setting(name) from pg_settings where
> source='configuration file'
>
> To figure out all the things that were set at initdb time from a new
> running database. You can also look at the postgresql.conf file it
> generated and search for lines that are not commented out with "#" at
> the start.
>
> --
> Greg Smith 2ndQuadrant US Baltimore, MD
> PostgreSQL Training, Services and Support
> greg@2ndQuadrant.com www.2ndQuadrant.us
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin