Re: Three Variations of postgresql.conf

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Convey <smconvey(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Three Variations of postgresql.conf
Date: 2015-11-12 17:09:17
Message-ID: CANu8FiwzLGWdmMy3enkJC4kXBiQZcF2Gsr67HZaYbQRxjOEfPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oops, I forgot to mention pg_initicluster, which is used to initiate the
various version/cluster combinations in Ubuntu.
It makes it easier to have several versions and clusters on the same
server, albeit that is not what most people/companies usually do.
eg: In Ubuntu, you could possibly have the following on one server:

Ver Cluster Port Status Owner Data directory Log file
9.1 prod 5432 online postgres /var/lib/postgresql/9.1/prod
/var/log/postgresql/postgresql-9.1-prod.log
9.1 dev 5433 online postgres /var/lib/postgresql/9.1/dev
/var/log/postgresql/postgresql-9.1-dev.log
9.4 prod 5435 online postgres /var/lib/postgresql/9.4/prod
/var/log/postgresql/postgresql-9.4-prod.log
9.4 dev 5436 online postgres /var/lib/postgresql/9.4/dev
/var/log/postgresql/postgresql-9.4-dev.log
9.4 qa 5437 online postgres /var/lib/postgresql/9.4/qa
/var/log/postgresql/postgresql-9.4-qa.log

On Thu, Nov 12, 2015 at 11:56 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 11/12/2015 08:37 AM, Melvin Davidson wrote:
>
>> To clarify.
>>
>> To see the ACTUAL clusters installed, and the LIVE config directories,
>> you use
>> pg_lsclusters.
>>
>
> Actually:
>
> aklaver(at)arkansas:~$ pg_lsclusters
>
> Ver Cluster Port Status Owner Data directory Log file
>
> 9.3 main 5432 down postgres /var/lib/postgresql/9.3/main
> /var/log/postgresql/postgresql-9.3-main.log
>
> 9.4 main 5434 online postgres /var/lib/postgresql/9.4/main
> /var/log/postgresql/postgresql-9.4-main.log
>
> You get the $DATA directories and the log files. The config directories
> are in /etc/postgresql/*
>
>
>> pg_ctlclusters then can control each individual cluster
>>
>> So, for example, since apparently you have the 9.4 version of PostgreSQL,
>> pg_ctlcluster 9.4 main status
>> would probably show you that the 9.4 version of PostgreSQL is active and
>> will also show you the command line arguments used to start it.
>>
>>
>> On Thu, Nov 12, 2015 at 11:29 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
>> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>>
>> Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> writes:
>> > On 11/12/2015 08:07 AM, Melvin Davidson wrote:
>> >> In Ubuntu 14.10, there are three variations of the postgresql.conf
>> >> configuration file, as follows:
>> >>
>> >> /var/lib/postgresql/9.4/main/postgresql.auto.conf
>> >> /usr/lib/tmpfiles.d/postgresql.conf
>> >> /etc/postgresql/9.4/main/postgresql.conf
>>
>> FWIW, I would imagine that /usr/lib/tmpfiles.d/postgresql.conf is
>> a configuration file for the system's tmp-file-cleaner daemon
>> (probably telling it not to flush some postgres-related files),
>> not a PG config file at all. If you look into it you'll likely
>> find that it doesn't look anything like PG configuration data.
>>
>> As already noted, postgresql.auto.conf is not for hand-editing.
>>
>> regards, tom lane
>>
>>
>>
>>
>> --
>> *Melvin Davidson*
>> I reserve the right to fantasize. Whether or not you
>> wish to share my fantasy is entirely up to you.
>>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message anj patnaik 2015-11-12 18:02:10 get this warning from pgAdmin
Previous Message Adrian Klaver 2015-11-12 16:56:36 Re: Three Variations of postgresql.conf