Thread: been away awhile but postgresql doesn't work for me now

been away awhile but postgresql doesn't work for me now

From
Sherman Willden
Date:
Basic complaint: polgresql 16 doesn't function as I think it should

First Error: postgresql psql server connection failed error

Second Error: Even after modifying /etc/postgresql/16/main/pg_hba.conf
              to trust the system is asking for postgres password.

Some Background: I have used postgresql since somewhere arund 2000. I first used UNIX in 1984 when I was in the USAF. I am now retired at 78 but after retiring from the USAF I worked UNIX type postions at SUN Microsystems and the Compaq to HP merger. I am presently using UBUNTU 24.04 on an HP host. I haven't used postgresql since about 2023 and I thought it would be easy to just do what I did befor. I have several notes I used for the last time I used postgresql but they do not anwer the question I have. I have the postgresql-16 pdfs. Did postgresql change from under me?

Other Information: I can log into postgres using sudo -u postgres -i

What I Want: Can someone tell me from the beginning how to establish my first lo
gin to postgresql for both myself (sherman) and postgres?

Please let me know if you need more infomation.

Thank you;
Sherman

Re: been away awhile but postgresql doesn't work for me now

From
Sherman Willden
Date:
Thanks, I'll look into it. 

On Sat, Jun 21, 2025 at 2:05 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Sherman Willden <sherman.willden@gmail.com> writes:
> Basic complaint: polgresql 16 doesn't function as I think it should
> First Error: postgresql psql server connection failed error
> Second Error: Even after modifying /etc/postgresql/16/main/pg_hba.conf
>               to trust the system is asking for postgres password.

First question: did you restart the PG server, or at least do
"pg_ctl reload", after modifying pg_hba.conf?  It won't notice
config file changes till you do.

Second question: are you sure there's only one PG installation
on the machine?  You might be connecting to a different installation
than you think you are.

None of this stuff has changed greatly in the past couple of years.
My guess is that you don't have the system configured quite the
same as you did before.

                        regards, tom lane