Re: [GENERAL] How to check a table content efficiently? With LIMIT and OFFSET?

2011-05-30 Thread Stefan Keller
Hi Jaime 2011/5/30 Jaime Casanova wrote: > On Sun, May 29, 2011 at 4:55 PM, Stefan Keller wrote: >> 2. There's an autovacuum background process which already does the job, doesn't it? >>> >>> Yes, but in its own time. If you know there has been a batch of >>> inserts/deletes you might

[GENERAL] UTC4115FATAL: the database system is in recovery mode

2011-05-30 Thread Mathew Samuel
Hi, I see the following error as found in pg.log: UTC4115FATAL: the database system is in recovery mode Actually that message was logged repeatedly for about 4 hours according to the logs (I don't have access to the system itself, just the logs). Leading up to that error were the following in

Re: [GENERAL] Shared Buffer Size

2011-05-30 Thread Carl von Clausewitz
Thanks Toby, I will check it, and change it. regards, Carl 2011/5/30 Toby Corkindale > On 28/05/11 18:42, Carl von Clausewitz wrote: > >> a few months ago, when I installed my first PostgreSQL, I have had the >> same problem. I've try to get any information about optimal memory >> config, and w

[GENERAL]

2011-05-30 Thread Sairam Krishnamurthy
http://turedure.oboroduki.com/find11.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Index Size

2011-05-30 Thread Nick Raj
Hi, Cube code provided by postgres contrib folder. It uses the NDBOX structure. On creating index, it's size increase at a high rate. On inserting some tuple and creating indexes its behaviour is shown below. 1. When there is only one tuple select pg_size_pretty(pg_relation_ size('cubtest'))

Re: [GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-05-30 Thread Leif Jensen
Hello Bosco, Thank you for your comment. Yes, it would be nice to get some more comments on the allocate/deallocate on a connection issue. I have verified that in my case deallocating a prepared statement, it guesses the wrong connection and returns an error. (The right one is doing a

RES: [GENERAL] SELECT COUNT(*) execution time on large tables (v9.0.4-1)

2011-05-30 Thread Carlos Sotto Maior (SIM)
David, Thanks for your reply. I will probably use the strategy of a trigger driven counter, with temporal strategy devising current month totals and up to last month total as current month changes rapidly. I also apologize for not being investigative enough. I did look at wiki but maybe I did no

Re: [GENERAL] Is there any problem with pg_notify and memory consumption?

2011-05-30 Thread Per-Olov Esgard
The patch seemed to work for me too. Thanks. Regards, Per-Olov Esgård From: Tom Lane To: Per-Olov Esgard Cc: Merlin Moncure , pgsql-general@postgresql.org Date: 05/27/2011 06:19 PM Subject:Re: [GENERAL] Is there any problem with pg_notify and memory consumption? I w

Re: [GENERAL] Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs

2011-05-30 Thread Leif Jensen
PS.: That goes for the AT clause on the GET DESCRIPTOR statement too. The connection name is not included in the ECPGget_desc() call. - "Leif Jensen" wrote: > Hello Bosco, > >Thank you for your comment. Yes, it would be nice to get some more > comments on the allocate/deallocate on a

Re: [GENERAL] Inspecting a DB - psql or system tables ?

2011-05-30 Thread Nicholson, Brad (Toronto, ON, CA)
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Andrew Sullivan > Sent: Friday, May 27, 2011 2:32 PM > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Inspecting a DB - psql or system tables ? > > On Fri,

[GENERAL] Universal certificate for verify-full ssl connection

2011-05-30 Thread Asia
Hi, I am trying to generate self-signed certificate for full ssl authentication. I need to have universal version of this certificate for development purposes (so any client can connect with any postgresql server with ssl on). I am using IP while connecting, I mean host=. However verify-full co

Re: [GENERAL] Regular disk activity of an idle DBMS

2011-05-30 Thread Andrej Podzimek
Nothing changes there. When OpenFire, Courier-MTA and Apache are restarted, a few numbers change, but othrewise they remain unchanged pretty long. There is no obvious activity that could trigger a disk write 20 times a minute... How many databases are in your pg cluster? There are currently 19

Re: [GENERAL] How to check a table content efficiently? With LIMIT and OFFSET?

2011-05-30 Thread Alban Hertroys
On 29 May 2011, at 23:55, Stefan Keller wrote: > Hi Alban > > On 2011/5/29 Alban Hertroys wrote: >> On 29 May 2011, at 19:45, Stefan Keller wrote: >> >>> But I'm hesitating to use ANALYZE for two reasons: >>> 1. It's very slow: it repeadly takes 59000 ms on my machine. >> >> ANALYZE on a single

[GENERAL] Function Column Expansion Causes Inserts To Fail

2011-05-30 Thread David Johnston
PostgreSQL 9.0.4 The following script fails even though the "pkonlytest" table is empty since we just created it. >> BEGIN SCRIPT CREATE TABLE pkonlytest ( pkid text PRIMARY KEY ); CREATE OR REPLACE FUNCTION createpkrecord(INOUT pkvalue text, OUT col

Re: [GENERAL] Shared Buffer Size

2011-05-30 Thread Cédric Villemain
2011/5/30 Toby Corkindale : > On 28/05/11 18:42, Carl von Clausewitz wrote: >> >> a few months ago, when I installed my first PostgreSQL, I have had the >> same problem. I've try to get any information about optimal memory >> config, and working, but there wasn't any "optimal memory setting >> calc

[GENERAL] deadlock problem

2011-05-30 Thread Sebastian Böhm
Hi, I need a little help with a deadlock. when I execute this (end of the mail) function in parallel sometimes a deadlock happens. This function does implement a insert or update functionality. The error is: "DETAIL: Process 29464 waits for ShareLock on transaction 1293098; blocked by proces

[GENERAL] pgpool-II 3.0.4 release delayed

2011-05-30 Thread Tatsuo Ishii
Sorry for off topic posting but... Since pgfoundry has been down, the schedule for releasing pgpool-II 3.0.4, to be released today, will be delayed. Sorry for inconvenience. We will start to continue the releasing work as soon as pgfoundry comes back. -- Tatsuo Ishii SRA OSS, Inc. Japan English: h

[GENERAL] determine database and tables from deadlock

2011-05-30 Thread Machiel Richards
Hi Everyone Some of our databases have been experiencing a sudden spike in deadlocks being detected. as far as our knowledge is concerned, there have not been any new code taken live and no changes from what are aware off. The databases are running postgresql 8.1 From the log

Re: [GENERAL] Regular disk activity of an idle DBMS

2011-05-30 Thread Scott Marlowe
On Sun, May 29, 2011 at 12:42 PM, Andrej Podzimek wrote: > Nothing changes there. When OpenFire, Courier-MTA and Apache are restarted, > a few numbers change, but othrewise they remain unchanged pretty long. There > is no obvious activity that could trigger a disk write 20 times a minute... How

Re: [GENERAL] trigger - dynamic WHERE clause

2011-05-30 Thread Pavel Stehule
Hello >>[...] >>Clause USING doesn't do a array unpacking >> >>you should to generate little bit different dynamic statement >>EXECUTE 'SELECT .. WHERE a = $1[1] AND b = $1[2]' USING ARRAY[...] > > I changed that but this wasn't my only problem; typecasting was the > second issue. Column "id1" is

Re: [GENERAL] determine database and tables from deadlock

2011-05-30 Thread Craig Ringer
On 05/30/2011 03:45 PM, Machiel Richards wrote: I am however not sure how to trace these back to a database, table, and maybe even a query to determine where things are going wrong. One of the deadlocking queries is shown in the deadlock error message, but one isn't really enough. IIRC, new

Re: [GENERAL] Universal certificate for verify-full ssl connection

2011-05-30 Thread Craig Ringer
On 05/30/2011 03:58 PM, Asia wrote: Would you please advise what I am doing wrong? Or maybe there is other way to generate wildcard certificate ? I wouldn't be surprised if libpq didn't support wildcard certificates at all. I doubt there's ever been any demand for them. Have you checked in

Re: [GENERAL] Index Size

2011-05-30 Thread Craig Ringer
On 05/30/2011 08:53 PM, Nick Raj wrote: Hi, Cube code provided by postgres contrib folder. It uses the NDBOX structure. On creating index, it's size increase at a high rate. [snip] Can some one tell me why index is becoming so large? How to compress or reduce its size? It'd help if you inc

Re: [GENERAL] deadlock problem

2011-05-30 Thread Craig Ringer
On 05/30/2011 10:04 PM, Sebastian Böhm wrote: Acquired by CREATE INDEX (without CONCURRENTLY). so where the "ShareLock" is acquired? I don't create an index here. There's some confusing historical terminology involved here, I'm afraid. The documentation you referred to talks about table-

Re: [GENERAL] trigger - dynamic WHERE clause

2011-05-30 Thread Tarlika Elisabeth Schmitz
On Mon, 30 May 2011 11:02:34 +0200 Pavel Stehule wrote: >> 2) I took from your blog entry >> (http://okbob.blogspot.com/2008/06/execute-using-feature-in-postgresql-84.html) >> that it is good practice to use EXECUTE USING. >> Well, there's no danger of SQL injection as this particular DB runs >>

Re: [GENERAL] UTC4115FATAL: the database system is in recovery mode

2011-05-30 Thread Craig Ringer
On 05/30/2011 10:29 PM, Mathew Samuel wrote: 2011-03-28 10:44:28 UTC3609HINT: Consider increasing the configuration parameter "checkpoint_segments". 2011-03-28 10:44:38 UTC3609LOG: checkpoints are occurring too frequently (10 seconds apart) 2011-03-28 10:44:38 UTC3609HINT: Consider increasing th

[GENERAL] [9.1beta1] UTF-8/Regex Word-Character Definition excluding accented letters

2011-05-30 Thread David Johnston
PostgreSQL 9.1beta1, compiled by Visual C++ build 1500, 64-bit (EnterpriseDB Install Executable) CREATE DATABASE betatest TEMPLATE template0 ENCODING 'UTF8' LC_COLLATE 'C' LC_CTYPE 'C'; [connect to databas

[GENERAL] time estimation for a test

2011-05-30 Thread salah jubeh
Hello, I have a view which is a result of the cross product of three tables, I want to test how much time is required to populate this view. Also, I want to test the scalability of this view in the future. Since, I have already live data I am wondering if I can do that without creating an autom

Re: [GENERAL] UTC4115FATAL: the database system is in recovery mode

2011-05-30 Thread Tom Lane
Craig Ringer writes: > On 05/30/2011 10:29 PM, Mathew Samuel wrote: >> 2011-03-28 10:44:42 UTC3932ERROR: canceling statement due to statement >> timeout >> 2011-03-28 10:44:42 UTC3932STATEMENT: vacuum full analyze _zamboni.sl_log_1 >> 2011-03-28 10:44:42 UTC3932PANIC: cannot abort transaction 1827

Re: [GENERAL] [9.1beta1] UTF-8/Regex Word-Character Definition excluding accented letters

2011-05-30 Thread Tom Lane
"David Johnston" writes: > PostgreSQL 9.1beta1, compiled by Visual C++ build 1500, 64-bit (EnterpriseDB > Install Executable) > CREATE DATABASE betatest > TEMPLATE template0 > ENCODING 'UTF8' > LC_COLLATE 'C' > LC_CTYPE 'C'; > CR

Re: [GENERAL] Function Column Expansion Causes Inserts To Fail

2011-05-30 Thread Tom Lane
"David Johnston" writes: > SELECT ( createpkrecord('1')).*; > [ results in function being called more than once ] Yeah. Don't do that. Better style is SELECT * FROM createpkrecord('1'); regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] Shared Buffer Size

2011-05-30 Thread Toby Corkindale
On 30/05/11 20:41, Cédric Villemain wrote: 2011/5/30 Toby Corkindale: On 28/05/11 18:42, Carl von Clausewitz wrote: a few months ago, when I installed my first PostgreSQL, I have had the same problem. I've try to get any information about optimal memory config, and working, but there wasn't an

Re: [GENERAL] Index Size

2011-05-30 Thread Tom Lane
Craig Ringer writes: > On 05/30/2011 08:53 PM, Nick Raj wrote: >> Cube code provided by postgres contrib folder. It uses the NDBOX structure. >> On creating index, it's size increase at a high rate. > [snip] >> Can some one tell me why index is becoming so large? >> How to compress or reduce its

Re: [GENERAL] Index Size

2011-05-30 Thread Nick Raj
On Tue, May 31, 2011 at 8:50 AM, Tom Lane wrote: > Craig Ringer writes: > > On 05/30/2011 08:53 PM, Nick Raj wrote: > >> Cube code provided by postgres contrib folder. It uses the NDBOX > structure. > >> On creating index, it's size increase at a high rate. > > > [snip] > > >> Can some one tell

Re: [GENERAL] trigger - dynamic WHERE clause

2011-05-30 Thread Pavel Stehule
2011/5/31 Tarlika Elisabeth Schmitz : > On Mon, 30 May 2011 11:02:34 +0200 > Pavel Stehule wrote: > >>> 2) I took from your blog entry >>> (http://okbob.blogspot.com/2008/06/execute-using-feature-in-postgresql-84.html) >>> that it is good practice to use EXECUTE USING. >>> Well, there's no danger

Re: [GENERAL] Index Size

2011-05-30 Thread Craig Ringer
On 30/05/11 20:53, Nick Raj wrote: > Hi, > > Cube code provided by postgres contrib folder. It uses the NDBOX structure. > On creating index, it's size increase at a high rate. Here's what I get on 8.4 with a cleaned up test case. It uses the original poster's data ( output_vehicle.sql ) and just