Search Postgresql Archives

Re: Postgres Pain Points #3 postgres role

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 11, 2016 at 1:22 PM, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:

The only other thing I have seen is this:

https://help.ubuntu.com/community/PostgreSQL

and it shows:

sudo -u postgres psql postgres


​The second postgres redundant - the default database to connect to is the name of the connecting user.

The relates back to your pg_hba.conf concern.

The default pg_hba.conf allows for the postgres user on the system to connect, via the postgres user in the cluster, ​to the postgres database that is created by default, using a UNIX socket. Among other possibilities "sudo -u postgres" accomplishes the "for the postgres user on the system" portion of the above.  The rest of it is handled by defaults within the psql application.

At this point you can connect as a superuser and setup whatever else you require.  This is the way Ubuntu means for PostgreSQL to be configured initially - via the postgres O/S user on a local UNIX socket.

David J.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux