[GENERAL] after vacuum analyze, explain still wrong

2009-06-23 Thread Sim Zacks
I ran vacuum analyze and immediately after I ran my query and the estimated rows are way off. I suspect that it is something in my configuration, but I don't know what. I pasted my postgresql.conf file under the explain results. Thank you Sim GroupAggregate (cost=4542.87..4543.12 rows=1

Re: [GENERAL] Replication

2009-06-23 Thread Mike Christensen
Rubyrep looks very interesting, I just watched their 5min video and looks very easy to setup. Few questions.. The left/right database looks very limiting (you can only replicate two databases at a time).. Their documentation says that the solution is to setup a chain. To keep A, B and C in

Re: [GENERAL] Why my queryes doesnt not use indexes?

2009-06-23 Thread Grzegorz Jaśkiewicz
common mistake is - you didn't vacuum analyze your table at all, after inserting so much data in it. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Graphical representation of query plans

2009-06-23 Thread Viktor Rosenfeld
Thank you, this does indeed look very nice. I would still be interested in alternatives, though. Specifically, I want to be able to quickly see the cost of query subplans á la http://explain-analyze.inf o. A tool that outputs a dot file or something which I can further edit would also

Re: [GENERAL] after vacuum analyze, explain still wrong

2009-06-23 Thread Sim Zacks
increase default_statistics_target to 100 for instance, and retry. I changed the setting, reloaded the configuration (without restarting the server) ran vacuum analyze and the results were the exact same. Any other thoughts? Sim -- Sent via pgsql-general mailing list

Re: [GENERAL] after vacuum analyze, explain still wrong

2009-06-23 Thread Grzegorz Jaśkiewicz
give us postgresql version as well, maybe show query and at least table layout. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Graphical representation of query plans

2009-06-23 Thread Dragan Sahpaski
Viktor Rosenfeld wrote: Thank you, this does indeed look very nice. I would still be interested in alternatives, though. Specifically, I want to be able to quickly see the cost of query subplans á la http://explain-analyze.info. A tool that outputs a dot file or something which I can

Re: [GENERAL] Replication

2009-06-23 Thread Arndt Lehmann
Note to self: better proof reading... On Jun 23, 6:14 pm, Arndt Lehmann arndt.lehm...@gmail.com wrote: If let's say C goes down, then replication between A and B will not be affected. Same if A goes down: replication between B and C will continue. Correct: Let's say B goes down, then

Re: [GENERAL] Replication

2009-06-23 Thread Arndt Lehmann
Hi Mike thanks for your interest in rubyrep. I developed rubyrep. Let me answer your questions. On Jun 23, 4:16 pm, m...@kitchenpc.com (Mike Christensen) wrote: There will be a set of triggers for each replication. Since MySql doesn't support more than one trigger on a table, this approach

Re: [GENERAL] Replication

2009-06-23 Thread Devrim GÜNDÜZ
On Mon, 2009-06-22 at 17:53 -0400, Gerry Reno wrote: We need something as good as MySQL Replication. Either you did not use MySQL Replication, or you don't know what good means... -- Devrim GÜNDÜZ, RHCE Command Prompt - http://www.CommandPrompt.com devrim~gunduz.org, devrim~PostgreSQL.org,

Re: [GENERAL] Replication

2009-06-23 Thread Devrim GÜNDÜZ
On Mon, 2009-06-22 at 18:28 -0400, Gerry Reno wrote: The only one that is remotely viable is slony and it is so quirky you may as well forget it. Like what? I agree that Slony-I is not a plug-in-play replication solution, but I don't agree that it is so quirky. The rest are in some stage of

Re: [GENERAL] Replication

2009-06-23 Thread Grzegorz Jaśkiewicz
2009/6/23 Devrim GÜNDÜZ dev...@gunduz.org: On Mon, 2009-06-22 at 17:53 -0400, Gerry Reno wrote: We need something as good as MySQL Replication. Either you did not use MySQL Replication, or you don't know what good means... He is referring to user friendliness, and you to quality and

Re: [GENERAL] Replication

2009-06-23 Thread Devrim GÜNDÜZ
On Tue, 2009-06-23 at 11:00 +0100, Grzegorz Jaśkiewicz wrote: Either you did not use MySQL Replication, or you don't know what good means... He is referring to user friendliness, and you to quality and reliability. I *used* MySQL replication, and I do know what it means. It is not user

Re: [GENERAL] Replication

2009-06-23 Thread Grzegorz Jaśkiewicz
On Tue, Jun 23, 2009 at 11:03 AM, Devrim GÜNDÜZdev...@gunduz.org wrote: I *used* MySQL replication, and I do know what it means. It is not user friendly, come on. Well, I used it too - it is. If you want to replicate _everything_. Never had troubles with it, but that was database holding

[GENERAL] Cache lookup failed for type 70385664

2009-06-23 Thread DelGurth
For a certain record in our database I'm getting cache lookup failures (ERROR: cache lookup failed for type 70385664). And only for one of the 2 array columns in that record. The table definition is: \d inhoudingen Table public.inhoudingen Column|

Re: [GENERAL] Cache lookup failed for type 70385664

2009-06-23 Thread DelGurth
Oh, probably found the cause of the sudden restarts: Jun 23 09:39:13 ph1phys01 genunix: [ID 603404 kern.notice] NOTICE: core_log: postgres[25239] core dumped: /var/core/core_global.postgres Jun 23 09:45:56 ph1phys01 genunix: [ID 603404 kern.notice] NOTICE: core_log: postgres[26455] core dumped:

Re: [GENERAL] after vacuum analyze, explain still wrong

2009-06-23 Thread Sim Zacks
Sim Zacks wrote: Grzegorz Jaśkiewicz wrote: give us postgresql version as well, maybe show query and at least table layout. The queries look like (The one I'm trying to run is the last one, which is based on all the previous ones).: CREATE OR REPLACE VIEW assembliesstockbatch AS SELECT

Re: [GENERAL] after vacuum analyze, explain still wrong

2009-06-23 Thread Sim Zacks
Grzegorz Jaśkiewicz wrote: give us postgresql version as well, maybe show query and at least table layout. PostgreSQL 8.2.4 on i386-pc-linux-gnu, compiled by GCC i386-pc-linux-gnu-gcc (GCC) 4.1.1 (Gentoo 4.1.1) It is a view based on 4 layers of views with a lot of tables and functions

Re: [GENERAL] after vacuum analyze, explain still wrong

2009-06-23 Thread Grzegorz Jaśkiewicz
On Tue, Jun 23, 2009 at 10:54 AM, Sim Zackss...@compulab.co.il wrote: Sim Zacks wrote: Grzegorz Jaśkiewicz wrote: give us postgresql version as well, maybe show query and at least table layout. The queries look like (The one I'm trying to run is the last one, which is based on all the

[GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL
Hi guys, im tryin to optimize a simple table, suited for contain users. So, my table at the moment is: - CREATE TABLE contacts( id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE, company_id BIGINT, code varchar(10), company_name varchar(120), name varchar(120), surname varchar(120), phone

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
Almost forgot: one fo the heavier select query can be: - SELECT contact.id, contact.company_id, contact.name AS nome, contact.surname AS cognome, contact.email AS email, contact.company_name AS azienda FROM contact WHERE ( lower(contact.company_name) LIKE

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread Grzegorz Jaśkiewicz
it looks ok on explain, that is - the cost isn't too high. So what's the problem ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Graphical representation of query plans

2009-06-23 Thread Viktor Rosenfeld
Much better than explain-analyze.info Many thanks! Am 23.06.2009 um 11:25 schrieb Dragan Sahpaski: Viktor Rosenfeld wrote: Thank you, this does indeed look very nice. I would still be interested in alternatives, though. Specifically, I want to be able to quickly see the cost of query

Re: [GENERAL] Replication

2009-06-23 Thread Jasen Betts
On 2009-06-23, Craig Ringer cr...@postnewspapers.com.au wrote: With Pg it'd break any existing connections, but any database application worth a damn must be able to handle re-issuing transactions due to deadlocks, resource exhaustion, admin statement cancellation etc anyway. Any app that

[GENERAL] Explaining functions.

2009-06-23 Thread Hartman, Matthew
Is there a recommended approach when trying to use EXPLAIN on a function? Specifically, a function that is more than the typical SELECT statement or tiny loop. The one in question that I'm hoping to optimize is around 250 lines. Thanks, Matthew Hartman Programmer/Analyst Information Management,

Re: [GENERAL] Inserting Values into Interval

2009-06-23 Thread BlackMage
Tom Lane-2 wrote: BlackMage dsd7...@uncw.edu writes: I am having a small issue when entering values into the interval field. Say I want to enter a time of 2:03, two minutes and 3 seconds. When I insert that into an interval field, it comes up at 02:03:00, 2 hours, 3 minutes. The only

[GENERAL] About fastpath function call

2009-06-23 Thread Bruce YUAN
Hi, All I hope to call some backend function via PQfn(), such as hash and nbtree. Can we do it? How to do? Many thanks. Best regards, Bruce

Re: [GENERAL] Replication

2009-06-23 Thread Gerry Reno
Craig Ringer wrote: On Mon, 2009-06-22 at 22:20 -0400, Gerry Reno wrote: Here is a link that describes the technique: http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html?page=1 Ah. You were referring to multiple-master replication, and your reference to

Re: [GENERAL] [BUGS] Integrity check

2009-06-23 Thread David Fetter
On Tue, Jun 23, 2009 at 03:38:35PM +0800, Prasad, Venkat wrote: Hello, Please can you assist on following questions. This is an issue for pgsql-general, where I'm redirecting this. * do you any tool to check postgreSQL database integrity check? No more than Oracle does. We get it right

Re: [GENERAL] Information about columns

2009-06-23 Thread Dario Teixeira
Hi, It is not as elegant as you would like, but maybe one idea is to create your own alias of the built in type so you can determine the answer just by looking at the column type. For example, instead of using int in CREATE TYPE above, create a your own type equivalent to an integer.

Re: [GENERAL] [BUGS] Integrity check

2009-06-23 Thread Dave Page
On Tue, Jun 23, 2009 at 1:38 PM, David Fetterda...@fetter.org wrote: On Tue, Jun 23, 2009 at 03:38:35PM +0800, Prasad, Venkat wrote: * do you any tool to check postgreSQL database integrity check? No more than Oracle does.  We get it right in the first place.  The existence of integrity

Re: [GENERAL] Information about columns

2009-06-23 Thread darioteixeira
Hi, It's intentional; IIRC, the current behavior is defined that way because that's what the JDBC driver needs to implement the JDBC specs.  Putting information about composite types where information about tables is expected would confuse the heck out of existing client code. Thanks for

Re: [GENERAL] [BUGS] Integrity check

2009-06-23 Thread David Fetter
On Tue, Jun 23, 2009 at 02:00:51PM +0100, Dave Page wrote: On Tue, Jun 23, 2009 at 1:38 PM, David Fetterda...@fetter.org wrote: On Tue, Jun 23, 2009 at 03:38:35PM +0800, Prasad, Venkat wrote: * do you any tool to check postgreSQL database integrity check? No more than Oracle does.  We

Re: [GENERAL] [BUGS] Integrity check

2009-06-23 Thread Dave Page
On Tue, Jun 23, 2009 at 2:11 PM, David Fetterda...@fetter.org wrote: There is no general way to do that, apart from creating a test suite specific to your scenario and hoping it doesn't have more bugs that the thing it's testing. You don't have to tell me that :-) Sometimes it's good not to

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Merlin Moncure
On Tue, Jun 23, 2009 at 8:03 AM, Hartman, Matthewmatthew.hart...@krcc.on.ca wrote: Is there a recommended approach when trying to use EXPLAIN on a function? Specifically, a function that is more than the typical SELECT statement or tiny loop. The one in question that I'm hoping to optimize is

Re: [GENERAL] [BUGS] Integrity check

2009-06-23 Thread David Fetter
On Tue, Jun 23, 2009 at 02:17:02PM +0100, Dave Page wrote: On Tue, Jun 23, 2009 at 2:11 PM, David Fetterda...@fetter.org wrote: There is no general way to do that, apart from creating a test suite specific to your scenario and hoping it doesn't have more bugs that the thing it's testing.

Re: [GENERAL] [BUGS] Integrity check

2009-06-23 Thread Dave Page
On Tue, Jun 23, 2009 at 2:26 PM, David Fetterda...@fetter.org wrote: Auditors can be a funny breed. They can, at that, but in this case, they're simply doing the normal human thing of trying to figure out whether there's a way they can push off their work to someone or something else.  In

Re: [GENERAL] Information about columns

2009-06-23 Thread Tom Lane
darioteixe...@yahoo.com writes: Thanks for the info.  So, given that RowDescription is a dead-end, is there any other way I can determine the composite type associated with a function return? Why do you think that's a useful activity for client-side code to engage in?

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Hartman, Matthew
Hy the raise notice is a good idea, thanks. I use raise notice already for other uses, may as well go with it. Thanks. Matthew Hartman Programmer/Analyst Information Management, ICP Kingston General Hospital (613) 549- x4294 -Original Message- From: Merlin Moncure

Re: [GENERAL] Slight change in query leads to unexpected change in query plan

2009-06-23 Thread Jack Orenstein
Sam Mason wrote: On Mon, Jun 22, 2009 at 05:55:28PM -0400, Jack Orenstein wrote: ris-# select * ris-# from T ris-# where pk 10 ris-# and value = 'asdf'::bytea ris-# order by pk ris-# limit 100; PG thinks that you're going to get 16 rows back matching those conditions, bitmap heap

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com writes: On Tue, Jun 23, 2009 at 8:03 AM, Hartman, Matthewmatthew.hart...@krcc.on.ca wrote: Is there a recommended approach when trying to use EXPLAIN on a function? Specifically, a function that is more than the typical SELECT statement or tiny loop. The one

Re: [GENERAL] Slight change in query leads to unexpected change in query plan

2009-06-23 Thread Tom Lane
Jack Orenstein jack.orenst...@hds.com writes: Limit (cost=0.00..324.99 rows=100 width=451) - Index Scan using t_pkey on t (cost=0.00..296027.98 rows=91088 width=451) Index Cond: (pk 10) Adding the value restriction at the top of this query plan wouldn't

Re: [GENERAL] [BUGS] Integrity check

2009-06-23 Thread David Fetter
On Tue, Jun 23, 2009 at 02:30:50PM +0100, Dave Page wrote: On Tue, Jun 23, 2009 at 2:26 PM, David Fetterda...@fetter.org wrote: Auditors can be a funny breed. They can, at that, but in this case, they're simply doing the normal human thing of trying to figure out whether there's a way

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
The `problem` is that i dont know if having so many indexes will raise problems as the data dimension grown. And i am not even sure that this design is truly reliable; For example, if i would to know how many employees have every company, i'll have to run that query: - EXPLAIN ANALYZE SELECT

Re: [GENERAL] Cache lookup failed for type 70385664

2009-06-23 Thread Greg Stark
This looks like data corruption on that record. Or possibly on multiple records. I would: a) update to the latest bug-fix release of 8.2 asap. I don't see any fixed bugs which would cause this specific type of error but there are a lot of them and I could have missed it.

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Dave Page
On Tue, Jun 23, 2009 at 3:04 PM, Tom Lanet...@sss.pgh.pa.us wrote: Merlin Moncure mmonc...@gmail.com writes: On Tue, Jun 23, 2009 at 8:03 AM, Hartman, Matthewmatthew.hart...@krcc.on.ca wrote: Is there a recommended approach when trying to use EXPLAIN on a function? Specifically, a function

Re: [GENERAL] Replication

2009-06-23 Thread Merlin Moncure
2009/6/23 Devrim GÜNDÜZ dev...@gunduz.org: On Mon, 2009-06-22 at 18:28 -0400, Gerry Reno wrote: The only one that is remotely viable is slony and it is so quirky you may as well forget it. Like what? I agree that Slony-I is not a plug-in-play replication solution, but I don't agree that it

Re: [GENERAL] Information about columns

2009-06-23 Thread Dario Teixeira
Hi, Why do you think that's a useful activity for client-side code to engage in? Strongly typed languages like Ocaml and Haskell deal with the possibility of missing values by having option types. Though at first glance SQL's NULL seems like a similar concept, in fact NULL is more like a

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread Grzegorz Jaśkiewicz
2009/6/23 DaNieL..! daniele.pigned...@gmail.com: The `problem` is that i dont know if having so many indexes will raise problems as the data dimension grown. That seem to be not very efficient: http://explain.depesz.com/s/Q0m Well, this is slow, because for some reason postgres decided to use

[GENERAL] drawback of array vs join

2009-06-23 Thread Ivan Sergio Borgonovo
I've a temporary table where I'd like to resume data coming from several other tables (normalised the usual way). eg. a list of items that may belong to several group (eg. item, group, itemgroup table) will end up in something similar to: create temp table itemlisttemp( lid int, iid int,

Re: [GENERAL] Information about columns

2009-06-23 Thread Tom Lane
Dario Teixeira darioteixe...@yahoo.com writes: I doubt there is a clean way around this (barring Postgresql implementing option types). Therefore, I'm working on a workaround that involves the Postgresql side annotating the nullability of type definitions by issuing comments on the type

Re: [GENERAL] after vacuum analyze, explain still wrong

2009-06-23 Thread Greg Stark
Actually most of the estimates seem pretty good. There are some that are a ways off, but the real nasties seem to be these. I'm a bit confused because it looks like two of your joins don't have Join Filters -- and one of those is a left join for which I thought that was impossible. Are you sure

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Chris Spotts
is around 250 lines. What I normally do for benchmarking of complex functions is to sprinkle the source with raise notice '%', timeofday(); to figure out where the bottlenecks are. Following that, I micro-optimize problem queries or expressions outside of the function body in psql.

[GENERAL] PANIC: cannot abort transaction 140578842, it was already committed

2009-06-23 Thread sergio nogueira
Hi, all. any idea about causes and consequences? C:\psql -U postgres monitor Welcome to psql 8.2.4, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to

Re: [GENERAL] Slight change in query leads to unexpected change in query plan

2009-06-23 Thread Jack Orenstein
Tom Lane wrote: Jack Orenstein jack.orenst...@hds.com writes: Limit (cost=0.00..324.99 rows=100 width=451) - Index Scan using t_pkey on t (cost=0.00..296027.98 rows=91088 width=451) Index Cond: (pk 10) Adding the value restriction at the top of this query plan

Re: [GENERAL] Replication

2009-06-23 Thread Ray Stell
On Tue, Jun 23, 2009 at 10:24:28AM -0400, Merlin Moncure wrote: If you are adventurous/enterprising, you could dig up the hot standby patch, get it in line with the soon to be released 8.4, and play with it...it works very well. What is the entry point for source and config documentation of

Re: [GENERAL] [BUGS] Integrity check

2009-06-23 Thread Greg Stark
On Tue, Jun 23, 2009 at 2:00 PM, Dave Pagedp...@pgadmin.org wrote: On Tue, Jun 23, 2009 at 1:38 PM, David Fetterda...@fetter.org wrote: On Tue, Jun 23, 2009 at 03:38:35PM +0800, Prasad, Venkat wrote: * do you any tool to check postgreSQL database integrity check? No more than Oracle does.  

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
Yes, after my post i've tryed the versione with 2 separate table (a copy of the contact table) with inside just the employees, and, with my surprise, the query planner looks identical, both with 1 big table and with 2 splitted table. This sound a bit strange for me, becose in my test the

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread Chris Spotts
IMHO running queries on 23k'ish worth of rows isn't liable to stress any reasonably modern server, likely several times over that shouldn't either for simple LIKE searches. What kind of growth are you expecting? -Original Message- From: pgsql-general-ow...@postgresql.org

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread justin
DaNieL wrote: Hi guys, im tryin to optimize a simple table, suited for contain users. So, my table at the moment is: - CREATE TABLE contacts( id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE, company_id BIGINT, code varchar(10), company_name varchar(120), name varchar(120), surname

Re: [GENERAL] PANIC: cannot abort transaction 140578842, it was already committed

2009-06-23 Thread Tom Lane
sergio nogueira sergiop...@gmail.com writes: monitor=# vacuum full monitor-# ; ERROR: could not truncate relation 18293/18295/19113 to 68908 blocks: Permission denied PANIC: cannot abort transaction 140578842, it was already committed The PANIC is a known problem if vacuum full fails at

Re: [GENERAL] Replication

2009-06-23 Thread Scott Marlowe
On Mon, Jun 22, 2009 at 9:43 PM, Craig Ringercr...@postnewspapers.com.au wrote: On Mon, 2009-06-22 at 21:12 -0600, Scott Marlowe wrote: On Mon, Jun 22, 2009 at 8:59 PM, Craig Ringercr...@postnewspapers.com.au wrote: So ... it doesn't seem likely that statement-level replication would ever

Re: [GENERAL] Replication

2009-06-23 Thread Scott Marlowe
2009/6/23 Devrim GÜNDÜZ dev...@gunduz.org: On Mon, 2009-06-22 at 18:28 -0400, Gerry Reno wrote: The only one that is remotely viable is slony and it is so quirky you may as well forget it. Like what? I agree that Slony-I is not a plug-in-play replication solution, but I don't agree that it

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Hartman, Matthew
Thanks! That'll reduce the amount of copy/pasting I have to do to figure out the differences in times. Matthew Hartman Programmer/Analyst Information Management, ICP Kingston General Hospital (613) 549- x4294 -Original Message- From: Chris Spotts [mailto:rfu...@gmail.com] Sent:

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
I thought to analyze the input chars to avoid useless searches, for example, if the digit is EX, where X is number, it is the user_code, and i'll search just that field; otherwise if the digit is an email, i'll look only at the email column. But, the things get little deeper, with the custom

[GENERAL] possible bug on age() function (8.2.4 , 8.3.6)

2009-06-23 Thread Philippe Amelant
Hi all, here is a little test case for a problem we run into in our developpement Is it a bug or a setting problem ? try select (current_timestamp),(current_timestamp - interval '1008 hours'); report this value in age() select age('2009-06-23 18:36:05.064066+02' ,'2009-05-12 18:36:05.064066

Re: [GENERAL] Please suggest me on my table design (indexes!)

2009-06-23 Thread DaNieL..!
Yes, surely bigserial of overdimensioned. Anyway, i need to keep the postgresql cpu and ram usage as lower as possible, same for the disk usage. I'm starded an application that would be similar to shopify.com, but free and opensource (it will be opensource just when i'll finish at least the first

Re: [GENERAL] Replication

2009-06-23 Thread Merlin Moncure
On Tue, Jun 23, 2009 at 11:01 AM, Ray Stellste...@cns.vt.edu wrote: On Tue, Jun 23, 2009 at 10:24:28AM -0400, Merlin Moncure wrote: If you are adventurous/enterprising, you could dig up the hot standby patch, get it in line with the soon to be released 8.4, and play with it...it works very

Re: [GENERAL] Replication

2009-06-23 Thread Mike Christensen
Hi Mike thanks for your interest in rubyrep. I developed rubyrep. Let me answer your questions. On Jun 23, 4:16 pm, m...@kitchenpc.com (Mike Christensen) wrote: There will be a set of triggers for each replication. Since MySql doesn't support more than one trigger on a table, this

Re: [GENERAL] possible bug on age() function (8.2.4 , 8.3.6)

2009-06-23 Thread Tom Lane
Philippe Amelant pamel...@companeo.com writes: Can I workaround this ? Don't assume that 1 month means a constant number of seconds. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Replication

2009-06-23 Thread Thomas Kellerer
Mike Christensen wrote on 23.06.2009 19:37: Does anyone actually have that (any node can go down and the others still replicate amongst themselves?) I think this is what Oracle promises with their RAC technology. Thomas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Replication

2009-06-23 Thread Ray Stell
On Tue, Jun 23, 2009 at 01:31:59PM -0400, Merlin Moncure wrote: not sure what you mean by entry point? getting it running is a snap if you've already ever done a warm standby setup. The hard part will be patching it in. In my case, I'd need to know where the patch can be downloaded and where

Re: [GENERAL] Replication

2009-06-23 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 It is true. Otherwise show me a viable replication offering for postgresql that I can put into production and obtain support for it. It depends on what you mean by replication, but if you need master-master (or even a really good

Re: [GENERAL] Replication

2009-06-23 Thread Glyn Astill
--- On Mon, 22/6/09, Gerry Reno gr...@verizon.net wrote: Have you ever tried any of the postgresql replication offerings? The only one that is remotely viable is slony and it is so quirky you may as well forget it. The rest are in some stage of decay/abandonment. There is no real

Re: [GENERAL] Replication

2009-06-23 Thread Emanuel Calvo Franco
2009/6/23 Greg Sabino Mullane g...@turnstep.com: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 It is true.  Otherwise show me a viable replication offering for postgresql that I can put into production and obtain support for it. It depends on what you mean by replication, but if you

Re: [GENERAL] help with data recovery from injected UPDATE

2009-06-23 Thread Merlin Moncure
On Tue, Jun 23, 2009 at 2:05 PM, Gus Gutoskishared.entanglem...@gmail.com wrote: Success, of sorts.  I was able to retrieve 90% the corrupted data by dumping the heap file.  Many thanks to those who replied with helpful suggestions. If you're interested in detail then read on.  Otherwise,

[GENERAL] Separating raise notice lines

2009-06-23 Thread Radcon Entec
I like to use RAISE NOTICE statements to make sure my functions are working correctly.  I just wrote a trigger function that has the following code:     -- We have a new tender.  Find out who it is.     select into userRecord * from users where users_key = new.tender_key;     if not found then  

[GENERAL] Query optimizer prepared statements

2009-06-23 Thread Jack Orenstein
If x is an integer column with an index, then select ... from T where x 1 and select ... from T where x 10 could be optimized differently. So how is optimization done for a prepared statement containing a variable, e.g. select ... from T where

Re: [GENERAL] drawback of array vs join

2009-06-23 Thread Emanuel Calvo Franco
2009/6/23 Ivan Sergio Borgonovo m...@webthatworks.it: I've a temporary table where I'd like to resume data coming from several other tables (normalised the usual way). eg. a list of items that may belong to several group (eg. item, group, itemgroup table) will end up in something similar to:

[GENERAL] Controlling proliferation of postgres.exe processes

2009-06-23 Thread Radcon Entec
Greetings! At the current moment, our customer's computer has 22 instances of postgres.exe running.  When a colleague checked a few minutes ago, there were 29.  Our contract specifies that we cannot consume more than 40% of the computer's memory, and we're over that level.  When does an

Re: [GENERAL] Query optimizer prepared statements

2009-06-23 Thread Emanuel Calvo Franco
   select ...    from T    where x $1 prepare testy_prepare(int) as select * from T where x = $1; execute testy_prepare(4); Follow the docs :) http://www.postgresql.org/docs/8.1/interactive/sql-prepare.html -- Emanuel Calvo Franco ArPUG [www.arpug.com.ar] / AOSUG Member

Re: [GENERAL] Controlling proliferation of postgres.exe processes

2009-06-23 Thread Bill Moran
In response to Radcon Entec radconen...@yahoo.com: Greetings! At the current moment, our customer's computer has 22 instances of postgres.exe running.  When a colleague checked a few minutes ago, there were 29.  Our contract specifies that we cannot consume more than 40% of the

Re: [GENERAL] drawback of array vs join

2009-06-23 Thread Ivan Sergio Borgonovo
On Tue, 23 Jun 2009 17:39:46 -0300 Emanuel Calvo Franco postgres@gmail.com wrote: 2009/6/23 Ivan Sergio Borgonovo m...@webthatworks.it: I've a temporary table where I'd like to resume data coming from several other tables (normalised the usual way). eg. a list of items that may

[GENERAL] Error ::- “ 'more' is not recognized as an interna l or external command, operable program or batch file. “

2009-06-23 Thread raghu ram
Hi All, Can anyone tel me what does this error mean. “ 'more' is not recognized as an internal or external command, operable program or batch file. “ C:\Program Files\PostgresPlus\8.4\binpsql -d postgres -p 5456 -U postgres psql (8.4rc1) WARNING: Console code page (437) differs from Windows

Re: [GENERAL] Error ::- “ 'more' is not recognized as an internal or external command, operable program or batch file. “

2009-06-23 Thread Vibhor Kumar
more exists in C:\Windows\System32. So, please set the path in PATH Environment Variable. and then try. My Computer (Right Click) - Properties - then go to Advanced tab - Environment Variable - set the path. Thanks Regards, Vibhor Kumar www.enterprisedb.com raghu ram wrote: Hi All, Can

[GENERAL] Re: [GENERAL] Error ::- “ 'more' is not recognized as an internal or external command, operable program or bat ch file. “

2009-06-23 Thread raghu ram
It worked, Thaks!!! On Wed, Jun 24, 2009 at 4:15 AM, Vibhor Kumar vibhor.ku...@enterprisedb.com wrote: more exists in C:\Windows\System32. So, please set the path in PATH Environment Variable. and then try. My Computer (Right Click) - Properties - then go to Advanced tab - Environment

Re: [GENERAL] Query optimizer prepared statements

2009-06-23 Thread Chris
Jack Orenstein wrote: If x is an integer column with an index, then select ... from T where x 1 and select ... from T where x 10 could be optimized differently. So how is optimization done for a prepared statement containing a variable, e.g. select

Re: [GENERAL] Controlling proliferation of postgres.exe processes

2009-06-23 Thread Scott Mead
2009/6/23 Radcon Entec radconen...@yahoo.com Greetings! At the current moment, our customer's computer has 22 instances of postgres.exe running. When a colleague checked a few minutes ago, there were 29. Our contract specifies that we cannot consume more than 40% of the computer's memory,

Re: [GENERAL] Controlling proliferation of postgres.exe processes

2009-06-23 Thread Greg Stark
In response to Radcon Entec radconen...@yahoo.com: At the current moment, our customer's computer has 22 instances of postgres.exe running.  When a colleague checked a few minutes ago, there were 29.  Our contract specifies that we cannot consume more than 40% of the computer's memory, and

Re: [GENERAL] Controlling proliferation of postgres.exe processes

2009-06-23 Thread Alan Hodgson
On Tuesday 23 June 2009, Radcon Entec radconen...@yahoo.com wrote: Greetings! At the current moment, our customer's computer has 22 instances of postgres.exe running.  When a colleague checked a few minutes ago, there were 29.  Our contract specifies that we cannot consume more than 40% of

Re: [GENERAL] Replication

2009-06-23 Thread Craig Ringer
Thomas Kellerer wrote: Mike Christensen wrote on 23.06.2009 19:37: Does anyone actually have that (any node can go down and the others still replicate amongst themselves?) I think this is what Oracle promises with their RAC technology. Isn't RAC a shared-storage cluster? -- Craig Ringer

Re: [GENERAL] Separating raise notice lines

2009-06-23 Thread Craig Ringer
Radcon Entec wrote: I like to use RAISE NOTICE statements to make sure my functions are working correctly. I just wrote a trigger function that has the following code: [snip] I am trying to insert a carriage return character (chr(10)) in the user name notice so that any subsequent notices

Re: [GENERAL] Replication

2009-06-23 Thread Scott Mead
On Tue, Jun 23, 2009 at 10:07 PM, Craig Ringer cr...@postnewspapers.com.auwrote: Thomas Kellerer wrote: Mike Christensen wrote on 23.06.2009 19:37: Does anyone actually have that (any node can go down and the others still replicate amongst themselves?) I think this is what Oracle

[GENERAL] PgDay Athens 2009: Call for Presentations

2009-06-23 Thread Michael Alan Brewer
The PostgreSQL Conference, U.S. series is having a PgDay on Saturday, September 19, 2009 at The University of Georgia in Athens, GA, less than 90 minutes from Atlanta. PgDay will be a single-day event located in historic Old College on the University's beautiful North Campus. Recently named

[GENERAL] question about frequency of updates/reads

2009-06-23 Thread Andrew Smith
Hi all, I'm working on a problem at the moment where I have some data that I need to get from a proprietary system into a web page. I was thinking of using PostgreSQL as a middle man to store the data. E.g - C++ app reads data from proprietary system and writes it into temp table in PostgreSQL

Re: [GENERAL] question about frequency of updates/reads

2009-06-23 Thread Scott Marlowe
On Tue, Jun 23, 2009 at 10:12 PM, Andrew Smithlaconi...@gmail.com wrote: This temp table will probably contain up to 1 records, each of which could be changing every second (data is coming from a real-time monitoring system).  On top of this, I've then got the ASP.NET app reading the

Re: [GENERAL] question about frequency of updates/reads

2009-06-23 Thread David Wilson
On Wed, Jun 24, 2009 at 12:48 AM, Scott Marlowescott.marl...@gmail.com wrote: Maybe.  Rows that are updated often are NOT generally pgsql's strong suit, but IF you're running 8.3 or above, and IF you have a low enough fill factor that there's empty space for the updates and IF the fields you

Re: [GENERAL] after vacuum analyze, explain still wrong

2009-06-23 Thread Sim Zacks
Greg Stark wrote: Actually most of the estimates seem pretty good. There are some that are a ways off, but the real nasties seem to be these. I'm a bit confused because it looks like two of your joins don't have Join Filters -- and one of those is a left join for which I thought that was