Re: [GENERAL] Connect to SQL Server via ODBC from Postgresql

2008-01-09 Thread Joshua D. Drake
Ow Mun Heng wrote: On Tue, 2008-01-08 at 23:16 -0800, Joshua D. Drake wrote: Ow Mun Heng wrote: On Wed, 2008-01-09 at 08:41 +0200, Sim Zacks wrote: Another way of doing this, without dblink, is using an unsecured language (plpython, for example) is to connect to the sql server using odbc and

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Joshua D. Drake
Sim Zacks wrote: We use postgresql because it is open source, we have in-house experience to deal with it so we don't have any extra support costs and we don't need the features that are offered in commercial products that PostGreSQL does not have. We also don't need the speed that commercial

[GENERAL] PgSql Mirroring/Fail Over Server

2008-01-09 Thread Rayudu Madhava
Sir, I am very new to Pgsql. I have a server serving 200 clients. I want to prepare a failover /mirroring server which in case the original server fails should take over automatically. Kindly Guide me. With Regards, Rayudu.

[GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 09 Jan 2008 00:06:45 -0800 Joshua D. Drake [EMAIL PROTECTED] wrote: Granted there are scenarios where others are FASTER (SELECT COUNT(*)) but I find that if you are doing those items, you normally have a weird design anyway. Sincerely, Sincerely, would you make an example of such a

[GENERAL]

2008-01-09 Thread Evgeny Shepelyuk
-- Best Regards Evgeny K. Shepelyuk ---(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

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Dann Corbit
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Ivan Sergio Borgonovo Sent: Wednesday, January 09, 2008 1:30 AM To: pgsql-general@postgresql.org Subject: [GENERAL] count(*) and bad design was: Experiences with extensibility On Wed,

[GENERAL] data transfer/migrate from win to linux

2008-01-09 Thread Antonio Muñoz
Hello. After looking for a way to transfer PostgreSQL/PostGIS data from windowsXP to linux (Ubuntu 7.10), I did not find it. Please, does anyone know an easy way or free tool for it. Thanks in advance Best regards Antonio

Re: [GENERAL] data transfer/migrate from win to linux

2008-01-09 Thread Harald Armin Massa
Antonio, After looking for a way to transfer PostgreSQL/PostGIS data from windowsXP to linux (Ubuntu 7.10), I did not find it. Please, does anyone know an easy way or free tool for it. I do this via pg_dump on the sender and pg_restore or psql -f on the receiver site. Both are included

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 9 Jan 2008 01:39:34 -0800 Dann Corbit [EMAIL PROTECTED] wrote: On Wed, 09 Jan 2008 00:06:45 -0800 Joshua D. Drake [EMAIL PROTECTED] wrote: Granted there are scenarios where others are FASTER (SELECT COUNT(*)) but I find that if you are doing those items, you normally have a

[GENERAL] Insert waiting for update?

2008-01-09 Thread Ashish Karalkar
Dear list members,I am having table with 4M rows.I am trying to update all these rows with statementupdate mytable set mycolumn=0;At the same time there are insert happening on the table.but all these insert are in waiting mode. does update is locking the table for insert?does insert and update

[GENERAL] performance differences of major versions

2008-01-09 Thread Willy-Bas Loos
Hi, Are there any benchmarks that compare different major versions of PostgreSQL? Cheers, WBL

Re: [GENERAL] performance differences of major versions

2008-01-09 Thread Pavel Stehule
Hello pgbench test - default configuration Verze 7.3.15 7.4.13 8.0.8 8.1.4 8.2.beta1 8.3beta1 tps 311 340 334 398 423 585 but pgbench is simple test and thise numbers hasnot great value. Regards Pavel On 09/01/2008, Willy-Bas Loos [EMAIL PROTECTED] wrote:

[GENERAL] Startup scripts - Use -m fast or smart?

2008-01-09 Thread Glyn Astill
Hi chaps, I've just changed my startup scripts to use the linux one supplied in contrib. I noticed this uses the -m fast argument for start and stop. Before I setup the scripts I was using -m smart to make sure all queries were finished before shutting dowm on all but my WAL slave. I was going

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Harald Armin Massa
Ivan, Please forgive my naiveness in this field but what does it mean an exact count and what other DB means with an exact count and how other DB deal with it? PostgreSQL will give you an exact count of the contents of the database as it is in the moment you begin your count. (i.e. the

Re: [GENERAL] Read/Write restriction mechanism

2008-01-09 Thread Michael Glaesemann
On Jan 9, 2008, at 1:39 , Naz Gassiep wrote: In a PHP project I have several functions that I use for DB operations. I only want to allow one of them to write, all the others are for reading only. (Using DB level perms are out, as this is the function usage I'm trying to control, not

Re: [GENERAL] Startup scripts - Use -m fast or smart?

2008-01-09 Thread Albe Laurenz
Glyn Astill wrote: I've just changed my startup scripts to use the linux one supplied in contrib. I noticed this uses the -m fast argument for start and stop. Before I setup the scripts I was using -m smart to make sure all queries were finished before shutting dowm on all but my WAL

Re: [GENERAL] Insert waiting for update?

2008-01-09 Thread Ashish Karalkar
--- On Wed, 9/1/08, Ashish Karalkar [EMAIL PROTECTED] wrote:From: Ashish Karalkar [EMAIL PROTECTED]Subject: [GENERAL] Insert waiting for update?To: "pggeneral" pgsql-general@postgresql.orgCc: [EMAIL PROTECTED]Date: Wednesday, 9 January, 2008, 4:29 PMDear list members,I am having table with 4M

Re: [GENERAL] Startup scripts - Use -m fast or smart?

2008-01-09 Thread Glyn Astill
Thanks Laurenz, that's a good point, I shall leave them as is. Glyn --- Albe Laurenz [EMAIL PROTECTED] wrote: Glyn Astill wrote: I've just changed my startup scripts to use the linux one supplied in contrib. I noticed this uses the -m fast argument for start and stop. Before I

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread A. Kretschmer
am Wed, dem 09.01.2008, um 9:02:23 -0500 mailte Josh Harrison folgendes: Hi, When restoring the pg_dumped data thro psql does the rows of the table are restored in the same order? ie for example if Table A has rows r1,r2,r3,r4,r5 in this order, then if I pg_dump and restore it to another

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 9 Jan 2008 13:04:39 +0100 Harald Armin Massa [EMAIL PROTECTED] wrote: Ivan, Please forgive my naiveness in this field but what does it mean an exact count and what other DB means with an exact count and how other DB deal with it? PostgreSQL will give you an exact count of the

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 9:12 AM, A. Kretschmer [EMAIL PROTECTED] wrote: am Wed, dem 09.01.2008, um 9:02:23 -0500 mailte Josh Harrison folgendes: Hi, When restoring the pg_dumped data thro psql does the rows of the table are restored in the same order? ie for example if Table A has rows

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Alvaro Herrera
Josh Harrison escribió: Fine. I can use order by when I want to order it in terms of some columns. But What if I want to maintain the same order as in the database1? ie., I want my rows of TableABC in Database2 to be the same order as the rows in TableABC in Database 1 ??? You can't. --

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Sim Zacks
Using count(*) is not bad design, though generally it makes sense to use it with a where. Saying using count(*) is bad design means that the only design that you can visualize is the specific one that you are using. There are tons of real world examples where you need count. That is why so

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread A. Kretschmer
am Wed, dem 09.01.2008, um 14:07:13 + mailte Raymond O'Donnell folgendes: On 09/01/2008 14:02, Josh Harrison wrote: When restoring the pg_dumped data thro psql does the rows of the table are restored in the same order? ie for example if Table A has rows r1,r2,r3,r4,r5 in this order,

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Clodoaldo
2008/1/9, Sim Zacks [EMAIL PROTECTED]: The reason companies go with the closed source, expensive solutions is because they are better products. Not necessarily. FOSS products don't have a selling team to persuade and bribe people. Expensive solutions, and that is in part what make them

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread A. Kretschmer
am Wed, dem 09.01.2008, um 9:45:11 -0500 mailte Josh Harrison folgendes: What if I want to maintain the same order as in the database1? ie., I want my rows of TableABC in Database2 to be the same order as the rows in TableABC in Database 1 ??? For what reason? Again: there is no order

[GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
Hi, When restoring the pg_dumped data thro psql does the rows of the table are restored in the same order? ie for example if Table A has rows r1,r2,r3,r4,r5 in this order, then if I pg_dump and restore it to another database, will it have the rows in the same order r1,r2,r3,r4,r5? Does this apply

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Raymond O'Donnell
On 09/01/2008 14:02, Josh Harrison wrote: When restoring the pg_dumped data thro psql does the rows of the table are restored in the same order? ie for example if Table A has rows r1,r2,r3,r4,r5 in this order, then if I pg_dump and restore it to another database, will it have the rows in the

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 9:35 AM, A. Kretschmer [EMAIL PROTECTED] wrote: am Wed, dem 09.01.2008, um 14:07:13 + mailte Raymond O'Donnell folgendes: On 09/01/2008 14:02, Josh Harrison wrote: When restoring the pg_dumped data thro psql does the rows of the table are restored in the same order?

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 9:59 AM, A. Kretschmer [EMAIL PROTECTED] wrote: am Wed, dem 09.01.2008, um 9:45:11 -0500 mailte Josh Harrison folgendes: What if I want to maintain the same order as in the database1? ie., I want my rows of TableABC in Database2 to be the same order as the rows in TableABC

Re: [GENERAL] Insert waiting for update?

2008-01-09 Thread Albe Laurenz
Ashish Karalkar wrote: I am having table with 4M rows. I am trying to update all these rows with statement update mytable set mycolumn=0; At the same time there are insert happening on the table. but all these insert are in waiting mode. does update is locking the table for insert?

Re: [GENERAL] XML path function

2008-01-09 Thread x asasaxax
My Postgre version its the 8.2. I´ve reached to do the path i wanted, but when i do a explain analyze on the select it return 500 miliseconds. Is this a good search? Is there a way to slow down this time with postgre 8.3? What is a good time for xml xpath´s? Thanks 2008/1/8, x asasaxax [EMAIL

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Sim Zacks
I believe I was misunderstood. The fact that a product is closed source does not make it a better product. Some companies that are using Oracle would be better off using PostgreSQL. Other companies that need the features that Oracle offers would not be better off using Postgresql. However,

[GENERAL] Installation problem: failed to initialize lc_messages to

2008-01-09 Thread Stefan Schwarzer
Hi there, I am trying to install Postgres 8.1.11 on Mac Leopard. Compilation was ok. Now, the initdb has some problems: $ /usr/local/pgsql/bin/initdb -D --locale=C /Users/schwarzer/Documents/ data_postgres ... selecting default max_connections ... 10 selecting default shared_buffers ...

Re: [GENERAL] Insert waiting for update?

2008-01-09 Thread Ashish Karalkar
Thanks for the replayI think you missed on second detail mail :For more details:I have two tables master,child.with child having fk to master.Now that master table contains 4M rows . while I update them (Master table) the inserts are going into waiting mode on child table.Update acquired row

Re: [GENERAL] PgSql Mirroring/Fail Over Server

2008-01-09 Thread Scott Marlowe
On Jan 9, 2008 3:24 AM, Rayudu Madhava [EMAIL PROTECTED] wrote: Sir, I am very new to Pgsql. I have a server serving 200 clients. I want to prepare a failover /mirroring server which in case the original server fails should take over automatically. Kindly Guide me. Probably the easiest

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Alvaro Herrera
Josh Harrison escribió: Another quick question...When you issue a query like this select * from dummy limit 10 What 10 rows are fetched? like first 10 or last 10 or the first 10 from first block or ? Any 10. (First 10 in the physical table _if_ a seqscan is used). And this query

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Josh Harrison escribió: Fine. I can use order by when I want to order it in terms of some columns. But What if I want to maintain the same order as in the database1? ie., I want my rows of TableABC in Database2 to be the same order as the rows in

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 09 Jan 2008 10:54:21 -0500 Tom Lane [EMAIL PROTECTED] wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Josh Harrison escribió: Fine. I can use order by when I want to order it in terms of some columns. But What if I want to maintain the same order as in the database1? ie., I want

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 09 Jan 2008 16:33:54 +0200 Sim Zacks [EMAIL PROTECTED] wrote: Using count(*) is not bad design, though generally it makes sense to use it with a where. I got the impression from others comments that postgresql under perform other DB even when a where clause on indexed column is

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 10:27 AM, Alvaro Herrera [EMAIL PROTECTED] wrote: Josh Harrison escribió: Another quick question...When you issue a query like this select * from dummy limit 10 What 10 rows are fetched? like first 10 or last 10 or the first 10 from first block or ? Any 10.

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Scott Marlowe
On Jan 9, 2008 8:33 AM, Sim Zacks [EMAIL PROTECTED] wrote: Using count(*) is not bad design, though generally it makes sense to use it with a where. Saying using count(*) is bad design means that the only design that you can visualize is the specific one that you are using. There are tons

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Andrew Sullivan
On Tue, Jan 08, 2008 at 11:37:38PM -0700, Guido Neitzer wrote: Like, I have a situation where I need multi-master just for availability. Two small servers are good enough for that. But unfortunately with PostgreSQL the whole setup is a major pain in the ... Really? I don't think a RAID

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Scott Marlowe
On Jan 9, 2008 10:21 AM, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: On Wed, 09 Jan 2008 16:33:54 +0200 Sim Zacks [EMAIL PROTECTED] wrote: Using count(*) is not bad design, though generally it makes sense to use it with a where. I got the impression from others comments that postgresql

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 05:28:15PM +0100, Ivan Sergio Borgonovo wrote: Does it make any sense *knowing* how the implementation works to load records in a table in a specific order to improve performances? Well, this is more or less what CLUSTER does. There are some cases where happening to

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 05:21:24PM +0100, Ivan Sergio Borgonovo wrote: I got the impression that even counting with clauses on on indexed columns means you'll have to check if columns are still there. That seems to imply that the extra cost make pg under perform compared to other DB even in

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 11:39 AM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Wed, Jan 09, 2008 at 05:28:15PM +0100, Ivan Sergio Borgonovo wrote: Does it make any sense *knowing* how the implementation works to load records in a table in a specific order to improve performances? Well, this is more

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Andreas Kretschmer
Josh Harrison [EMAIL PROTECTED] schrieb: My questions 1. I pg_dumped dummy and Shuffled_dummy (from database1) to another database (database2) When I issued the query in both database (database1 and database2) select * from dummy limit 1000 ( the planner chooses seq scan for this query)

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 11:28 AM, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: On Wed, 09 Jan 2008 10:54:21 -0500 Tom Lane [EMAIL PROTECTED] wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Josh Harrison escribió: Fine. I can use order by when I want to order it in terms of some columns.

Re: [GENERAL] Installation problem: failed to initialize lc_messages to

2008-01-09 Thread Tom Lane
Stefan Schwarzer [EMAIL PROTECTED] writes: FATAL: XX000: failed to initialize lc_messages to LOCATION: InitializeGUCOptions, guc.c:2666 Typically what this means is that you have an improper setting of LANG or LC_ALL in your environment (improper meaning that it doesn't match any of the

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Scott Marlowe
On Jan 9, 2008 10:46 AM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Wed, Jan 09, 2008 at 05:21:24PM +0100, Ivan Sergio Borgonovo wrote: I got the impression that even counting with clauses on on indexed columns means you'll have to check if columns are still there. That seems to imply

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 11:51:16AM -0500, Josh Harrison wrote: accessed frequently. So clustering the table according to one index will yield poor performance to queries involving other indexes. Maybe not poor, but certainly not optimised. Index-only scan is a good solution for this I guess

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 11:03:59AM -0600, Scott Marlowe wrote: And if, for some god forsaken reason, you need to operate on that number, there's always lock table... Yes. You could also store the data in ISAM :-P I feel dirty. :) You should. Go wash your brain out with soap. LOCK TABLE

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 11:56 AM, Andreas Kretschmer [EMAIL PROTECTED] wrote: Josh Harrison [EMAIL PROTECTED] schrieb: My questions 1. I pg_dumped dummy and Shuffled_dummy (from database1) to another database (database2) When I issued the query in both database (database1 and database2)

Re: [GENERAL] Insert waiting for update?

2008-01-09 Thread Albe Laurenz
Ashish Karalkar wrote: I am having table with 4M rows. I am trying to update all these rows with statement update mytable set mycolumn=0; At the same time there are insert happening on the table. but all these insert are in waiting mode. does update is locking the table for insert?

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 12:11 PM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Wed, Jan 09, 2008 at 11:51:16AM -0500, Josh Harrison wrote: accessed frequently. So clustering the table according to one index will yield poor performance to queries involving other indexes. Maybe not poor, but

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 9 Jan 2008 20:01:05 +0100 Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: On Wed, 9 Jan 2008 10:30:45 -0600 Scott Marlowe [EMAIL PROTECTED] wrote: Now, everything's a tradeoff. If PostgreSQL had visibility information in the indexes,

[GENERAL] Prepared Statements

2008-01-09 Thread mljv
Hi, i am trying to understand Prepared Statements. I am asking because i want to understand the impact of Prepared statements to my application. Actually i use Hibernate, DBCP Connection Pool with Postgresql-JDBC Driver and Postgresql 8.1. - I know there is a PREPARE Statement in Postgresql

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 9 Jan 2008 10:30:45 -0600 Scott Marlowe [EMAIL PROTECTED] wrote: Now, everything's a tradeoff. If PostgreSQL had visibility information in the indexes, it would have to lock both the table and index for every write, thus slowing down all the other queries that are trying to access

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 9 Jan 2008 10:58:29 -0800 Joshua D. Drake [EMAIL PROTECTED] wrote: OK... we are getting near to the point. I understand the trade-off problem in storing into indexes id the row is still there. Is there a way to get the count of the rows that *may be* there, If you analyze

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Zoltan Boszormenyi
Ivan Sergio Borgonovo írta: On Wed, 9 Jan 2008 13:04:39 +0100 Harald Armin Massa [EMAIL PROTECTED] wrote: Ivan, Please forgive my naiveness in this field but what does it mean an exact count and what other DB means with an exact count and how other DB deal with it?

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Andrew Sullivan
On Tue, Jan 08, 2008 at 10:59:56PM -0700, Guido Neitzer wrote: Easy multi-master clustering with just two machines. To my knowledge, _nobody_ actually offers that. There are three companies I know of that have done effective marketing of systems. Company O has a very advanced system with

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Scott Marlowe
On Jan 9, 2008 12:58 PM, Joshua D. Drake [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 9 Jan 2008 20:01:05 +0100 Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: On Wed, 9 Jan 2008 10:30:45 -0600 Scott Marlowe [EMAIL PROTECTED] wrote: Now, everything's

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Guido Neitzer
On 09.01.2008, at 09:05, Andrew Sullivan wrote: Easy multi-master clustering with just two machines. To my knowledge, _nobody_ actually offers that. As I said: FrontBase is offering that. cug -- http://www.event-s.net ---(end of

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Scott Marlowe
On Jan 9, 2008 10:05 AM, Andrew Sullivan [EMAIL PROTECTED] wrote: On Tue, Jan 08, 2008 at 10:59:56PM -0700, Guido Neitzer wrote: Easy multi-master clustering with just two machines. To my knowledge, _nobody_ actually offers that. There are three companies I know of that have done

Re: [GENERAL] Prepared Statements

2008-01-09 Thread Martin Gainty
straight from jdbc2.1 doc http://java.sun.com/j2se/1.3/docs/guide/jdbc/spec2/jdbc2.1.frame6.html Statement Statement object to submit a set of heterogeneous update commands together as a single unit, or batch, to the underlying DBMS i.e. execute Statement without parameters

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 9 Jan 2008 13:45:10 -0600 Scott Marlowe [EMAIL PROTECTED] wrote: But my account rep told me it was easy, and he'd never lie to me, would he? @_@ If he uses count(*) maybe, otherwise he is locking your $. -- Ivan Sergio Borgonovo http://www.webthatworks.it

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 09 Jan 2008 20:29:39 +0100 Zoltan Boszormenyi [EMAIL PROTECTED] wrote: The decision to use MVCC in PostgreSQL makes the point moot. ... thanks. In PostgreSQL, COUNT(*) responds closely at the same speed regardless of other transactions. Which way do you prefer? Considering the

Re: [GENERAL] Prepared Statements

2008-01-09 Thread Kris Jurka
On Wed, 9 Jan 2008, [EMAIL PROTECTED] wrote: - I know there is a PREPARE Statement in Postgresql and read the docs. - in PostgresqlJDBC i have a prepareThreshold parameter which i left to default of 5. - in DBCP i have a property poolPreparedStatements, set to true. Does ist just configure

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Martin
In article [EMAIL PROTECTED], Guido Neitzer [EMAIL PROTECTED] wrote: FrontBase. It has an incredibly easy to configure replication and multi master clustering support, is very reliable and can also handle really big databases. I've been working with FrontBase a lot lately and I wouldn't say

Re: [GENERAL] XML path function

2008-01-09 Thread Nikolay Samokhvalov
On Jan 9, 2008 6:00 PM, x asasaxax [EMAIL PROTECTED] wrote: My Postgre version its the 8.2. I´ve reached to do the path i wanted, but when i do a explain analyze on the select it return 500 miliseconds. Is this a good search? Is there a way to slow down this time with postgre 8.3? What is a

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Zoltan Boszormenyi
Ivan Sergio Borgonovo írta: On Wed, 09 Jan 2008 20:29:39 +0100 Zoltan Boszormenyi [EMAIL PROTECTED] wrote: The decision to use MVCC in PostgreSQL makes the point moot. ... thanks. In PostgreSQL, COUNT(*) responds closely at the same speed regardless of other transactions. Which

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 12:24:37PM -0500, Josh Harrison wrote: For example if I have a query like select column2 from ABC where column1 20 and table ABC is indexed on (column1,column2) then Oracle will not goto the heap to fetch the tuples. It will return them from the index itself since

[GENERAL] Kernel kills postgres process - help need

2008-01-09 Thread Hervé Piedvache
Hi, I have a big trouble with a PostgreSQL server ... regulary since I have added 8 Gb of memory, on a server having already 8Gb of memory, I have troubles. Nothing else have changed ... I'm on a Dell server, and all the memory diagnostics from Dell seems to be good ... When I have a lot of

Re: [GENERAL] Kernel kills postgres process - help need

2008-01-09 Thread Jeff Davis
On Wed, 2008-01-09 at 22:57 +0100, Hervé Piedvache wrote: Hi, I have a big trouble with a PostgreSQL server ... regulary since I have added 8 Gb of memory, on a server having already 8Gb of memory, I have troubles. Nothing else have changed ... I'm on a Dell server, and all the memory

Re: [GENERAL] Kernel kills postgres process - help need

2008-01-09 Thread Tom Lane
=?utf-8?q?Herv=C3=A9_Piedvache?= [EMAIL PROTECTED] writes: When I have a lot of connexions (persistante connexions from 6 web apache/php serveurs using PDO, about 110 process on each web servers) on the server, or long request, it's difficult for me to know when it's appening, the kernel

Re: [GENERAL] Kernel kills postgres process - help need

2008-01-09 Thread Hervé Piedvache
Tom, Le mercredi 09 janvier 2008, Tom Lane a écrit : =?utf-8?q?Herv=C3=A9_Piedvache?= [EMAIL PROTECTED] writes: When I have a lot of connexions (persistante connexions from 6 web apache/php serveurs using PDO, about 110 process on each web servers) on the server, or long request, it's

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-09 Thread Chris Browne
[EMAIL PROTECTED] (Zoltan Boszormenyi) writes: which will be fast and depending on the initial value of COUNT(*) it will be very close to the exact figure. You can extend the example with more columns if you know your SELECT COUNT(*) ... WHERE conditions in advance but this way you have to

Re: [GENERAL] Kernel kills postgres process - help need

2008-01-09 Thread Hervé Piedvache
Le mercredi 09 janvier 2008, Jeff Davis a écrit : On Wed, 2008-01-09 at 22:57 +0100, Hervé Piedvache wrote: Hi, I have a big trouble with a PostgreSQL server ... regulary since I have added 8 Gb of memory, on a server having already 8Gb of memory, I have troubles. Nothing else have

Re: [GENERAL] Kernel kills postgres process - help need

2008-01-09 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 09 Jan 2008 14:17:14 -0800 Jeff Davis [EMAIL PROTECTED] wrote: I posted to LKML here: http://kerneltrap.org/mailarchive/linux-kernel/2007/2/12/54202 because linux has a behavior -- which in my opinion is a bug -- that causes the OOM

[GENERAL] Storing and querying boolean fields

2008-01-09 Thread Richard Brown
Hi All, First, some background: - We are using PostgreSQL 7.3.4, and am locked into this version. I would upgrade if I could, but the decision is not mine. - The table referred to below is 120+ million rows, and has a width of 27 columns (15 smallints, 5 integers, 4 dates, 1 integer[], 1 single

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Guido Neitzer
On 09.01.2008, at 13:51, Martin wrote: I've been working with FrontBase a lot lately and I wouldn't say anything about it qualifies as incredibly easy and reliable it is not. We had never ever any reliability issues with FrontBase as long as didn't try to insert garbage. It really doesn't

Re: [GENERAL] Kernel kills postgres process - help need

2008-01-09 Thread Scott Marlowe
On Jan 9, 2008 3:57 PM, Hervé Piedvache [EMAIL PROTECTED] wrote: SNIP 0+0 Jan 9 20:30:48 db2 kernel: Free swap = 15623168kB Jan 9 20:30:48 db2 kernel: Total swap = 15623172kB Jan 9 20:30:48 db2 kernel: Free swap: 15623168kB Jan 9 20:30:48 db2 kernel: oom-killer: gfp_mask=0x84d0,

Re: [GENERAL] Storing and querying boolean fields

2008-01-09 Thread Tom Lane
Richard Brown [EMAIL PROTECTED] writes: - We are using PostgreSQL 7.3.4, and am locked into this version. I would upgrade if I could, but the decision is not mine. They won't even let you update to 7.3.something-reasonably-current ? Resign. Go find a job with a boss whose IQ is above room

Re: [GENERAL] performance differences of major versions

2008-01-09 Thread Bruce Momjian
Pavel Stehule wrote: Hello pgbench test - default configuration Verze 7.3.15 7.4.13 8.0.8 8.1.4 8.2.beta1 8.3beta1 tps 311 340 334 398 423 585 but pgbench is simple test and thise numbers hasnot great value. Wow, even though it is a single benchmark, I have

Re: [GENERAL] Experiences with extensibility

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 12:38:43PM -0700, Guido Neitzer wrote: Easy multi-master clustering with just two machines. As I said: FrontBase is offering that. It looks like a two-phase commit answer, if I'm reading correctly. You can do this today on many systems (including Postgres), but the

Re: [GENERAL] Storing and querying boolean fields

2008-01-09 Thread Greg Smith
On Wed, 9 Jan 2008, Richard Brown wrote: - We are using PostgreSQL 7.3.4, and am locked into this version. I would upgrade if I could, but the decision is not mine. Just make sure you CYA so when said server eats itself the decision maker can't point the finger at you. Give them a copy of a

Re: [GENERAL] performance differences of major versions

2008-01-09 Thread Matthew T. O'Connor
Pavel Stehule wrote: pgbench test - default configuration Verze 7.3.15 7.4.13 8.0.8 8.1.4 8.2.beta1 8.3beta1 tps 311 340 334 398 423 585 but pgbench is simple test and thise numbers hasnot great value. Was that the same version of pgbench each time? Or was it

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Gregory Stark
Josh Harrison [EMAIL PROTECTED] writes: Aggregate (cost=342178.51..342178.52 rows=1 width=0) - Bitmap Heap Scan on person (cost=3120.72..341806.71 rows=148721 width=0) Recheck Cond: (person_id 114600::numeric) - Bitmap Index Scan on person_pk

Re: [GENERAL] Kernel kills postgres process - help need

2008-01-09 Thread Robert Treat
On Wednesday 09 January 2008 18:21, Joshua D. Drake wrote: On Wed, 09 Jan 2008 14:17:14 -0800 Jeff Davis [EMAIL PROTECTED] wrote: I posted to LKML here: http://kerneltrap.org/mailarchive/linux-kernel/2007/2/12/54202 because linux has a behavior -- which in my opinion is a bug -- that

Re: [GENERAL] Storing and querying boolean fields

2008-01-09 Thread Robert Treat
On Wednesday 09 January 2008 20:09, Greg Smith wrote: On Wed, 9 Jan 2008, Richard Brown wrote: - We are using PostgreSQL 7.3.4, and am locked into this version. I would upgrade if I could, but the decision is not mine. Just make sure you CYA so when said server eats itself the decision

Re: [GENERAL] XML path function

2008-01-09 Thread x asasaxax
Can you tell me, in how much time did the query will take with indexes + tsearch2? How much time take a satisfactory query? Can you show me some examples with tsearch2 and xml indexes? Thanks

[GENERAL] vacuum, dead rows, usual solutions didn't help

2008-01-09 Thread Gábor Farkas
hi, i have a postgresql-8.2.4 db, and vacuuming it does not remove the dead rows basically, the problem is this part of the vacuum-output: HINT: Close open transactions soon to avoid wraparound problems. INFO: vacuuming public.sessions INFO: scanned index sessions_pkey to remove 2 row

Re: [GENERAL] vacuum, dead rows, usual solutions didn't help

2008-01-09 Thread Tom Lane
=?iso-8859-1?Q?G=E1bor?= Farkas [EMAIL PROTECTED] writes: basically, the problem is this part of the vacuum-output: INFO: sessions: found 2 removable, 6157654 nonremovable row versions in 478069 pages DETAIL: 6155746 dead row versions cannot be removed yet. The problem is that you've got

[GENERAL] Query to get column-names in table via PG tables?

2008-01-09 Thread Ken Johanson
Hi all, I am looking for expertise on how to program the equivalent to this query, but using the pg_catalog tables, which I understand have fewer security restrictions than information_schema in some cases: SELECT column_name FROM information_schema.columns WHERE table_catalog=? AND

Re: [GENERAL] vacuum, dead rows, usual solutions didn't help

2008-01-09 Thread Joshua D. Drake
Gábor Farkas wrote: hi, i have a postgresql-8.2.4 db, and vacuuming it does not remove the dead rows basically, the problem is this part of the vacuum-output: on the db-server, 4 postgres processes are idle in transaction, but none is older than 2 days. If you have something idle in

Re: [GENERAL] Query to get column-names in table via PG tables?

2008-01-09 Thread Joshua D. Drake
Ken Johanson wrote: Hi all, I am looking for expertise on how to program the equivalent to this query, but using the pg_catalog tables, which I understand have fewer security restrictions than information_schema in some cases: SELECT column_name FROM information_schema.columns WHERE

Re: [GENERAL] vacuum, dead rows, usual solutions didn't help

2008-01-09 Thread Gábor Farkas
Tom Lane wrote: =?iso-8859-1?Q?G=E1bor?= Farkas [EMAIL PROTECTED] writes: basically, the problem is this part of the vacuum-output: INFO: sessions: found 2 removable, 6157654 nonremovable row versions in 478069 pages DETAIL: 6155746 dead row versions cannot be removed yet. The problem is

Re: [GENERAL] vacuum, dead rows, usual solutions didn't help

2008-01-09 Thread Gábor Farkas
Joshua D. Drake wrote: Gábor Farkas wrote: hi, i have a postgresql-8.2.4 db, and vacuuming it does not remove the dead rows basically, the problem is this part of the vacuum-output: on the db-server, 4 postgres processes are idle in transaction, but none is older than 2 days. If you

Re: [GENERAL] Query to get column-names in table via PG tables?

2008-01-09 Thread Ken Johanson
I am looking for expertise on how to program the equivalent to this query, but using the pg_catalog tables, which I understand have fewer security restrictions than information_schema in some cases: SELECT column_name FROM information_schema.columns WHERE table_catalog=? AND table_schema=? AND

  1   2   >