Re: [GENERAL] Sequence Ids are not updating after COPY operation in PostgreSQL

2012-01-31 Thread Guillaume Lelarge
On Wed, 2012-02-01 at 12:08 +0530, Siva Palanisamy wrote: > Hi there! > > I'm inserting bulk records using COPY statement in PostgreSQL, and is > successful. When I try to insert a record later manually, it throws duplicate > sequence id error. What I realize is, the sequence ids are not getting

[GENERAL] Sequence Ids are not updating after COPY operation in PostgreSQL

2012-01-31 Thread Siva Palanisamy
Hi there! I'm inserting bulk records using COPY statement in PostgreSQL, and is successful. When I try to insert a record later manually, it throws duplicate sequence id error. What I realize is, the sequence ids are not getting updated in its cache. Should I manually update the sequence number

Re: [GENERAL] INSERT with RETURNING clause inside SQL function

2012-01-31 Thread xavieremv
(k) -- View this message in context: http://postgresql.1045698.n5.nabble.com/INSERT-with-RETURNING-clause-inside-SQL-function-tp1923653p5445810.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To ma

Re: [HACKERS] [GENERAL] pg_dump -s dumps data?!

2012-01-31 Thread Tom Lane
Adrian Klaver writes: > On 01/31/2012 04:36 AM, Robert Haas wrote: >> On Mon, Jan 30, 2012 at 11:18 PM, Tom Lane wrote: >>> What's not apparent to me is whether there's an argument for doing more >>> than that. It strikes me that the current design is not very friendly >>> towards the idea of an

Re: [GENERAL] Help speeding up a left join aggregate

2012-01-31 Thread Alban Hertroys
On 31 Jan 2012, at 4:55, Nick wrote: > I have a pretty well tuned setup, with appropriate indexes and 16GB of > available RAM. Should this be taking this long? I forced it to not use > a sequential scan and that only knocked a second off the plan. > >

Re: [HACKERS] [GENERAL] pg_dump -s dumps data?!

2012-01-31 Thread Adrian Klaver
On 01/31/2012 04:36 AM, Robert Haas wrote: On Mon, Jan 30, 2012 at 11:18 PM, Tom Lane wrote: I don't recall that we thought very hard about what should happen when pg_dump switches are used to produce a selective dump, but ISTM reasonable that if it's "user data" then it should be dumped only i

Re: [GENERAL] normalizing & join to table function

2012-01-31 Thread Marc Mamin
> Hello, > Need some help. Hoping some of the smart people might know how to solve this. > > I'd like to replace all name/value pairs in a delimited string with the id > of the name/value pair in my reference table. > Eg > St=IL&city=Chicago&street=Madison > To > 13&50&247 > Assuming St=IL i

Re: [GENERAL] list blocking queries

2012-01-31 Thread Tom Lane
Scot Kreienkamp writes: > There's something wrong with the query that I've written based on what you > gave me. It looks like you forgot the ON condition for the next-to-last JOIN, so the parser is still expecting another ON when it runs into the WHERE. Personally I think this sort of FROM cons

Re: EXT :Re: [GENERAL] Intermittent occurrence of ERROR: could not open relation

2012-01-31 Thread Tom Lane
"Nykolyn, Andy (AS)" writes: > It is a straight CREATE TEMP TABLE. It does not happen on the same procedure > every time. It happens on different procedures sometimes they are nested. > These store procedures have been working for many years the same way. Only > recently has this error been

Re: [GENERAL] Gist cost estimates

2012-01-31 Thread Tom Lane
Matthias writes: > I've noticed the new range data types in 9.2dev. I'm really looking > forward to use them, so I built postgres 9.2dev on windows to try. > ... > Do you have any explanation for these grossly wrong cost estimates? The range operators don't have any selectivity estimation worthy

Re: [GENERAL] list blocking queries

2012-01-31 Thread Scot Kreienkamp
Tom, There's something wrong with the query that I've written based on what you gave me. Here's what I have: select bl.pid as Blocked_PID, a.usename as Blocked_User, kl.pid as Blocking_PID, ka.usename as Blocking_User, to_char(age(now(), a.query_start),'HH24h:MIm:SSs') as Age from pg_catalog.pg

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-31 Thread Martijn van Oosterhout
On Mon, Jan 30, 2012 at 11:18:31PM -0500, Tom Lane wrote: > I don't recall that we thought very hard about what should happen when > pg_dump switches are used to produce a selective dump, but ISTM > reasonable that if it's "user data" then it should be dumped only if > data in a regular user table

Re: EXT :Re: [GENERAL] Intermittent occurrence of ERROR: could not open relation

2012-01-31 Thread Nykolyn, Andy (AS)
Are you using EXECUTE or doing a straight CREATE TEMP TABLE ...? Maybe a sample with sensitive info changed? The insert you mention happens in the same procedure or is there a nested procedure? It is a straight CREATE TEMP TABLE. It does not happen on the same procedure every time. It happen

Re: EXT :Re: [GENERAL] Intermittent occurrence of ERROR: could not open relation

2012-01-31 Thread Adrian Klaver
On Tuesday, January 31, 2012 9:42:07 am Nykolyn, Andy (AS) wrote: > > Some questions first: > 1) What language are you using in the stored procedures? > The stored procedures are in Pl/Pgsql Temp table in PL/pgSQL was improved in 8.3 to handle this case, so you should be covered. http://www.p

[GENERAL] normalizing & join to table function

2012-01-31 Thread Little, Douglas
Hello, Need some help. Hoping some of the smart people might know how to solve this. I'd like to replace all name/value pairs in a delimited string with the id of the name/value pair in my reference table. Eg St=IL&city=Chicago&street=Madison To 13&50&247 Assuming St=IL is id 13, city=Chica

[GENERAL] HELP - compiling C functions for wiondws

2012-01-31 Thread Edwin Quijada
Hi! I am trying to compile a C function for windows using VS 2008 Express and I getting this errors pg2.cc:\program files\postgresql\9.0\include\server\pg_config_os.h(203) : error C2011: 'timezone' : 'struct' type redefinitionc:\program files\postgresql\9.0\include\server\pg_config_os.

[GENERAL] Help speeding up a left join aggregate

2012-01-31 Thread Nick
I have a pretty well tuned setup, with appropriate indexes and 16GB of available RAM. Should this be taking this long? I forced it to not use a sequential scan and that only knocked a second off the plan. QUERY PLAN --

Re: EXT :Re: [GENERAL] Intermittent occurrence of ERROR: could not open relation

2012-01-31 Thread Nykolyn, Andy (AS)
Subject: EXT :Re: [GENERAL] Intermittent occurrence of ERROR: could not open relation On Tuesday, January 31, 2012 8:08:24 am Nykolyn, Andy (AS) wrote: > I have been running PostgreSQL 8.4 on Windows Server 2003 Service Pack 2 > for almost 3 years. I have recently been intermittently getting the

Re: [GENERAL] Intermittent occurrence of ERROR: could not open relation

2012-01-31 Thread Adrian Klaver
On Tuesday, January 31, 2012 8:08:24 am Nykolyn, Andy (AS) wrote: > I have been running PostgreSQL 8.4 on Windows Server 2003 Service Pack 2 > for almost 3 years. I have recently been intermittently getting the error > "ERROR: could not open relation base/85599592/121526263: No such file or > dir

[GENERAL] Gist cost estimates

2012-01-31 Thread Matthias
Hello, I've noticed the new range data types in 9.2dev. I'm really looking forward to use them, so I built postgres 9.2dev on windows to try. While testing I noticed one thing. I have a simple test table with 1 million rows. There's a column called valid_range (of type int4range) which is GiST in

[GENERAL] Intermittent occurrence of ERROR: could not open relation

2012-01-31 Thread Nykolyn, Andy (AS)
I have been running PostgreSQL 8.4 on Windows Server 2003 Service Pack 2 for almost 3 years. I have recently been intermittently getting the error "ERROR: could not open relation base/85599592/121526263: No such file or directory". It only appears to be happening during the execution of store

Re: [GENERAL] parameter "vacuum_defer_cleanup_age"

2012-01-31 Thread Tulio
Fabrizio, I'm using the value default.. The situation was when I executed some query large in the server Slave, because I'm trying do balancement of charge. Somebody could help me to solve this problem? System: CentOS Postgresql version:  9.1

Re: [GENERAL] Index on parent/child hierarchy

2012-01-31 Thread Merlin Moncure
On Sun, Jan 29, 2012 at 5:55 AM, Dmitriy Igrishin wrote: >> The point here is that you can exploit the tree structure with a btree >> index.  Before we got recursive queries, this was often the best way >> to do it, but now it's kind of a niche solution to be used when >> certain things fall into

Re: [GENERAL] Extending Session / Logged User info

2012-01-31 Thread Durumdara
Hi! 2012/1/31 Guillaume Lelarge > On Tue, 2012-01-31 at 04:16 -0800, durumdara wrote: > > Dear PGSQL Masters! > > > > I have a complicated question. > > > > Is there any way to extend the session information (what visible in > > pgadmin's "Server Status")? > > > > I explain what I want to do: >

Re: [GENERAL] Extending Session / Logged User info

2012-01-31 Thread Guillaume Lelarge
On Tue, 2012-01-31 at 04:16 -0800, durumdara wrote: > Dear PGSQL Masters! > > I have a complicated question. > > Is there any way to extend the session information (what visible in > pgadmin's "Server Status")? > > I explain what I want to do: > > We used alternative DB in a place and I need to

Re: [GENERAL] Why Hard-Coded Version 9.1 In Names?

2012-01-31 Thread Marti Raudsepp
On Tue, Jan 31, 2012 at 00:41, Jerry Richards wrote: > I just installed postgreSQL 9.1 and noticed it hard-codes the folder > /var/lib/pgsql/9.1 and it hard-codes the service name to be postgresql91. > Why is the hard-coded version included in the naming? Note that this is done by Linux distribu

[GENERAL] Extending Session / Logged User info

2012-01-31 Thread durumdara
Dear PGSQL Masters! I have a complicated question. Is there any way to extend the session information (what visible in pgadmin's "Server Status")? I explain what I want to do: We used alternative DB in a place and I need to port this. In this DB we using different db users for every real users.

Re: [HACKERS] [GENERAL] pg_dump -s dumps data?!

2012-01-31 Thread Robert Haas
On Mon, Jan 30, 2012 at 11:18 PM, Tom Lane wrote: > I don't recall that we thought very hard about what should happen when > pg_dump switches are used to produce a selective dump, but ISTM > reasonable that if it's "user data" then it should be dumped only if > data in a regular user table would b

Re: [GENERAL] Extensions btree_gist and cube collide?

2012-01-31 Thread pasman pasmański
Hi. I recreate database and a problem disapears. Thanks. pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general