[GENERAL] duplicate key value violates unique constraint "pg_class_relname_nsp_index"

2015-05-27 Thread Mitu Verma
HI, Following error is continuously seen with the postgreSQL database which we are using at customer site. Current Errors observed: ./fm_db_VoiceReprocessing1/data/pg_log/postgresql-04.log:2015-04-04 01:00:16 CESTERROR: duplicate key value violates unique constraint "pg_class_relname_nsp_inde

Re: [GENERAL] Can we simulate Oracle Flashback with pg_export_snapshot()?

2015-05-27 Thread Albe Laurenz
William Dunn wrote: > In terms of benefit over a lagging replica Flashback has the benefit of being > transparent to the user > (the user can query over the same database connection, etc), it does not > incur the full cost of having > a replica... Yes, Flashback (in all ist forms) is something t

[GENERAL] Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"

2015-05-27 Thread Albe Laurenz
Mitu Verma wrote: > Following error is continuously seen with the postgreSQL database which we > are using at customer site. > > Current Errors observed: > ./fm_db_VoiceReprocessing1/data/pg_log/postgresql-04.log:2015-04-04 01:00:16 > CESTERROR: duplicate key value violates unique constraint >

Re: [GENERAL] Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"

2015-05-27 Thread Pete Hollobon
On 27 May 2015 at 09:57, Albe Laurenz wrote: > > Mitu Verma wrote: > > Following error is continuously seen with the postgreSQL database which we are using at customer site. > > > > Current Errors observed: ./fm_db_VoiceReprocessing1/data/pg_log/postgresql-04.log:2015-04-04 01:00:16 > > CESTERROR:

Re: [GENERAL] Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"

2015-05-27 Thread Mitu Verma
Hi, I have tried to see the postgres code(although new to this !) and found this. declare unique index pg_class_relname_nsp_index 2663 on pg_class using btree(relname name_ops, relnamespace oid_ops) Not sure why ‘duplicate key value violates unique constraint "pg_class_relname_nsp_index"’ messa

Re: [GENERAL] Re: duplicate key value violates unique constraint "pg_class_relname_nsp_index"

2015-05-27 Thread Albe Laurenz
> From: Pete Hollobon [mailto:postg...@hollobon.com] > On 27 May 2015 at 09:57, Albe Laurenz wrote: >> Mitu Verma wrote: >>> Following error is continuously seen with the postgreSQL database which we >>> are using at customer site. >>> >>> Current Errors observed: >>> ./fm_db_VoiceReprocessing1/

[GENERAL] [plainto_tsquery] using OR

2015-05-27 Thread Sven R. Kunze
Hi everybody, I struggle to find a clean solution in an application to safely parse the query input string of a user. Currently, I am inclined to split the string with some magic regex and build it safely together using ' | '. That solution, however, is error-prone and hides the powerful fea

Re: [GENERAL] duplicate key value violates unique constraint "pg_class_relname_nsp_index"

2015-05-27 Thread Melvin Davidson
What this indicates is that someone, or some thing, is trying to create a table in a schema that already exists. Here is the structure of pg_class_relname_nsp_index: CREATE UNIQUE INDEX pg_class_relname_nsp_index ON pg_class USING btree (relname, relnamespace) What you should also see in the error

Re: [GENERAL] duplicate key value violates unique constraint "pg_class_relname_nsp_index"

2015-05-27 Thread Adrian Klaver
On 05/27/2015 06:05 AM, Melvin Davidson wrote: What this indicates is that someone, or some thing, is trying to create a table in a schema that already exists. The error you see in that situation is: postgres-2015-05-27 06:25:10.173 PDT-0ERROR: relation "table1" already exists postgres-2015-

Re: [GENERAL] Reg: BULK COLLECT

2015-05-27 Thread Andy Colson
On 05/25/2015 07:24 AM, Medhavi Mahansaria wrote: > Hello, > > I am porting my application from Oracle to PostgreSQL. > > We are using BULK COLLECT functionality of oracle. > How can i change the 'BULK COLLECT' fetch of the data from the cursor to make if compatible for pg/plsql? > > A

Re: [GENERAL] duplicate key value violates unique constraint "pg_class_relname_nsp_index"

2015-05-27 Thread Tom Lane
Adrian Klaver writes: > On 05/27/2015 06:05 AM, Melvin Davidson wrote: >> What this indicates is that someone, or some thing, is trying to create >> a table in a schema that already exists. > The error you see in that situation is: > postgres-2015-05-27 06:25:10.173 PDT-0ERROR: relation "table1

Re: [GENERAL] Reg: BULK COLLECT

2015-05-27 Thread Simon Riggs
On 27 May 2015 at 06:52, Medhavi Mahansaria wrote: > > We are using bulk collect to enhance the performance as the data is huge. > > Using BULK COLLECT speeds up retrieving rows into memory, but if the data is huge that wasn't a great plan anyway, so doing it faster doesn't matter much. -- Sim

Re: [GENERAL] delaying autovacuum freeze via storage params?

2015-05-27 Thread Steve Kehlet
On Tue, May 26, 2015 at 7:27 PM Alvaro Herrera wrote: > See the docs about the freeze max age storage parameter -- the per-table > setting can decrease the global setting but not increase it. Thanks Alvaro, that explains it. I found it in the docs: "Note that autovacuum will ignore attempts to

[GENERAL] Python 3.2 XP64 and Numpy...

2015-05-27 Thread Rémi Cura
Hey dear List, On a windows XP 64. I installed python (64b), it works. CReating plpython3u works, and python works within database. I installed numpy (manually compiled,64b), it works outside of Postgres, but inside a plpython3u function, simply doing 'import numpy' raises an error saying that p

Re: [GENERAL] Allowing postgresql to accept 0xff syntax for data types that it makes sense for?

2015-05-27 Thread PT
Well, whether good or bad, my employer has nixed the idea of paying me to work on this, and I don't have personal time right now to do it, so it's not going to be addressed by me at this time. -- Bill -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to yo

Re: [GENERAL] Fwd: Raster performance

2015-05-27 Thread PT
On Tue, 26 May 2015 12:52:24 -0500 David Haynes II wrote: > Hello, > > I have a question about the query optimizer and its performance on spatial > datasets, specifically rasters. My use case is rather unique, the > application that I am developing allows users to request summarizations of > var

[GENERAL] Constraint exclusion not working - need different constraints?

2015-05-27 Thread Doug Gorley
Good day, I'm attempting to implement table partitioning with constraint exclusions, but I'm not seeing the planner limit the plan to an appropriate set of child tables.  I'm wondering if the functions in my constraints are making the exclusion impossible. My constraints look like this:     ALTE

[GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

2015-05-27 Thread Steve Kehlet
I have a database that was upgraded from 9.4.1 to 9.4.2 (no pg_upgrade, we just dropped new binaries in place) but it wouldn't start up. I found this in the logs: waiting for server to start2015-05-27 13:13:00 PDT [27341]: [1-1] LOG: database system was shut down at 2015-05-27 13:12:55 PDT 20

Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

2015-05-27 Thread Alvaro Herrera
Steve Kehlet wrote: > I have a database that was upgraded from 9.4.1 to 9.4.2 (no pg_upgrade, we > just dropped new binaries in place) but it wouldn't start up. I found this > in the logs: > > waiting for server to start2015-05-27 13:13:00 PDT [27341]: [1-1] LOG: > database system was shut do

Re: [GENERAL] Constraint exclusion not working - need different constraints?

2015-05-27 Thread Tom Lane
"=?utf-8?b?RG91ZyBHb3JsZXk=?=" writes: > I'm attempting to implement table partitioning with constraint exclusions, > but I'm not seeing the planner limit the plan to an appropriate set of > child tables.  I'm wondering if the functions in my constraints are making > the exclusion impossible. >

Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

2015-05-27 Thread Steve Kehlet
On Wed, May 27, 2015 at 3:21 PM Alvaro Herrera wrote: > I think a patch like this should be able to fix it ... not tested yet. > Thanks Alvaro. I got a compile error, so looked for other uses of SimpleLruDoesPhysicalPageExist and added MultiXactOffsetCtl, does this look right? + (!InRecovery |

Re: [GENERAL] Python 3.2 XP64 and Numpy...

2015-05-27 Thread Adrian Klaver
On 05/27/2015 09:49 AM, Rémi Cura wrote: Hey dear List, On a windows XP 64. I installed python (64b), it works. What version of Python 2 or 3 or both? What does python -V show at the command line? CReating plpython3u works, and python works within database. I installed numpy (manually com

Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

2015-05-27 Thread Alvaro Herrera
Steve Kehlet wrote: > On Wed, May 27, 2015 at 3:21 PM Alvaro Herrera > wrote: > > > I think a patch like this should be able to fix it ... not tested yet. > > > > Thanks Alvaro. I got a compile error, so looked for other uses of > SimpleLruDoesPhysicalPageExist and added MultiXactOffsetCtl, does

[GENERAL] ERROR: missing chunk number 0 for toast value 1821556134 in pg_toast_17881

2015-05-27 Thread Tory M Blue
Sorry I think I posted this to the wrong group, sent to performance vs General. My apologies to everyone in perf! Greetings and salutations. > > I've got some weirdness. > > Current: > Postgres 9.3.4 > Slony 2.2.3 > CentOS 6.5 > > Prior running Postgres 9.1.2 w/slony 2.1.3 CentOS 6.2 > > I found t

Re: [HACKERS] Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

2015-05-27 Thread Robert Haas
On Wed, May 27, 2015 at 6:21 PM, Alvaro Herrera wrote: > Steve Kehlet wrote: >> I have a database that was upgraded from 9.4.1 to 9.4.2 (no pg_upgrade, we >> just dropped new binaries in place) but it wouldn't start up. I found this >> in the logs: >> >> waiting for server to start2015-05-27 1

Re: [HACKERS] Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

2015-05-27 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, May 27, 2015 at 6:21 PM, Alvaro Herrera > wrote: > > Steve Kehlet wrote: > >> I have a database that was upgraded from 9.4.1 to 9.4.2 (no pg_upgrade, we > >> just dropped new binaries in place) but it wouldn't start up. I found this > >> in the logs: > >> > >> waiting

Re: [HACKERS] Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1

2015-05-27 Thread Robert Haas
On Wed, May 27, 2015 at 10:14 PM, Alvaro Herrera wrote: > Well I'm not very clear on what's the problematic case. The scenario I > actually saw this first reported was a pg_basebackup taken on a very > large database, so the master could have truncated multixact and the > standby receives a trunc

Re: [GENERAL] Constraint exclusion not working - need different constraints?

2015-05-27 Thread Doug Gorley
On Wed, 27 May 2015 18:21:58 -0400, Tom Lane wrote: "=?utf-8?b?RG91ZyBHb3JsZXk=?=" writes: I'm attempting to implement table partitioning with constraint exclusions, but I'm not seeing the planner limit the plan to an appropriate set of child tables.  I'm wondering if the functions in my

Re: [GENERAL] Constraint exclusion not working - need different constraints?

2015-05-27 Thread Tom Lane
"=?utf-8?b?RG91ZyBHb3JsZXk=?=" writes: > On Wed, 27 May 2015 18:21:58 -0400, Tom Lane wrote: > You'd be much better off using child-table constraints like > "timestamp" >= '2015-01-01' AND "timestamp" < '2015-01-08' > because the planner can reason about them. But I'm afraid the age() > technique

Re: [GENERAL] [SQL] extracting PII data and transforming it across table.

2015-05-27 Thread John R Pierce
On 5/21/2015 9:51 AM, Suresh Raja wrote: I'm looking at directions or help in extracting data from production and alter employee id information while extracting. But at the same time maintain referential integrity across tables. Is it possible to dump data to fla