[SQL] pg_dump/pg_restore question
Freinds I am new to this list, and this is my first message. I hope this is the correct forum, and the question not too stupid/simple. I have a database on a debian stable system... dpkg -l postgresql [snip] ii postgresql 7.2.1-2woody5 Object-relational SQL database, descended fr When I dump a database (as from the man page for pg_restore) pg_dump mydb > mydb.out OK. Get an SQL dump in mydb.out Create a new database creatdb myotherdb Load the dump psql -d myotherdb -f mydb.out psql:mydb.out:4: \connect: FATAL 1: IDENT authentication failed for user "postgres" I have tried adding the line host all 127.0.0.1 255.255.255.255trust to pg_hba.conf but it makes no difference. The only thing I can do is edit the dump file into the part that wants to connect as postgres and the part that wants to connect as worik and run them under their respective logins. How can I set it up so I do not have to do that? What documentation should I be reading? Worik ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [SQL] How to check postgres running or not ?
Assuming it is unix The command ps xau|grep post If it is running it will produce output like... [EMAIL PROTECTED]:~$ ps xau|grep post postgres 880 0.0 0.2 8580 740 ?SSep07 0:31 /usr/lib/postgresql/bin/postmaster postgres 887 0.0 0.2 9536 612 ?SSep07 0:02 postgres: stats buffer process postgres 889 0.0 0.2 8624 632 ?SSep07 0:05 postgres: stats collector process worik25927 0.0 0.2 1612 540 pts/10 S13:54 0:00 grep post [EMAIL PROTECTED]:~$ If it is not running it will produce output like... [EMAIL PROTECTED]:~$ ps xau|grep post worik26094 0.0 0.2 1608 528 pts/10 S13:55 0:00 grep post Sandeep Gaikwad wrote: Hello Sir, I want to know how to check whether postgres database is running or not ? when I give command like ./postmaster -i &, whether all databases in that postgres will run or any one [default] ? If any one, then how to detect that database ? Thanks and regards, Sandeep. - Disclaimer: The contents of this message are confidential and intended to the addressee at the specified e-mail address only. Its contents may not be copied or disclosed to anyone other than the intended recipient. If this e-mail is received in error, please contact Vertex Software Pvt. Ltd immediately on +91 20 4041500 with details of the sender and addressee and delete the e-mail. Vertex Software Pvt. Ltd accepts no responsibility in the event that the onward transmission, opening or use of this message and/or any attachments adversely affects the recipient's systems or data. It is the recipient's responsibility to carry out such virus and other checks as the recipient considers appropriate. - ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [SQL] How to check postgres running or not ?
[snip] Just to enforce the test is better looking for the entire executable path: ps aux | grep /usr/bin/postmaster | grep -v grep Does not work for me! [EMAIL PROTECTED]:~$ ps aux | grep /usr/bin/postmaster | grep -v grep [EMAIL PROTECTED]:~$ ps aux | grep postmaster | grep -v grep postgres 670 0.1 0.6 8544 1688 pts/1S12:33 0:00 /usr/lib/postgresql/bin/postmaster [EMAIL PROTECTED]:~$ So... " ps aux | grep postmaster | grep -v grep " is more reliable(?) cheers Worik Regards Gaetano Mendola ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [SQL] How to check postgres running or not ?
Perhaps I have a bug in pg_ctrl?
This is what I get...
[EMAIL PROTECTED]:~$ ps aux | grep postmaster | grep -v grep
;/usr/lib/postgresql/bin/pg_ctl status
postgres 670 0.0 0.6 8544 1688 pts/1S12:33 0:00
/usr/lib/postgresql/bin/postmaster
pg_ctl: postmaster or postgres is not running
[EMAIL PROTECTED]:~$
cheers
Worik
Jeff Eckermann wrote:
--- Christopher Browne <[EMAIL PROTECTED]> wrote:
In an attempt to throw the authorities off his
trail, [EMAIL PROTECTED] ("Sandeep Gaikwad")
transmitted:
Hello Sir,
I want to know how to check
whether postgres database
is running or not ? when I give command like
./postmaster -i &,
whether all databases in that postgres will run or
any one [default] ?
If any one, then how to detect that database ?
The "standard" way would be "pg_ctl status". "man
pg_ctl" is recommended reading for anyone
administering a PostgreSQL setup.
Well, the way I usually check on what databases are
running is thus:
[EMAIL PROTECTED]:/tmp/mm5/doc> netstat -an | grep PG
Saturday 13:18:30
unix 2 [ ACC ] STREAM LISTENING
2793 /var/run/postgresql/.s.PGSQL.5432
One could presumably script things further to get
more out of that; it
doesn't normally seem worthwhile to do so...
--
output = ("cbbrowne" "@" "ntlug.org")
http://www.ntlug.org/~cbbrowne/postgresql.html
"As long as war is regarded as wicked, it will
always have
its fascination. When it is looked upon as vulgar,
it will cease to be popular."
--Oscar Wilde
---(end of
broadcast)---
TIP 2: you can get off all lists at once with the
unregister command
(send "unregister YourEmailAddressHere" to
[EMAIL PROTECTED])
___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
