Re: [GENERAL] using warm standby with drbd???

2008-03-04 Thread Alan Hodgson
On Tuesday 04 March 2008, libra dba [EMAIL PROTECTED] wrote: How else can i replicate the wal_files? ( i don't want to user common file system ,,, NFS,,, etc.)? scp Another thing which i want to ask is that if we are generating archives every 1 minute. then what happens to the data which

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Alan Hodgson
On Thursday 28 February 2008, John Evans [EMAIL PROTECTED] wrote: I've heard that upgrading to 8.2 or 8.3 will allow me to setup a timeout value for WAL log creation, but upgrading at this time is not an option for various reasons. Any insight that you can provide will be greatly

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Alan Hodgson
On Thursday 28 February 2008, Erik Jones [EMAIL PROTECTED] wrote: Or, even simpler: SELECT pg_switch_xlog(); The original poster is using 8.1. -- Alan ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] installing in another directory

2008-02-08 Thread Alan Hodgson
On Friday 08 February 2008, Hua-Ying Ling [EMAIL PROTECTED] wrote: Hi, I'm trying to install postgresql in a custom directory. when I run rpm --prefix I'm getting a package is not relocatable error. Suggestions on how do I get around this? Build your own package, or install from source.

Re: [GENERAL] Disk configurations....

2008-01-24 Thread Alan Hodgson
On Thursday 24 January 2008, Nathan Wilhelmi [EMAIL PROTECTED] wrote: Hello - Typically case of a software guy needing to spec hardware for a new DB server. Further typified case of not knowing exact amount of data and I/O patterns. So if you were to spec a disk system for a new general

Re: [GENERAL] How to automate password requests?

2007-11-28 Thread Alan Hodgson
On Wednesday 28 November 2007, Marten Lehmann [EMAIL PROTECTED] wrote: Hello, I'm trying to automate some postgresql scripts, but I cannot find a way to pass a password directly to commands like pg_dump psql and so on. Even a echo password | psql doesn't work, the password prompt of psql

Re: [GENERAL] Resurrected data files - problem?

2007-11-08 Thread Alan Hodgson
On Thursday 08 November 2007, Albe Laurenz [EMAIL PROTECTED] wrote: Can you give me a good reason why? Try re-reading the instructions on backup in the manual. I know them well. That is why I ask if this questionable procedure could lead to damage. You cannot backup a live database with a

Re: [GENERAL] SQL spec/implementation question: UPDATE

2007-10-22 Thread Alan Hodgson
On Sunday 21 October 2007, Kevin Hunter [EMAIL PROTECTED] wrote: Heh. And as Tom points out downthread, that shortcut probably doesn't gain anything in the long run. Considering how expensive updates are in PostgreSQL, I suspect that isn't true. However, the current behaviour does seem to be

Re: [GENERAL] Resetting SEQUENCEs

2007-10-18 Thread Alan Hodgson
On Thursday 18 October 2007, Laurent ROCHE [EMAIL PROTECTED] wrote: Hi, I am quite surprised I could not find a way to automatically reset the value of a sequence for all my tables. Of course, I can write: SELECT setval('serial', max(id)) FROM distributorsBut if I reload data into all my

Re: re[GENERAL] lations does not exist

2007-10-18 Thread Alan Hodgson
On Tuesday 16 October 2007, ctorres [EMAIL PROTECTED] wrote: Hi, I doing a simple insert into a table re Perl/DBI INSERT INTO party (party_id, party_type_id, description, status_id) VALUES ($partyId, 'PERSON', 'Initial Import','PARTY_ENABLED') and I'm

Re: [GENERAL] Importing MySQL dump into PostgreSQL 8.2

2007-10-15 Thread Alan Hodgson
On Friday 12 October 2007, wido [EMAIL PROTECTED] wrote: hi! but what happens when somebody sent you a dump file and you can't convert the tables? all i have is a 116MB sql file, and i won't convert it by hand :P Restore it into MySQL and then extract it in whatever form you like. Free

Re: [GENERAL] DB errors

2007-10-12 Thread Alan Hodgson
On Friday 12 October 2007, Akash Garg [EMAIL PROTECTED] wrote: We had a crash of one of our db systems last night. After doing a fsck of he file system and getting the db backup, we're getting a lot of these messages in our logs. The DB will also occasionally crash now. Oct 12 07:40:16

Re: RES: [GENERAL] 8.2.4 selects make applications wait indefinitely

2007-10-11 Thread Alan Hodgson
On Thursday 11 October 2007, Carlos H. Reimer [EMAIL PROTECTED] wrote: Don´t know but apparently the problem is not an issue in the client, as I´m able to connect and do the select * in other 8.2.4 servers. Don´t know what kind of tests I should do to help fixing this problem. Any

Re: [GENERAL] more problems with count(*) on large table

2007-10-01 Thread Alan Hodgson
On Monday 01 October 2007, Mike Charnoky [EMAIL PROTECTED] wrote: This is strange... count(*) operations over a period of one day's worth of data now take ~1-2 minutes to run or ~40 minutes. It seems that the first time the data is queried it takes about 40 minutes. If I try the query again,

Re: [GENERAL] Upgrading PG

2007-10-01 Thread Alan Hodgson
On Monday 01 October 2007, Gauthier, Dave [EMAIL PROTECTED] wrote: I'm going to move from v7.4.13 to v8.2.0 (suse-64). I have 2 pre-existing DBs. Do I need to convert or port them to v8 in any way after I start up with a v8 postmaster? All major version upgrades require a dump and reload.

Re: [GENERAL] Problem dropping table

2007-09-18 Thread Alan Hodgson
On Tuesday 18 September 2007 10:30, Ken Logan [EMAIL PROTECTED] wrote: When we try to drop the table we get the error: ERROR: member_pkey is an index You have to remove the table from it's Slony set before you can drop it. Slony does some hackish things to subscriber tables that make them

Re: [GENERAL] Inherited FK Indexing

2007-09-14 Thread Alan Hodgson
On Friday 14 September 2007, Ketema Harris [EMAIL PROTECTED] wrote: as expected I can do select * from states and get everything out of the child table as well. What I can't do is create a FK to the states table and have it look in the child table as well. Is this on purpose? Is it possible

Re: [GENERAL] EXPLAIN ANALYZE not considering primary and unique indices!

2007-08-27 Thread Alan Hodgson
On Monday 27 August 2007 05:21, Sanjay [EMAIL PROTECTED] wrote: Wondering why it is not using the index, which would have been automatically created for the primary key. Because you not only have just one row in the whole table, 100% of them will match the query. In short, one page fetch for a

Re: [GENERAL] DBI/DBD::Pg and transactions

2007-07-18 Thread Alan Hodgson
On Wednesday 18 July 2007 14:29, Roderick A. Anderson [EMAIL PROTECTED] wrote: In the mean time if the script gets triggered again and the first instance isn't finished the second needs to not be able to select those records already being handled. select for update won't do that. It will sit

Re: [GENERAL] postgres - oid question

2007-05-24 Thread Alan Hodgson
On Thursday 24 May 2007 11:31, bruce [EMAIL PROTECTED] wrote: Hi Oliver. Thanks for the reply. I was hoping that there was/is a single cmd that I could use at the beginning of the sql file, that would allow all the tables that are created to be created using the OID. Kind of a set

Re: [GENERAL] WAL files, warm spares and minor versions

2007-04-24 Thread Alan Hodgson
On Tuesday 24 April 2007 10:57, Michael Nolan [EMAIL PROTECTED] wrote: Can WAL files be used to create/update a warm standby on a different minor version of PostgreSQL (eg, using files from a server running 8.2.3 on an 8.2.4 server, or vice-versa?) I suspect this is a FAQ, but I didn't see

Re: [GENERAL] Problem with copying data

2007-04-09 Thread Alan Hodgson
On Friday 06 April 2007 13:17, Klaas Dellschaft [EMAIL PROTECTED] wrote: Hi, I'm currently trying to copy two large files (1.6 GB and 3.5 GB) with a COPY FROM into my database. But I'm waiting for the completion of this job since more than 24h. I'm working under Linux and with top I can see

Re: [GENERAL] invalid byte sequence for encoding UTF8

2007-03-21 Thread Alan Hodgson
On Wednesday 21 March 2007 04:17, Fuzzygoth [EMAIL PROTECTED] wrote: I've searched the forums and found people with similar problems but not much on a way to remedy it. I did try using iconv which was suggested in a thread but it returned an error saying even the 22GB file was too large to

Re: [GENERAL] Questions regarding generating the WAL File.

2007-03-13 Thread Alan Hodgson
On Tuesday 13 March 2007 14:23, Dhaval Shah [EMAIL PROTECTED] wrote: On the reverse, can I indicate to a db in recovery mode to start consuming WAL Files from a particular number? The recovery process is documented at

Re: [GENERAL] OT: Canadian Tax Database

2007-03-08 Thread Alan Hodgson
On Thursday 08 March 2007 08:15, Ted Byers [EMAIL PROTECTED] wrote: They would have satisfied the terms of their contract if, after a few years, and hundreds of man-years, they walked away without delivering anything. That tragedy cost Canada hundreds of millions, if not billions, of dollars

[GENERAL] hardware question - LSI MegaRaid 8480e

2007-03-01 Thread Alan Hodgson
Does anyone have anything specifically good or bad to say about the LSI MegaRaid 8480e, in particular RAID-10 performance, and performance and stability under Linux or any problems with the battery-backed cache option? I'm building a new database server and planning to hook one of these up to

Re: [GENERAL] Post-Reboot Issue: Postmaster Not Accessible

2007-02-28 Thread Alan Hodgson
On Wednesday 28 February 2007 08:12, Rich Shepard [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] ~]$ psql -h localhost -U postgres aesi Welcome to psql 8.1.4, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help

Re: [GENERAL] Option to undo last update on table.

2007-02-15 Thread Alan Hodgson
On Thursday 15 February 2007 10:30, RPK [EMAIL PROTECTED] wrote: Rollback will just rollback to last step (if I am right), but is there a way to bring the table to a certain TimeStamp. You can use a PITR backup to restore a fresh cluster to a time just before your update. If you are not

Re: [GENERAL] Database performance comparison paper.

2007-02-15 Thread Alan Hodgson
On Thursday 15 February 2007 11:29, Shelby Cain [EMAIL PROTECTED] wrote: === 2. What is compared here - Apples and Oranges The setups are as standard as can be. The only principle guiding the installation of all the software is simplicity. No

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Alan Hodgson
On Tuesday 13 February 2007 11:35, Laura McCord [EMAIL PROTECTED] wrote: Here is a question that I am stumped on: Does postgres even recognize last_inserted() as mysql does? I notice that the function fails on that line. Not, that's just a MySQL function. You could, however, look for the

Re: [GENERAL] pg_restore single table privileges/indexes

2007-02-06 Thread Alan Hodgson
On Tuesday 06 February 2007 09:32, Jeff Amiel [EMAIL PROTECTED] wrote: We just switched from 'pg_dumpall to pg_dump -format=c for our nightly backups. I wanted to experiment with restoring a single table (if the need should ever arise) from the dump file. I also notice that the indexes are

Re: [GENERAL] Creating an index on a live database

2007-02-06 Thread Alan Hodgson
On Tuesday 06 February 2007 09:38, John McCawley [EMAIL PROTECTED] wrote: I have a table with a few million rows which has inserts performed on it roughly 50 or so times a minute. It contains a heavily-queried column that I would like to add an index to, but I am concerned about a deadlock

Re: [GENERAL] Installation on Web Server

2007-01-26 Thread Alan Hodgson
Is there some (easy !) way to install just the minimum parts of PostgreSQL I need on the web server? In a sane distribution, you would just do something like yum install php php-pgsql, and that would pull in whatever bits of PostgreSQL are required (shared libraries). -- It's not a war on

Re: [GENERAL] Postgresql Backup

2007-01-26 Thread Alan Hodgson
On Wednesday 24 January 2007 20:57, bala [EMAIL PROTECTED] wrote: 'script.sh' contains PGUSER=postgres pg_dumpall /path/to/backup_date.sql Running the script using crond creates the 0 byte files. But , If i run the script in console , it creates the file with content. Any suggestion

Re: [GENERAL] Cannot Restart PostgreSQL-8.1.4

2007-01-24 Thread Alan Hodgson
On Wednesday 24 January 2007 13:08, Rich Shepard [EMAIL PROTECTED] wrote: OK. I'll go back there (which is where I started this journey). I don't know how to run ldd on a perl script. It'll be whatever version the DBD::Pg module is compiled to use. Just rebuilding and installing an

Re: [GENERAL] triggers and TriggerData

2007-01-22 Thread Alan Hodgson
On Monday 22 January 2007 07:04, Michael Fuhr [EMAIL PROTECTED] wrote: You can pass literal string arguments to a trigger function. See the CREATE TRIGGER documentation and, for PL/pgSQL, TG_ARGV and TG_NARGS. For C see Writing Trigger Functions in C; search for tgnargs and tgargs.

Re: [GENERAL] triggers and TriggerData

2007-01-21 Thread Alan Hodgson
On Sunday 21 January 2007 15:56, gustavo halperin [EMAIL PROTECTED] wrote: First, thank you for your answers about my problem with the function 'CREATE TRIGGER', I have another question about triggers, how can I pass arguments ?? I read about some struct TriggerData *CurrentTriggerData, but I

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Alan Hodgson
On Thursday 18 January 2007 15:54, Steve Atkins [EMAIL PROTECTED] wrote: Anyone else get spam from EnterpriseDB today, talking about Postgresql Support Services? yep. You really would think that even the marketing weenies might know better by now. Hopefully whoever is responsible is

Re: [GENERAL] Spam from EnterpriseDB?

2007-01-18 Thread Alan Hodgson
On Thursday 18 January 2007 16:44, Ron Johnson [EMAIL PROTECTED] Harsh, aren't we? Rich and Garland weren't peddling pr0n or a pump-and-dump stock scam. The fact that they've lost some (a lot of?) respect from potential customers will be pain enough. Spam is spam. I don't care what

Re: [GENERAL] Temp Table Within PLPGSQL Function - Something Awry

2007-01-16 Thread Alan Hodgson
On Tuesday 16 January 2007 10:10, Lenorovitz, Joel [EMAIL PROTECTED] wrote: Greetings, I am trying to work with a TEMP TABLE within a plpgsql function and I was wondering if anyone can explain why the function below, which is fine syntactically, will work as expected the first time it is

Re: [GENERAL] loading data, creating indexes, clustering, vacuum...

2006-12-07 Thread Alan Hodgson
On Thursday 07 December 2006 08:38, Angva [EMAIL PROTECTED] wrote: three commands. For instance I have a hunch that creating the indexes first (as I do now) could slow down the clustering - perhaps the row locations in the indexes all have to be updated as the cluster command shifts their

Re: [GENERAL] Problem with pg_dump

2006-11-10 Thread Alan Hodgson
On Friday 10 November 2006 08:37, Alex Turner [EMAIL PROTECTED] wrote: Sure thing, I hope it's as simple as user error! #!/bin/sh export DATE=`date +%Y%m%d` /usr/local/pgsql/bin/pg_dump -Upostgres -hlocalhost trend /backup/trend.dump.$DATE Thats pretty much it repeated for each database.

Re: [GENERAL] delete performance is extremely slow

2006-11-07 Thread Alan Hodgson
On Tuesday 07 November 2006 22:59, surabhi.ahuja [EMAIL PROTECTED] wrote: I am using postgresql 8.0.0 i have 4 tables a, b, c, d. with foreign key constraints. between table b and a between c and b and between d and c I am doing delete from a delete from a is taking so long . So i just

Re: [GENERAL] RAM Based Disk Drive?

2006-10-31 Thread Alan Hodgson
On Tuesday 31 October 2006 11:48, Merlin Moncure [EMAIL PROTECTED] wrote: you are talking about the gigabyte i-ram. in the database world, you can achieve same thing (actually better) by sticking those ram sticks directly on the motherboard assuming you are in a 64 bit environment and the

Re: [GENERAL] limiting connections on per database/per user basis

2006-10-30 Thread Alan Hodgson
On Monday 30 October 2006 17:17, Hakka Ville [EMAIL PROTECTED] wrote: Dear Sirs, I have to setup shared web-hosting and I think of limiting connections to PostgreSQL cluster on database/user basis. Any idea how to do that ? I simply don't want situation when single user (on of hundreds)

Re: [GENERAL] Effect of large text field data on queries

2006-10-26 Thread Alan Hodgson
On Thursday 26 October 2006 12:51, Glen Parker [EMAIL PROTECTED] wrote: Why would very large text values effect the speed of a seq scan that does not actually evaluate those values? Seq scan reads the whole table. The limiting factor is the size of the table on disk. -- If a nation expects

Re: [GENERAL] schema 8.1.5

2006-10-26 Thread Alan Hodgson
On Thursday 26 October 2006 14:04, km [EMAIL PROTECTED] wrote: so that when the user logis in and accesses a database via psql he should be able to land into his schema. how do i do that ? any tips ? alter role rolename set search_path=path1[,path2...]; -- Ginsberg's Theorem: 1) You can't

Re: [GENERAL] Row versions and indexes

2006-09-28 Thread Alan Hodgson
On Thursday 28 September 2006 14:58, Jack Orenstein [EMAIL PROTECTED] wrote: How does versioning work for the index? - The update above does not update the index key. Does the index get updated at all? Yes, it does. - If not, then how can an index lookup return the correct version of

Re: [GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Alan Hodgson
On Wednesday 30 August 2006 14:49, Dennis Reaves [EMAIL PROTECTED] wrote: Any suggestion on trying to resolve this? I can't seem to find anything that helps. a) install an operating system that isn't 5 years old. or b) try rebuilding packages from the source RPM. or c) install from source.

Re: [GENERAL] SELECT statement in stored procedure

2006-07-01 Thread Alan Hodgson
On Saturday 01 July 2006 09:08, Alain Roger [EMAIL PROTECTED] wrote: it works but i get all fields from my accounts table. So how can i get only login and status ? Define a composite type that includes only those fields and return SETOF that_new_type instead of SETOF accounts. Or select

Re: [GENERAL] Database connectivity using a unix shell

2006-06-29 Thread Alan Hodgson
On Thursday 29 June 2006 09:08, Jasbinder Bali [EMAIL PROTECTED] wrote: in my bash script where and how do i specify the database connection parameters man psql -- Alan ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will

Re: [GENERAL] Performance Question

2006-06-14 Thread Alan Hodgson
On Wednesday 14 June 2006 13:24, Greg Stark [EMAIL PROTECTED] wrote: One way it would be unequal is if you can do your DELETE as a single query and the insert operation as using a single large COPY FROM. This is definitely the fastest way to update tens of thousands of rows if you know they

Re: [GENERAL] Questions about indexes

2006-06-10 Thread Alan Hodgson
On Saturday 10 June 2006 13:30, Pat Maddox [EMAIL PROTECTED] wrote: I've got a table with that has 5 fields. Nearly every query I make to this table is of the form SELECT * FROM table1 WHERE field1='foo' AND field2=7; It's always those two exact fields. How should I index this to get the

Re: [GENERAL] Backwards index scan

2006-06-06 Thread Alan Hodgson
On June 6, 2006 07:59 am, Carlos Oliva [EMAIL PROTECTED] wrote: We are conducting a simple test to asses if the optimizer ever uses the index. The table has several columns and the select statement is as follows: select * from ord0007 order by prtnbr, ordschdte desc. The index that we added

Re: [GENERAL] Which RPM for RH Linux ES 4? PGDB or RH?

2006-05-30 Thread Alan Hodgson
On Tuesday 30 May 2006 09:39, Philippe Lang [EMAIL PROTECTED] wrote: Hi, I have to install PGSQL 7.4.13 under RH Linux Entreprise Server 4, and I can apparently use either the rpm postgresql--7.4.13-1PGDG.i686.rpm from the Postgresql Development Group, or use the rpm

Re: [GENERAL] Encoding Conversion

2006-05-09 Thread Alan Hodgson
On May 9, 2006 01:03 pm, jef peeraer [EMAIL PROTECTED] wrote: well i recently struggled with the same problem. After a lot of trial and error and reading, it seems that an ascii encoded database can't use its client encoding capabilities ( set client_encoding to utf8 ). i think the easist

Re: [GENERAL] SQL Rule

2006-04-26 Thread Alan Hodgson
On April 26, 2006 02:35 pm, Bert [EMAIL PROTECTED] wrote: CREATE TRIGGER trigger_sum AFTER INSERT OR UPDATE ON test FOR EACH ROW EXECUTE PROCEDURE trigger_test(); The inserting and updating is doing well, but its not summing up the a and b and save it to the c

Re: [GENERAL] WAL archiving and deletion of the WAL segments

2006-04-10 Thread Alan Hodgson
On April 10, 2006 09:28 am, Just Someone [EMAIL PROTECTED] wrote: I implemented wal archiving and it seems to be working. The segments are being copied by the shell script, and in the pg_log file I see this line: LOG: archived transaction log file 0001001D0096 But the file is

Re: [GENERAL] recover from base directory?

2006-04-04 Thread Alan Hodgson
On April 4, 2006 03:52 pm, patrick [EMAIL PROTECTED] wrote: hi, just found about recovery.conf ? should i use it or in my case not having data/global doesn't help. recovery.conf is used to recover from a PITR backup. If you haven't been making PITR backups (which is only possible as of

Re: [GENERAL] WAL Archiving frequency

2006-04-01 Thread Alan Hodgson
On March 31, 2006 10:39 pm, Brendan Duddridge [EMAIL PROTECTED] wrote: Thanks Tom, I just didn't know if that was normal or not. I actually saw 4 WAL files / minute today. I set checkpoint_segments = 128, so maybe that will help. That's normal, if your database is busy. I get up to 6 a

Re: [GENERAL] version problem with pg_dump

2006-03-23 Thread Alan Hodgson
On March 23, 2006 01:32 pm, Brian Kitzberger [EMAIL PROTECTED] wrote: Steve, Okay, not only am I new to PostgreSQL but I am new to Linux with a little experience years ago with Unix. So I didn't know about rpm nor does any one else here. But anyway, the result of running rpm is:

<    1   2   3