Обсуждение: PGPASSWORD

Поиск
Список
Период
Сортировка

PGPASSWORD

От
"Mr. Dan"
Дата:
Hi,

When I was running 8.0.X on linux, I didn't have to include the postgres -P
password in my shell scripts(.sh).  After I switched to 8.1.X, I've had to
include the -P PASSWORD ****** in all my scripts.  I'm thinking I'll just
add PGPASSWORD as a postgres environment variable instead.   I did start
running 8.1.X on a port that is different from the default, so I added
PGPORT as an environment variable, so I don't have to include -p PORT
NUMBER.  Has anyone else noticed they had to start including a password for
the postgres user in 8.1.X?  Is there any concern to adding PGPASSWORD as an
environment variable.

Thanks for any feedback,
~DjK



Re: PGPASSWORD

От
"Milen A. Radev"
Дата:
Mr. Dan написа:
> Hi,
>
> When I was running 8.0.X on linux, I didn't have to include the postgres
> -P password in my shell scripts(.sh).  After I switched to 8.1.X, I've
> had to include the -P PASSWORD ****** in all my scripts.  I'm thinking
> I'll just add PGPASSWORD as a postgres environment variable instead.   I
> did start running 8.1.X on a port that is different from the default, so
> I added PGPORT as an environment variable, so I don't have to include -p
> PORT NUMBER.  Has anyone else noticed they had to start including a
> password for the postgres user in 8.1.X?  Is there any concern to adding
> PGPASSWORD as an environment variable.
>

See the paragraph about "PGPASSWORD" at
http://www.postgresql.org/docs/8.1/static/libpq-envars.html - it
recommends the use of "~/.pgpass" file.


BTW I can't seem to find any reference to a "-P" parameter related to
supplying a password.


--
Milen A. Radev

Re: PGPASSWORD

От
"Mr. Dan"
Дата:

Thanks Milen!

I use -P is bash shell scirpts.  It used with with pgbench.
see pgbench --help.

~DjK



Re: PGPASSWORD

От
"Jim C. Nasby"
Дата:
Depending on your actual config, you could well be able to set
postgresql up so that it doesn't need any passwords, too. I prefer this
when possible... but you need to understand the rammifications if you
care about your data.

Though, if all you're doing is running pgbench, I'd say just setup
everything for TRUST and be done with it... ;)

On Thu, Feb 23, 2006 at 03:55:28PM -0500, Mr. Dan wrote:
>
>
> Thanks Milen!
>
> I use -P is bash shell scirpts.  It used with with pgbench.
> see pgbench --help.
>
> ~DjK
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

Re: PGPASSWORD

От
Tom Lane
Дата:
"Mr. Dan" <bitsandbytes88@hotmail.com> writes:
> Has anyone else noticed they had to start including a password for
> the postgres user in 8.1.X?

No.  I'll bet a very good dinner that you changed the pg_hba.conf
configuration file when you updated the PG installation.

            regards, tom lane

Re: PGPASSWORD

От
Andy Shellam
Дата:
Look at your pg_hba.conf file - your old configuration might have had a
"trust" authentication set somewhere for your local machine/network IPs,
rendering any password unnecessary.

Andy

Mr. Dan wrote:
> Hi,
>
> When I was running 8.0.X on linux, I didn't have to include the
> postgres -P password in my shell scripts(.sh).  After I switched to
> 8.1.X, I've had to include the -P PASSWORD ****** in all my scripts.
> I'm thinking I'll just add PGPASSWORD as a postgres environment
> variable instead.   I did start running 8.1.X on a port that is
> different from the default, so I added PGPORT as an environment
> variable, so I don't have to include -p PORT NUMBER.  Has anyone else
> noticed they had to start including a password for the postgres user
> in 8.1.X?  Is there any concern to adding PGPASSWORD as an environment
> variable.
>
> Thanks for any feedback,
> ~DjK
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq
>
> !DSPAM:43fe0ff820151195621447!
>
>