Re: [GENERAL] Commit every N rows in PL/pgsql

2010-06-03 Thread Len Walter
> > > > ... > > AfterTriggerEvents: 2642403328 total in 327 blocks; 10176 free (319 > > chunks); 2642393152 used > > And there's the problem. Evidently you have an AFTER trigger on the > table, and the queued events for that trigger are overrunning memory. > That's interesting - I don't know

Re: [GENERAL] libreadline and Debian 5 - not missing just badly named

2010-06-03 Thread J. Bagg
Thanks for the pointer to the correct packages. I didn't realise that the dev versions had the generic libs but, yes, you do need them for the headers anyway. Apologies for wasting time. J -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscript

Re: [GENERAL] server-side extension in c++

2010-06-03 Thread Mark Cave-Ayland
David Fetter wrote: It's good to have actual working code in production to bolster the case that the design is sound. How much work would it be to refactor libgeos_c to use a catch-all exception handler? Cheers, David. Given that GEOS is not used exclusively by PostGIS but also by quite a f

Re: [GENERAL] What Linux edition we should chose?

2010-06-03 Thread Rodger Donaldson
On 06/01/2010 03:34 AM, Tom Lane wrote: > Ivan Sergio Borgonovo writes: >> On Mon, 31 May 2010 08:47:25 -0600 >> Scott Marlowe wrote: >>> Pgsql is pretty easy to build from source. > >> Yeah it is. But what is it going to be an upgrade process? On a >> production box? > > If it makes you feel b

[GENERAL] Lock issues with partitioned table

2010-06-03 Thread Jehan-Guillaume (ioguix) de Rorthais
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have some trouble understanding the locking policy with partitioned tables. Here is a simple schema based on a real one: CREATE DATABASE test; \c test CREATE TABLE test( id integer PRIMARY KEY, id_dummy integer, id_part1 integer

[GENERAL] Auto-partitioning in COPY

2010-06-03 Thread Leonardo F
At this page: http://wiki.postgresql.org/wiki/Auto-partitioning_in_COPY I read: "The automatic hierarchy loading code is currently integrated in the code of the COPY command of Postgres 8.5" Is that true? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] How to debug efficiently

2010-06-03 Thread Jamie Lawrence-Jenner
Hi All In SQL Server I could copy sql code out of an application and paste it into SSMS, declare & assign vars that exist in the sql and run.. yay great debugging scenario. e.g. (please note I am rusty and syntax may be incorrect) declare @x as varchar(10) set @x = 'abc' select * from sometable

Re: [GENERAL] How to debug efficiently

2010-06-03 Thread Alban Hertroys
On 3 Jun 2010, at 12:43, Jamie Lawrence-Jenner wrote: > Hi All > > In SQL Server I could copy sql code out of an application and paste it into > SSMS, declare & assign vars that exist in the sql and run.. yay great > debugging scenario. > > e.g. (please note I am rusty and syntax may be incorr

Re: [GENERAL] Attempting to get kerberos authentication working

2010-06-03 Thread Magnus Hagander
On Wed, Jun 2, 2010 at 22:42, Bryan Montgomery wrote: > Hello, > I'm trying to get kerberos working with postgres 8.4 on openSUSE > authenticating against AD. I have the server configured and can do a kinit > against my account on the server. I have a keytab file produced by the > administrators.

[GENERAL] so, does this overlap or not...? - fencepost question on overlaps()

2010-06-03 Thread Frank van Vugt
Hi, This doesn't seem to make sense to me, can someone explain the rationale behind it? postgres=# select version(); version --- PostgreSQL 8.4.4 on x86_64-unknown-linux-

Re: [GENERAL] tsearch2 & dictionaries - possible problem

2010-06-03 Thread Oleg Bartunov
Ivan, did you found your misunderstooding ? You forget how dictionaries work. You need to put some dictionary, which recognize anything, like simple, or stemmer dictionary to recognize 'unknown' word. Look into documentation. Oleg On Wed, 2 Jun 2010, Ivan Voras wrote: hello, I think I have a

[GENERAL] Query Slow in Postgres 8.4.3 than Postgres 8.1.5

2010-06-03 Thread federalbird
The following query is very slow in Postgres 8.4.3 as compared to Postgres 8.1.5. Please reply. Thanx in advance. select f.finance_company_name, b.brokerage_name, bc.quote_no as ContractNumber, cl.first_name as ClientFirstName, cl.last_name as ClientLastName, mcsh.status_type_cd as Contract

Re: [GENERAL] libreadline and Debian 5 - not missing just badly named

2010-06-03 Thread Dimitri Fontaine
"J. Bagg" writes: > I've just had the common problem with not finding the readline library while > compiling/linking 8.4.4 on a new linux (Debian 5 - lenny). Tried: apt-get build-dep postgresql-8.4 That command will install all what you need to compile your own PostgreSQL. Some will add "and

Re: [GENERAL] Query Slow in Postgres 8.4.3 than Postgres 8.1.5

2010-06-03 Thread Thom Brown
Thought I'd reformat your query for readability: SELECT f.finance_company_name, b.brokerage_name, bc.quote_no AS contractnumber, cl.first_name AS clientfirstname, cl.last_nameAS clientlastname, mcsh.status

Re: [GENERAL] Query Slow in Postgres 8.4.3 than Postgres 8.1.5

2010-06-03 Thread Alban Hertroys
On 3 Jun 2010, at 24:42, federalbird wrote: > > The following query is very slow in Postgres 8.4.3 as compared to Postgres > 8.1.5. Please reply. Thanx in advance. Did you check the output of EXPLAIN ANALYSE to see if the plans are different between the two? Are your database settings ident

[GENERAL] Performance drop after upgrading to 8.4.4?

2010-06-03 Thread Max Williams
Hi, I was doing some benchmarking while changing configuration options to try to get more performance out of our postgresql servers and noticed that when running pgbench against 8.4.3 vs 8.4.4 on identical hardware and configuration there is a large difference in performance. I know tuning is a

Re: [GENERAL] How to debug efficiently

2010-06-03 Thread Justin Graf
On 6/3/2010 5:43 AM, Jamie Lawrence-Jenner wrote: > > Hi All > > In SQL Server I could copy sql code out of an application and paste it > into SSMS, declare & assign vars that exist in the sql and run.. yay > great debugging scenario. > > e.g. (please note I am rusty and syntax may be incorrect)

Re: [GENERAL] Lock issues with partitioned table

2010-06-03 Thread Tom Lane
"Jehan-Guillaume (ioguix) de Rorthais" writes: > Shouldn't locks only be on tables/indexes that are actually used by the > planner ? Well, yeah, they are. The planner must take at least AccessShareLock on any relation referenced by the query. It might later be able to prove that the relation ne

Re: [GENERAL] so, does this overlap or not...? - fencepost question on overlaps()

2010-06-03 Thread Tom Lane
Frank van Vugt writes: > This doesn't seem to make sense to me, can someone explain the rationale > behind it? The rationale is "do what the SQL spec says" ;-) What the spec says is ( S1 > S2 AND NOT ( S1 >= T2 AND T1 >= T2 ) ) OR ( S2 > S1 AND NOT ( S

Re: [GENERAL] Auto-partitioning in COPY

2010-06-03 Thread Bruce Momjian
Leonardo F wrote: > At this page: > > http://wiki.postgresql.org/wiki/Auto-partitioning_in_COPY > > > I read: > "The automatic hierarchy loading code is currently integrated > in the code of the COPY command of Postgres 8.5" > > Is that true? It might be true for Aster Data's version of Postgr

Re: [GENERAL] server-side extension in c++

2010-06-03 Thread Bruce Momjian
Bruce Momjian wrote: > Peter Geoghegan wrote: > > >> I would have > > >> imagined that ultimately, the call to the Pg C function must return, > > >> and therefore cannot affect stack unwinding within the C++ part of the > > >> program. > > > > > > That's the whole point; a longjmp breaks the call c

Re: [GENERAL] Lock issues with partitioned table

2010-06-03 Thread Jehan-Guillaume (ioguix) de Rorthais
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/06/2010 16:00, Tom Lane wrote: > "Jehan-Guillaume (ioguix) de Rorthais" writes: >> Shouldn't locks only be on tables/indexes that are actually used by the >> planner ? > > Well, yeah, they are. The planner must take at least AccessShareLock >

[GENERAL] Altering Domain Constraints on composite types

2010-06-03 Thread Richard Broersma
While playing with domains and composite types, I discovered a problem when I tried to alter a domain constraint. I don't believe that this problem exists for traditional types. for example: broersr=> insert into tags values ((84,'PDSL',1,''),(84,'P',1, ''),'TEST TAG'); ERROR: invalid regular e

[GENERAL] pgbouncer

2010-06-03 Thread Mario Rodriguez
hello all: Well, i have a question if you know about this, i have a webserver in a server and i have a database server, the question is: where should I install the pgbouncer? in webserver, in database server or is the same? what's your experience. Thanks. ISC: Mario Ignacio Rodríguez Cortés.

Re: [GENERAL] libreadline and Debian 5 - not missing just badly named

2010-06-03 Thread J. Bagg
Thanks Dim, I didn't realise they had that package - probably because I tend to skim over the PostgreSQL related ones, assuming they're connected with the ready-built version. A good lesson for me. I'm new to Debian - just switched from Red Hat as Fedora seems to be getting monstrous and too

Re: [GENERAL] pgbouncer

2010-06-03 Thread Steve Crawford
On 06/03/2010 10:05 AM, Mario Rodriguez wrote: Well, i have a question if you know about this, i have a webserver in a server and i have a database server, the question is: where should I install the pgbouncer? in webserver, in database server or is the same? what's your experience. I haven't ha

Re: [GENERAL] Auto-partitioning in COPY

2010-06-03 Thread Greg Smith
Bruce Momjian wrote: Leonardo F wrote: At this page: http://wiki.postgresql.org/wiki/Auto-partitioning_in_COPY I read: "The automatic hierarchy loading code is currently integrated in the code of the COPY command of Postgres 8.5" Is that true? It might be true for Aster Data's vers

[GENERAL] pgbouncer

2010-06-03 Thread Mario Ignacio Rodríguez Cortés
hello all: Well, i have a question if you know about this, i have a webserver in a server and i have a database server, the question is: where should I install the pgbouncer? in webserver, in database server or is the same? whats your experience. Thanks. ISC: Mario Ignacio Rodríguez Cortés. --

[GENERAL] Removing CONTEXT from RAISE EXCEPTION messages from triggers

2010-06-03 Thread Peter Geoghegan
Hello, Is it possible to avoid seeing a CONTEXT notice from error messages returned by the server due to a RAISE EXCEPTION within a trigger? -- Regards, Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgr

Re: [GENERAL] Removing CONTEXT from RAISE EXCEPTION messages from triggers

2010-06-03 Thread Pavel Stehule
Hello 2010/6/3 Peter Geoghegan : > Hello, > > Is it possible to avoid seeing a CONTEXT notice from error messages > returned by the server due to a RAISE EXCEPTION within a trigger? > yes \set VERBOSITY terse regards Pavel Stehule > -- > Regards, > Peter Geoghegan > > -- > Sent via pgsql-gene

Re: [GENERAL] pgbouncer

2010-06-03 Thread Merlin Moncure
On Thu, Jun 3, 2010 at 12:40 PM, Mario Ignacio Rodríguez Cortés wrote: > hello all: > > Well, i have a question if you know about this, i have a webserver in a > server and i have a database server, the question is: where should I > install the pgbouncer? in webserver, in database server or is the

Re: [GENERAL] Removing CONTEXT from RAISE EXCEPTION messages from triggers

2010-06-03 Thread Peter Geoghegan
> > \set VERBOSITY terse > Well, I actually didn't mean through psql, but I see I can set verbosity though a call to PQsetErrorVerbosity(). Maybe this would work better as a GUC that can be set per session? That way, we wouldn't have to worry about downstream driver authors supporting it. -- Re

Re: [GENERAL] Removing CONTEXT from RAISE EXCEPTION messages from triggers

2010-06-03 Thread Alvaro Herrera
Excerpts from Peter Geoghegan's message of jue jun 03 16:23:07 -0400 2010: > > > > \set VERBOSITY terse > > > > Well, I actually didn't mean through psql, but I see I can set > verbosity though a call to PQsetErrorVerbosity(). > > Maybe this would work better as a GUC that can be set per session?

Re: [GENERAL] pgbouncer

2010-06-03 Thread Vick Khera
On Thu, Jun 3, 2010 at 4:03 PM, Merlin Moncure wrote: > I'm interested in this too...does anyone else have experience in this matter? > I've pondered this many times. My questions are what failure mode are you looking to avoid, especially if you're using pgbouncer for load balance in addition to

Re: [GENERAL] PostgreSQL and NeXpose Rapid 7 Vulnerbility scanning software

2010-06-03 Thread Marc Bevand
Arnold, Sandra osti.gov> writes: > > Is anyone using > NeXpose Rapid 7 to scan your PostgreSQL databases for vulnerbilities?  If > so, what authentication are you using to allow it to connect to your > database?  Or, how are you configuring the software to allow it to connect > to the databas

[GENERAL] How to remove the current database and populate the database with new data?

2010-06-03 Thread Wang, Mary Y
Hi, I've some test data in a database and would like to delete that database and clean everything that is associated with that database. Then I'd like to populate the same database with different data. My plan is to: (1) Remove the /usr/local/pgsql/data directory (2) psql -e mydatabase -f /tmp/

Re: [GENERAL] How to remove the current database and populate the database with new data?

2010-06-03 Thread Joshua D. Drake
On Thu, 2010-06-03 at 16:05 -0700, Wang, Mary Y wrote: > Hi, > > I've some test data in a database and would like to delete that database and > clean everything that is associated with that database. Then I'd like to > populate the same database with different data. > My plan is to: > (1) Remov

Re: [GENERAL] How to remove the current database and populate the database with new data?

2010-06-03 Thread Adrian Klaver
On Thursday 03 June 2010 4:05:14 pm Wang, Mary Y wrote: > Hi, > > I've some test data in a database and would like to delete that database > and clean everything that is associated with that database. Then I'd like > to populate the same database with different data. My plan is to: > (1) Remove th

Re: [GENERAL] How to remove the current database and populate the database with new data?

2010-06-03 Thread Wang, Mary Y
I thought about DROP DATABASE, but wasn't sure if it would clean up EVERYTHING. I had a bad experience early this year when I restored a database that was running on Postgres 7.x.x. The database crashed badly, that I couldn't recover it. It ended up that I had to restore it from a previous n

Re: [GENERAL] c program fails to run with the postgres which is installed at user location

2010-06-03 Thread zhong ming wu
On Thu, Jun 3, 2010 at 2:15 AM, John R Pierce wrote: > zhong ming wu wrote: >> >> ... >> This machine is RHEL 5.5 and has both RH stock postgres 8.1.18 in > > you probably need to either use "-R $HOME/local/lib" on the link command to > specify the runtime path to find .so's in, or add $HOME/local

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-03 Thread Gareth.Williams
> -Original Message- > From: Greg Smith [mailto:g...@2ndquadrant.com] -snip- > > Gareth.Williams wrote: > > So the rest of the question is, if I have two indexes with identical > definitions, what happens? I've confirmed that I can create indexes with > identical definitions (except name)

Re: [GENERAL] How to remove the current database and populate the database with new data?

2010-06-03 Thread Craig Ringer
On 4/06/2010 7:26 AM, Wang, Mary Y wrote: I thought about DROP DATABASE, but wasn't sure if it would clean up EVERYTHING. It won't remove your users and roles, or anything else that you see reported in pg_dumpall --globals-only . I assume most of you would just do the DROP DATABASE for the

[GENERAL] Requested addition to the todo list [was]: Re: Altering Domain Constraints on composite types

2010-06-03 Thread Richard Broersma
I'd like to propose the following items be added to the todo list: (Any thoughts?) 1) Modify composite types to allow ALTER DOMAIN(s) to ADD CONSTRAINT. 2) Allow a since ALTER DOMAIN issue multiple ADD and DROP commands in a single statement. On Thu, Jun 3, 2010 at 9:12 AM, Richard Broersma wro

Re: [GENERAL] libreadline and Debian 5 - not missing just badly named

2010-06-03 Thread Adrian von Bidder
On Thursday 03 June 2010 20.03:19 J. Bagg wrote: > because I tend to skim > over the PostgreSQL related ones, assuming they're connected with the > ready-built version. I'm just curious: why are you compiling your own? If you want to stick with lenny and need 8.4: It's in backports.org (package