Re: psql on Mac

From: Ozan Kahramanogullari <ozan(dot)kah(at)gmail(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: Andrej Ricnik <andrej(dot)groups(at)gmail(dot)com>, Jeff Frost <jeff(dot)frost(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: psql on Mac
Date: 2018-10-24 12:02:14
Message-ID: CAPiqqLnoSDKzAWYQn_KpGVzfd84LiknHT6BC-MW8-rZJMce8Pg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-novice

I get these:

XXX:~ ozan$ nslookup localhost

Server: 192.168.206.99

Address: 192.168.206.99#53

Name: localhost.unitn.it

Address: 10.31.101.168

------

I first try this:

XXX:~ ozan$ psql -h 127.0.0.1

psql: FATAL: database "ozan" does not exist

------

XXX:~ ozan$ psql -U postgres

psql (10.5)

Type "help" for help.

postgres=# CREATE USER ozan WITH PASSWORD 'parrot';

ERROR: role "ozan" already exists

postgres=# CREATE DATABASE lecture;

ERROR: database "lecture" already exists

postgres=# GRANT ALL PRIVILEGES ON DATABASE lecture to ozan;

GRANT

postgres=# \q

XXX:~ ozan$ psql -h 127.0.0.1

psql: FATAL: database "ozan" does not exist

Ozan's MacBookPro:~ ozan$

-----

XXX:~ ozan$ sudo su

Password:

sh-3.2# psql -h 127.0.0.1

psql: FATAL: role "root" does not exist

On Wed, 24 Oct 2018 at 13:22, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Ozan Kahramanogullari <ozan(dot)kah(at)gmail(dot)com> writes:
> > I am attaching the output of "ps auxww". I am not able to make any sense
> of
> > it, sorry! Maybe you can?
>
> I only see one postmaster:
>
> postgres 70 0.0 0.1 4511528 17908 ?? Ss 11:20AM
> 0:00.18 /Library/PostgreSQL/10/bin/postmaster -D/Library/PostgreSQL/10/data
>
> though it's got the usual collection of child processes:
>
> postgres 211 0.0 0.0 4519444 1708 ?? Ss 11:20AM
> 0:00.00 postgres: bgworker: logical replication launcher
> postgres 209 0.0 0.0 4374376 1120 ?? Ss 11:20AM
> 0:00.48 postgres: stats collector process
> postgres 208 0.0 0.0 4519444 2548 ?? Ss 11:20AM
> 0:00.15 postgres: autovacuum launcher process
> postgres 207 0.0 0.0 4511252 5188 ?? Ss 11:20AM
> 0:00.04 postgres: wal writer process
> postgres 206 0.0 0.0 4511252 2292 ?? Ss 11:20AM
> 0:00.05 postgres: writer process
> postgres 205 0.0 0.0 4511252 2688 ?? Ss 11:20AM
> 0:00.01 postgres: checkpointer process
> postgres 202 0.0 0.0 4366184 828 ?? Ss 11:20AM
> 0:00.00 postgres: logger process
>
> and here's your psql and associated backend process:
>
> root 1011 0.0 0.0 4299336 5720 s000 S+ 12:41PM
> 0:00.03 psql -U postgres
> postgres 1012 0.0 0.0 4511640 2968 ?? Ss 12:41PM
> 0:00.00 postgres: postgres postgres [local] idle
>
> So that all looks pretty normal, and shoots down my idea about two local
> postmasters. That leaves the remote-connection idea. What do you get
> from "nslookup localhost" on the command line? What happens if you
> write "psql -h 127.0.0.1" instead of writing "psql -h localhost"?
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-10-24 12:26:53 BUG #15456: Trigger function using ROW(NEW.*) has wrong columns if table is modified during a session
Previous Message Tom Lane 2018-10-24 11:43:45 Re: Can't start postgresql 11

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2018-10-24 13:01:16 Re: psql on Mac
Previous Message Tom Lane 2018-10-24 11:22:07 Re: psql on Mac