dbTalk Databases Forums  

scripting vacuum

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss scripting vacuum in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrew Kelly
 
Posts: n/a

Default scripting vacuum - 05-05-2004 , 06:16 AM






This seems pretty clear, but I wanted to ask in case I'm missing
something.

Given a pg_hba.conf with the single entry of
local all md5
and the desire to call vacuumdb via cron,

is my only hope of success to use 'expect', or is there a way
pass the pw as an arg to vacuumdb? Or is there maybe a way to identify
specific local users like you can with hosts?
You know, something like
local:username all trust
local:allotherusers all md5

I've aways thought of 'expect' as rather cheesy and would love to
avoid it.

TIA

Andy


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: scripting vacuum - 05-05-2004 , 07:26 AM






Andrew Kelly <akelly (AT) transparency (DOT) org> writes:
Quote:
is my only hope of success to use 'expect', or is there a way
pass the pw as an arg to vacuumdb?
Put the password in the Postgres user's ~/.pgpass file.

Quote:
You know, something like
local:username all trust
If you can't do that then you should consider updating to a more recent
version of Postgres. But I'd advise against writing it quite that way,
since the above would let anyone on the local machine into your
database --- they just have to claim to be the postgres user via -U.
You might be able to use "ident" authentication safely, though, if your
platform supports it on local connections.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
  #3  
Old   
Andrew Kelly
 
Posts: n/a

Default Re: scripting vacuum - 05-05-2004 , 08:48 AM



On Wed, 2004-05-05 at 14:26, Tom Lane wrote:
Quote:
Andrew Kelly <akelly (AT) transparency (DOT) org> writes:
is my only hope of success to use 'expect', or is there a way
pass the pw as an arg to vacuumdb?

Put the password in the Postgres user's ~/.pgpass file.
That had me excited for a minute, until I found that it's only
available post 7.3. Unfortunately I'm running 7.2.4 and can't upgrade.

Quote:
You know, something like
local:username all trust

If you can't do that then you should consider updating to a more recent
version of Postgres.
Oh? I wasn't aware that that was even possible.
Wait, lemme guess, it is, but not in my version, right?


Quote:
But I'd advise against writing it quite that way,
since the above would let anyone on the local machine into your
database --- they just have to claim to be the postgres user via -U.
You might be able to use "ident" authentication safely, though, if your
platform supports it on local connections.
Now there's an idea, thanks, Tom.

Andy


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.