Re: [ADMIN] archive_command
On Wed, 2005-09-28 at 12:08 -0500, Kris Kiger wrote: > My question then is, how do we tell which wal log is X (the one > currently being written to)? You don't say why you need to know? If you really care, you can look at the status files in the archive_status directory underneath pg_xlog. This is where the archiver checks to see for notifications of filled WAL files, then clears the notification afterwards. Only filled WAL filenames are shown. Don't touch the files or you might interfere with the archiver's activities. Best Regards, Simon Riggs ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [ADMIN] archive_command
On Fri, 30 Sep 2005, Simon Riggs wrote: You don't say why you need to know? Not sure why Kris needs to know, but I need to know for PITR and keeping the latest WAL file saved by a script which runs every few minutes as my client does not turn over WAL files very often (about 4/day). If you really care, you can look at the status files in the archive_status directory underneath pg_xlog. This is where the archiver checks to see for notifications of filled WAL files, then clears the notification afterwards. Only filled WAL filenames are shown. I see lots of items like this: 0001001300A4.00AEE2F0.backup.done 0001001300DE.00B8A498.backup.done I presume these correlate with the files in the pg_xlog directory that look like so: 0001001300A4.00AEE2F0.backup 0001001300DE.00B8A498.backup 0001001300DF 0001001300E0 0001001300E1 0001001300E2 0001001300E3 0001001300E4 0001001300E5 0001001300E6 Given that list, does that mean that 0001001300DF is the in use WAL file? -- Jeff Frost, Owner <[EMAIL PROTECTED]> Frost Consulting, LLC http://www.frostconsultingllc.com/ Phone: 650-780-7908 FAX: 650-649-1954 ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [ADMIN] Backing up several tables using pg_dump -t
Thanks Rajesh. Is this on TODO list? I think it's beneficial to be able to backup (or oracle term, export) several tables (NOT only ONE) and restore (import) back to another database for instance from a production DB to a development or staging to prod, etc..) [This is doable in Oracle too via the export/import utilities.] -- Husam -Original Message- From: Rajesh Kumar Mallah [mailto:[EMAIL PROTECTED] Sent: Thursday, September 22, 2005 1:16 PM To: Tomeh, Husam Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Backing up several tables using pg_dump -t man pg_dump seems to say it is not possible -t table --table=table Dump data for table only. It is possible for there to be multi- ple tables with the same name in different schemas; if that is the case, all matching tables will be dumped. Specify both --schema and --table to select just one table. Note: In this mode, pg_dump makes no attempt to dump any other database objects that the selected table may depend upon. There- fore, there is no guarantee that the results of a single-table dump can be successfully restored by themselves into a clean database. On 9/23/05, Tomeh, Husam <[EMAIL PROTECTED]> wrote: > > I'm having problem backing up several tables using pg_dump. When > selecting one table only with the '-t' option, it works just fine. When > I tried to include several tables, pg_dump fails with error that the > tables specified don't exist. Can you show me an example of backing up > several tables using pg_dump. > > Thanks in advance, > > > -- > Husam > > ---(end of broadcast)--- > TIP 6: explain analyze is your friend > > ** > This message contains confidential information intended only for the > use of the addressee(s) named above and may contain information that > is legally privileged. If you are not the addressee, or the person > responsible for delivering it to the addressee, you are hereby > notified that reading, disseminating, distributing or copying this > message is strictly prohibited. If you have received this message by > mistake, please immediately notify us by replying to the message and > delete the original message immediately thereafter. > > Thank you. FADLD Tag > ** > > > ---(end of broadcast)--- > TIP 1: if posting/reading through Usenet, please send an appropriate >subscribe-nomail command to [EMAIL PROTECTED] so that your >message can get through to the mailing list cleanly > ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [ADMIN] db connection and script execution error
1. create db by using postgres manager Lite's create db wizarddb name new_db / host : lost host/port: 5432/login: postgreswhen I tried to connect to this db I got FATAL error, ¡°database new_db doesn¡¯t exist." The above suggest that you haven't created your database (new_db) on the postgres server. --- 2. Then I registered new host on port 5433, tried to connect. I got follwing error, ¡°error connection to server, is the server running on host 127.0.0.1, and allow TCP/IP connection on port 5433?¡± The above error may be due to not setting up your pg_hba.conf correctly to accept TCP/IP connection from your PC. Or it there could be a firewall issue. --- To create a database, you can login to your postgres server as Postgres (or whatever the owner of Postgres is) and issue: createdb your_db_name ; You may want to check the PostgreSQL docs on creating a database. -- -- Husam From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jeff shuSent: Wednesday, September 28, 2005 10:05 AMTo: pgsql-admin@postgresql.orgSubject: [ADMIN] db connection and script execution error Dear pgsql-admin members: I am new to PostgresSql and run into some problems after I installed Posgressql 8.0 and PostgresSql manager 3 Lite. Your advises will be appreciated:) I. can't make connection to databaseII. can't run a script which will created a database.I. can't make connection to database1. create db by using postgres manager Lite's create db wizarddb name new_db / host : lost host/port: 5432/login: postgreswhen I tried to connect to this db I got FATAL error, ¡°database new_db doesn¡¯t exist."2. Then I registered new host on port 5433, tried to connect. I got follwing error, ¡°error connection to server, is the server running on host 127.0.0.1, and allow TCP/IP connection on port 5433?¡± I checked pgadmin menu If this message appears, there are two possible reasons for this: a)either the server isn't running at all. Simply start it. b)The other non-trivial cause for this message is that the server isn't configured to accept TCP/IP requests on the address shown. Modification done: modified postgressql.conf set listen_addresses='*'Do I need to set port = 5432, t hen add port 5433 as well? I still got same error messageII. can't run a script which will created a database.1. run script in EMS postgres manager Literun command create database booktown;¡¤ Error: "ERROR: source database "template1" is being accessed by other users" 2. Run script in pgadmin Create Database "booktown";\connect booktown postgresERROR: syntax error at or near "\" at character 146Please give me some advise, I am kind of struck here. I need information on how to create and connect to a databaseWhere I can find error log message in postgres.org web site which can help me trouble shoot the error message i got. Jeff 9-28-05 Yahoo! for GoodClick here to donate to the Hurricane Katrina relief effort. ** This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged. If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter. Thank you. FADLD Tag**
Re: [ADMIN] db connection and script execution error
> 1. create db by using postgres manager Lite's create db wizard > db name new_db / host : lost host/port: 5432/login: postgres > when I tried to connect to this db I got FATAL error, ¡°database new_db doesn¡¯t exist." *** The above suggest that you haven't created your database (new_db) on the postgres server. --- > 2. Then I registered new host on port 5433, tried to connect. I got follwing error, ¡°error connection to server, is the server running on host 127.0.0.1, and allow TCP/IP connection on port 5433?¡± *** The above error may be due to not setting up your pg_hba.conf correctly to accept TCP/IP connection from your PC. Or it there could be a firewall issue. --- *** To create a database, you can login to your postgres server as Postgres (or whatever the owner of Postgres is) and issue: createdb your_db_name ; You may want to check the PostgreSQL docs on creating a database. -- -- Husam From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jeff shuSent: Wednesday, September 28, 2005 10:05 AMTo: pgsql-admin@postgresql.orgSubject: [ADMIN] db connection and script execution error Dear pgsql-admin members: I am new to PostgresSql and run into some problems after I installed Posgressql 8.0 and PostgresSql manager 3 Lite. Your advises will be appreciated:) I. can't make connection to databaseII. can't run a script which will created a database.I. can't make connection to database1. create db by using postgres manager Lite's create db wizarddb name new_db / host : lost host/port: 5432/login: postgreswhen I tried to connect to this db I got FATAL error, ¡°database new_db doesn¡¯t exist."2. Then I registered new host on port 5433, tried to connect. I got follwing error, ¡°error connection to server, is the server running on host 127.0.0.1, and allow TCP/IP connection on port 5433?¡± I checked pgadmin menu If this message appears, there are two possible reasons for this: a)either the server isn't running at all. Simply start it. b)The other non-trivial cause for this message is that the server isn't configured to accept TCP/IP requests on the address shown. Modification done: modified postgressql.conf set listen_addresses='*'Do I need to set port = 5432, t hen add port 5433 as well? I still got same error messageII. can't run a script which will created a database.1. run script in EMS postgres manager Literun command create database booktown;¡¤ Error: "ERROR: source database "template1" is being accessed by other users" 2. Run script in pgadmin Create Database "booktown";\connect booktown postgresERROR: syntax error at or near "\" at character 146Please give me some advise, I am kind of struck here. I need information on how to create and connect to a databaseWhere I can find error log message in postgres.org web site which can help me trouble shoot the error message i got. Jeff 9-28-05 Yahoo! for GoodClick here to donate to the Hurricane Katrina relief effort. ** This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged. If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter. Thank you. FADLD Tag**
Re: [ADMIN] db connection and script execution error
On Fri, 2005-09-30 at 12:09, Tomeh, Husam wrote: > 1. create db by using postgres manager Lite's create db wizard > > db name new_db / host : lost host/port: 5432/login: postgres > when I tried to connect to this db I got FATAL error, ¡°database > new_db doesn¡¯t exist." Sounds like you created a database named something like: MyDatabase and are now referencing it as mydatabase. Make sure that whatever you call it in the creation wizard you call it that later. and you can save yourself a lot of little headaches by just naming everything, everywhere in lower case. > The above suggest that you haven't created your database (new_db) on > the postgres server. > > --- > > 2. Then I registered new host on port 5433, tried to connect. I got > follwing error, ¡°error connection to server, is the server running on > host 127.0.0.1, and allow TCP/IP connection on port 5433?¡± > > The above error may be due to not setting up your pg_hba.conf > correctly to accept TCP/IP connection from your PC. Or it there could > be a firewall issue. Note that you also have to edit postgresql.conf to get a database to answer sometimes as well. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq