[ADMIN] error message
Hello there... I've compile postgreSQL 7.0.2 but I got an error message...Below is the error... gcc: Internal compiler error: program cc1 got fatal signal 11 gmake[3]: *** [hio.o] Error 1 gmake[3]: Leaving directory `/tmp/postgresql-7.0.2/src/backend/access/heap' gmake[2]: *** [submake] Error 2 gmake[2]: Leaving directory `/tmp/postgresql-7.0.2/src/backend/access' gmake[1]: *** [access.dir] Error 2 gmake[1]: Leaving directory `/tmp/postgresql-7.0.2/src/backend' gmake: *** [all] Error 2 Is it my compiler have problem..For your information I am using - RedHat 6.1 - gcc (egcs-2.91.66) - kernel (2.2.12-20) If I need to update to the new version please inform me... Thanks in advanced Regards Faisal SE
[ADMIN] Redundant databases/real-time backup
Several people have expressed an interest in having the capability to have real time redundancy. I am releasing my kludge solution to the mailing list in hope that others might expand upon it. First, you should dump your database, drop it, and recreate it on the computer to be mirrored. You should also create a fresh copy on the mirroring computer. Most likely, your OIDs are still not going to be in synch. For those of you that use OIDs as a poor man's primary key, it will be necessary for you to write a script that can sync up the oids on both computers (probably best run as a cron script too). I have thought about ways to do this, but I'll leave that to someone else to complete. (PLEASE POST YOUR RESULTS THOUGH!) It is necessary to create/alter the postgresql startup script. I have included a copy of mine. The database to be mirrored must start up with logging enabled: su -l postgres -c '/usr/bin/postmaster -i -D/home/postgres/data >/home/postgres/data/query_log 2>&1 &' In this case I have specified a file called query_log that will maintain a copy of all of the queries that have been executed. I have included a complete copy of my startup script called (unimaginatively) postgresql. For linux users, it should be in /etc/rc.d/init.d I have also attached my pg_options file. For me, this resides in /home/postgres/data. I have found that this file does not seem to affect my query_log, but I incude it for reference for others to use. Next, you should create a line in your /etc/crontab or /var/spool/cron/root file to execute the redundancy script with root level permissions: 0-59/5 * * * * /root/redundancy.pl You should install the redundancy.pl and rederhandler.pl scripts in the same directory. You will, of course, need to modify these scripts to work. Several of my dead ends are still in the scripts commented out. rederhandler.pl is set up to work with qmail instead of sendmail. You should be able to substitute the path to your sendmail program and it should work fine, i.e. /usr/sbin/sendmail instead of /var/qmail/bin/qmail-inject Other points: The query_log can get large rather quickly. You cannot simply issue a rm -rf query_log, touch query_log and chmod. Even with the appropriate permissions the daemon will not write to a new file, for some reason you must restart postgres using the startup script. Perhaps one of the developers has an answer to this problem. Also, my script does not check for network problems The script takes a lot of overhead. For high volume inserts and deletes, depending on how often you run redundancy.pl, sometimes it just cannot keep up. BEWAREit can bog down and crash your server if the backlog becomes too large. Also, I chose to allow it to pass SELECT statements and get back the results from the remote database..I beleive that if you do not use sub-selects, you may grep -v 'SELECT' and improve your performance significantly. Please email comments and suggestions/modifications to me at [EMAIL PROTECTED] or [EMAIL PROTECTED] postgresql all=1 verbose=2 query=4 syslog=2 rederhandler.pl redundancy.pl
Re: [ADMIN] Postgres/Postmaster logging and log rotation
Be sure to stop postgres, rotate your log (or move it out of the /var/log directory and then rotate it), and restart postgresql. That will solve your problem. Hopefully you don't need a 24x7 available database as this might take a few seconds for your server to complete. On Wed, 07 Mar 2001, William L James wrote: > Hi there: > > We are running PostgreSQL 7.0.2 on RedHat Linux 6.2 and > have encountered a few strange problems that continue to > elude us - namely INSERT and DELETE functions that end > abnormally, but do not include any information as to why (the > JDBC connection just seems to have gone away). Trying to > further diagnose the situation, I have been successful in starting > the Postgres logging (by including the following in the postgresql > script - su -l postgresql -c "/usr/bin/pg_ctl -D $PGDATA -p > /usr/bin/postmaster start >>/var/log/postgresql 2>&1"), but > when the weekly logrotate.d function kicks in, Postgres logging > stops. We also have trouble doing a simple restart - I wind up > having to do a stop and then a start minutes later. Can anyone > explain how to get Postgres to log and to be able to rotate the > log periodically? Any information would be appreciated. > > Thanks, > Bill James > I/NET, Inc. > Email: mailto:[EMAIL PROTECTED] > WWW: http://www.inetmi.com > > > > ---(end of broadcast)--- > TIP 6: Have you searched our list archives? > > http://www.postgresql.org/search.mpl -- Thanks, Rodney Hampton veritime.com 248-528-9766 Your analogies DO NOT need to work as long as your code DOES. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [ADMIN] pg_hba.conf and ident authentification
Check the file permissions on pg_hba.conf, I beat my head against the wall with a similar situation. Rodney Hampton ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[ADMIN] Import Database
This is a little odd, and I can't quite figure out how to do it. I have a postgres 7.2.2 database, without the DB_VERSION file, so I'm assuming this is an "alternate location" - as you can tell, I'm not a DBA. Anyway, the machine it was on got hacked, and I backed off the things I thought were important, reinstalled the OS and put the other things, including this DB, back into place. Problem: I don't have the /var/lib/pgsql part of my old installation, and now I have an apparently-good postgres 7.2.2 installation, and an apparently-good database, but I cannot get the postgres server to recognize the old database. Obviously, without this I cannot dump and re-import, so I'm at a bit of a lss as to what to do. Is it possible to tell postgres that a database already exists, and just to use it? (I do know the information on the user who owns the database, and the old passwords and such.) Thanks -jeff ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[ADMIN] Postgres Startup trouble
I can't start postgres using a modified form of the startup script supplied in the contrib directory. I keep getting an error from su saying that "D is an invalid option." Below is the entire script: > #! /bin/sh > > # This is an example of a start/stop script for SysV-style init, such > # as is used on Linux systems. You should edit some of the variables > # and maybe the 'echo' commands. > # > # chkconfig: 2345 85 15 > # > # description: A control script for the postmaster daemon > # > > > # Installation prefix > DIR=/usr/local/pgsql > > # Data directory > PGDATA=/usr/local/pgsql/data > > # Who to run pg_ctl as, should be "postgres". > PGUSER=postgres > > # Where to keep a log file > PGLOG=$PGDATA/serverlog > > ## STOP EDITING HERE > > # The path that is to be used for the script > PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin > > # What to use to start up the postmaster > DAEMON=$DIR/bin/pg_ctl > > set -e > > # Only start if we can find pg_ctl. > test -f $DAEMON || exit 0 > > # Sorce 'em up > . /etc/rc.d/init.d/functions > > # Parse command line parameters. > case $1 in > start) > action "Starting PostgreSQL: " su -l $PGUSER -c "$DAEMON start -D '$PGDATA' >-l $PGLOG" > ;; > stop) > action "Stopping PostgreSQL: " su -l $PGUSER -c "$DAEMON stop -D '$PGDATA' >-m smart" > ;; > restart) > action "Restarting PostgreSQL: " su -l $PGUSER -c "$DAEMON restart -D >'$PGDATA' -m smart" > ;; > status) > su -l $PGUSER -c "$DAEMON status -D '$PGDATA'" > ;; > *) > # Print help > echo "Usage: $0 {start|stop|restart|status}" 1>&2 > exit 1 > ;; > esac > > exit 0 > ---(end of broadcast)--- TIP 3: 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
[ADMIN] how to re-configure postgresql-rpm version
I downloaded postgresql 7.2.1 - rpm version, installed it to my Linux machine and inputted some of my data in postgresql. Now I would like to re-configure my postgresql server by increasing --enable-local and --enable-multibyte=UNICODE options. How should I do? I found all document talking about re-configure tar.gz version not rpm. The main point is that I can not find the ./configure file from rpm version. Please help me. I'm a newbie on Linux and Postgresql. Thanks in Advance. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
[ADMIN] Problems with upgrading 6.3.1 to 6.4
Hello! I've got a problem with converting my old database from version 6.3.1 to 6.4. I tried pg_dumpall, but in the 6.4 psql cannot import it. It crashes with error. Maybe someone knows any other conversion utility? I've got a big database (pg_dumpall result is about 50MB), I am running linux 2.0.36. Regards, - Grych