Re: [GENERAL] How to build my own 9.2.4 installer package for IBM Power System ppc64

2013-04-16 Thread John R Pierce
On 4/16/2013 7:04 PM, ascot.m...@gmail.com wrote: I have managed to install 9.2.4 to an IBM Power System server ppc64 by compiling pg 9.2.4 from source as I cannot find the 9.2.4 installer package for ppc64. Can anyone advise me how to build my own installer package for ppc64 (e.g. tools, ste

[GENERAL] Most efficient way to insert without duplicates

2013-04-16 Thread François Beausoleil
Hi all! I track Twitter followers in my database. I have the following table: # \d persona_followers Table "public.persona_followers" Column|Type | Modifiers -+-+--- service_id | bigint

Re: [GENERAL] How to build my own 9.2.4 installer package for IBM Power System ppc64

2013-04-16 Thread Joshua D. Drake
On 04/16/2013 07:04 PM, ascot.m...@gmail.com wrote: Hi, I have managed to install 9.2.4 to an IBM Power System server ppc64 by compiling pg 9.2.4 from source as I cannot find the 9.2.4 installer package for ppc64. Can anyone advise me how to build my own installer package for ppc64 (e.g. t

[GENERAL] How to build my own 9.2.4 installer package for IBM Power System ppc64

2013-04-16 Thread ascot.m...@gmail.com
Hi, I have managed to install 9.2.4 to an IBM Power System server ppc64 by compiling pg 9.2.4 from source as I cannot find the 9.2.4 installer package for ppc64. Can anyone advise me how to build my own installer package for ppc64 (e.g. tools, steps)? since I have more than one ppc64 server a

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Scott Marlowe
I've seen this in the ticketing system Front Range where it sticks in nbsp into the text windows and if you copy and paste it won't work. Frustrating as all hell. On Tue, Apr 16, 2013 at 7:18 PM, Lee Hachadoorian wrote: > > On 04/16/2013 08:23 PM, Tom Lane wrote: >> >> Lee Hachadoorian writes: >

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Lee Hachadoorian
On 04/16/2013 08:23 PM, Tom Lane wrote: Lee Hachadoorian writes: SQL seems to be behaving in a case-sensitive manner: universe=# select 1; ?column? -- 1 (1 row) universe=# SELECT 1; ERROR: syntax error at or near "SELECT 1" LINE 1: SELECT 1; ^ That's really biz

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Bruce Momjian
On Tue, Apr 16, 2013 at 08:57:02PM -0400, Lee Hachadoorian wrote: > > On 04/16/2013 08:23 PM, Tom Lane wrote: > >"SELECT 1" as all one token. Also, if you transcribed this accurately, > >it looks like the error cursor is pointing to the second character of > >the "SELECT" not the first (could you

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Lee Hachadoorian
On 04/16/2013 08:23 PM, Tom Lane wrote: "SELECT 1" as all one token. Also, if you transcribed this accurately, it looks like the error cursor is pointing to the second character of the "SELECT" not the first (could you confirm that?). Which is even more bizarre. No, that must have been an em

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Tom Lane
Lee Hachadoorian writes: > SQL seems to be behaving in a case-sensitive manner: > universe=# select 1; > ?column? > -- > 1 > (1 row) > universe=# SELECT 1; > ERROR: syntax error at or near "SELECT 1" > LINE 1: SELECT 1; > ^ That's really bizarre, but I don't think i

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Adrian Klaver
On 04/16/2013 04:39 PM, Lee Hachadoorian wrote: On 04/16/2013 07:31 PM, Adrian Klaver wrote: On 04/16/2013 02:46 PM, Lee Hachadoorian wrote: Interesting. Does this behavior survive logging out and then back into a session? It survives complete restart. (This is a laptop that I use for de

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Lee Hachadoorian
On 04/16/2013 07:34 PM, Adrian Klaver wrote: On 04/16/2013 02:46 PM, Lee Hachadoorian wrote: List, SQL seems to be behaving in a case-sensitive manner: universe=# select 1; ?column? -- 1 (1 row) universe=# SELECT 1; ERROR: syntax error at or near "SELECT 1" LINE 1: SELECT

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Lee Hachadoorian
On 04/16/2013 07:31 PM, Adrian Klaver wrote: On 04/16/2013 02:46 PM, Lee Hachadoorian wrote: List, SQL seems to be behaving in a case-sensitive manner: universe=# select 1; ?column? -- 1 (1 row) universe=# SELECT 1; ERROR: syntax error at or near "SELECT 1" LINE 1: SELECT

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Adrian Klaver
On 04/16/2013 02:46 PM, Lee Hachadoorian wrote: List, SQL seems to be behaving in a case-sensitive manner: universe=# select 1; ?column? -- 1 (1 row) universe=# SELECT 1; ERROR: syntax error at or near "SELECT 1" LINE 1: SELECT 1; ^ I cannot figure out how this hap

Re: [GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Adrian Klaver
On 04/16/2013 02:46 PM, Lee Hachadoorian wrote: List, SQL seems to be behaving in a case-sensitive manner: universe=# select 1; ?column? -- 1 (1 row) universe=# SELECT 1; ERROR: syntax error at or near "SELECT 1" LINE 1: SELECT 1; ^ I cannot figure out how this hap

Re: [GENERAL] Can you spot the difference?

2013-04-16 Thread Adrian Klaver
On 04/16/2013 01:55 PM, Moshe Jacobson wrote: On Tue, Apr 16, 2013 at 3:29 PM, Adrian Klaver mailto:adrian.kla...@gmail.com>> wrote: Given that the copy is causing the 'problem', the question to ask is; did you run ANALYZE on the table once the data was copied in? I did not -- I expect

Re: [GENERAL] JDBC driver versions

2013-04-16 Thread Adrian Klaver
On 04/16/2013 01:54 PM, Ramsey Gurley wrote: Okay, I saw that, but I just wanted to double check. It seemed odd that there were builds going all the way back to 8.2 if the 9.2 version should work for everything. It works for Postgres going back to 7.2, but not for older JDK and JDBC versions

[GENERAL] SQL keywords are suddenly case sensitive

2013-04-16 Thread Lee Hachadoorian
List, SQL seems to be behaving in a case-sensitive manner: universe=# select 1; ?column? -- 1 (1 row) universe=# SELECT 1; ERROR: syntax error at or near "SELECT 1" LINE 1: SELECT 1; ^ I cannot figure out how this happened, and Google is not helping because all I'm ge

Re: [GENERAL] Mysterious table that exists but doesn't exist

2013-04-16 Thread Tom Lane
Dale Fukami writes: > I'm having a problem on a standby server (streaming replication) where a > table seems to exist but is not queryable. Essentially a select statement > (and drop/insert/etc) fails but \d and pg_tables show it exists. The table > exists on the master (and is queryable) and repl

Re: [GENERAL] Mysterious table that exists but doesn't exist

2013-04-16 Thread John R Pierce
On 4/16/2013 1:48 PM, Dale Fukami wrote: Tried the select with the quotes around each of the schema and table and I get the same result ("someschema"."tracked_deductibles"). I'm pretty certain they're both lowercase. Would the select from pg_tables show if they were mixed case by accident?

Re: [GENERAL] Can you spot the difference?

2013-04-16 Thread Moshe Jacobson
On Tue, Apr 16, 2013 at 3:29 PM, Adrian Klaver wrote: > Given that the copy is causing the 'problem', the question to ask is; did > you run ANALYZE on the table once the data was copied in? > I did not -- I expected the autovacuum daemon to do so. Why did it not? The database was created & restor

Re: [GENERAL] JDBC driver versions

2013-04-16 Thread Ramsey Gurley
Okay, I saw that, but I just wanted to double check. It seemed odd that there were builds going all the way back to 8.2 if the 9.2 version should work for everything. Thanks for the reassurance :-) Ramsey On Apr 16, 2013, at 1:36 PM, Adrian Klaver wrote: > On 04/16/2013 01:13 PM, Ramsey Gurle

Re: [GENERAL] Mysterious table that exists but doesn't exist

2013-04-16 Thread Dale Fukami
Tried the select with the quotes around each of the schema and table and I get the same result ("someschema"."tracked_deductibles"). I'm pretty certain they're both lowercase. Would the select from pg_tables show if they were mixed case by accident? Dale On Tue, Apr 16, 2013 at 2:38 PM, John R Pi

Re: [GENERAL] Mysterious table that exists but doesn't exist

2013-04-16 Thread John R Pierce
On 4/16/2013 1:29 PM, Dale Fukami wrote: live=# select * from someschema.tracked_deductibles; ERROR: relation "someschema.tracked_deductibles" does not exist LINE 1: select * from someschema.tracked_deductibles; live=#\d List of relations Schema

Re: [GENERAL] JDBC driver versions

2013-04-16 Thread Adrian Klaver
On 04/16/2013 01:13 PM, Ramsey Gurley wrote: Hi all, I'm migrating from postgres 8.3 to 9.2. Included in my application is an old jar for the JDBC driver for the 8.3 database. Do I need a separate build with an up to date JDBC jar for 9.2 while I am testing out a new database or is it safe to

Re: [GENERAL] JDBC driver versions

2013-04-16 Thread John R Pierce
On 4/16/2013 1:13 PM, Ramsey Gurley wrote: I'm migrating from postgres 8.3 to 9.2. Included in my application is an old jar for the JDBC driver for the 8.3 database. Do I need a separate build with an up to date JDBC jar for 9.2 while I am testing out a new database or is it safe to use the la

[GENERAL] Mysterious table that exists but doesn't exist

2013-04-16 Thread Dale Fukami
Hi, I'm having a problem on a standby server (streaming replication) where a table seems to exist but is not queryable. Essentially a select statement (and drop/insert/etc) fails but \d and pg_tables show it exists. The table exists on the master (and is queryable) and replication is still working

[GENERAL] JDBC driver versions

2013-04-16 Thread Ramsey Gurley
Hi all, I'm migrating from postgres 8.3 to 9.2. Included in my application is an old jar for the JDBC driver for the 8.3 database. Do I need a separate build with an up to date JDBC jar for 9.2 while I am testing out a new database or is it safe to use the latest JDBC jar with a very old versio

Re: [GENERAL] Can you spot the difference?

2013-04-16 Thread Igor Neyman
Statistics on your "original" and "copy" databases must be different. For the same condition (li.tracking_number = '10137378459') optimizer expects to find 7915 rows in tb_line_item table on the "copy" database while only 54 rows on the "original" database. Also, the other table (tb_order_locatio

Re: [GENERAL] Can you spot the difference?

2013-04-16 Thread Moshe Jacobson
That was it! Thanks Adrian and Tom! On Tue, Apr 16, 2013 at 3:29 PM, Adrian Klaver wrote: > On 04/16/2013 12:07 PM, Moshe Jacobson wrote: > >> Hi PostgreSQL friends, >> >> I have two databases in the same cluster that are almost identical. One >> is a copy of the other as we are developing some

Re: [GENERAL] Can you spot the difference?

2013-04-16 Thread Tom Lane
Moshe Jacobson writes: > My problem is that the exact same simple query performs great in the > original database ("ises") and dismally in the copy database > ("ises_coelacanth"). The problem is that in ises, it uses an index scan, > but in ises_coelacanth it uses a sequential scan: The rowcount

Re: [GENERAL] Can you spot the difference?

2013-04-16 Thread Adrian Klaver
On 04/16/2013 12:07 PM, Moshe Jacobson wrote: Hi PostgreSQL friends, I have two databases in the same cluster that are almost identical. One is a copy of the other as we are developing some new features in the copy. My problem is that the exact same simple query performs great in the original d

[GENERAL] Postgresql default driver

2013-04-16 Thread Catelli, Mary M
Through a DNS, a C# program can access the Postgresql database either in Visual Studio or set it up as a website under localhost. But the Postgresql driver and the database name connection string works only if I run it in Visual Studio. As local host, it complains "no default driver specified"

Re: [GENERAL] currval and DISCARD ALL

2013-04-16 Thread Adrian Klaver
On 04/16/2013 08:07 AM, Nigel Heron wrote: On 04/15/2013 05:57 PM, Adrian Klaver wrote: On 04/15/2013 02:42 PM, Nigel Heron wrote: Hi, is there a way to clear the session state of sequence values fetched by currval(regclass)? "DISCARD ALL" doesn't seem to do it. Might want to take a look a

[GENERAL] Can you spot the difference?

2013-04-16 Thread Moshe Jacobson
Hi PostgreSQL friends, I have two databases in the same cluster that are almost identical. One is a copy of the other as we are developing some new features in the copy. My problem is that the exact same simple query performs great in the original database ("ises") and dismally in the copy databa

Re: [GENERAL] dataset lock

2013-04-16 Thread Philipp Kraus
On 2013-04-16 19:11:20 +0200, Steve Atkins said: On Apr 16, 2013, at 7:50 AM, Philipp Kraus wrote: Hello, I use a PG database on a HPC system (cluster). My processes get a dataset from the database and change the row, each process is independend. My table shows something like: id, status

Re: [GENERAL] dataset lock

2013-04-16 Thread Steve Atkins
On Apr 16, 2013, at 7:50 AM, Philipp Kraus wrote: > Hello, > > I use a PG database on a HPC system (cluster). My processes get a dataset > from the database and change the row, each process is independend. > My table shows something like: id, status, data > > id = PK a unqiue number > status

Re: [GENERAL] configure --enable-dtrace (systemtap) on centos6.4 x86_32,/usr/bin/stap: invalid option -- 'C'

2013-04-16 Thread Tom Lane
I wrote: > --enable-dtrace has worked just fine in Fedora and RHEL builds for > several years now. What version of systemtap are you using exactly? Actually, reading it again, the problem is this: DTRACE=/usr/bin/stap which is 100% wrong; stap is not a substitute for dtrace. You should have a

Re: [GENERAL] configure --enable-dtrace (systemtap) on centos6.4 x86_32,/usr/bin/stap: invalid option -- 'C'

2013-04-16 Thread Tom Lane
Alvaro Herrera writes: > wk wrote: >> make[3]: Entering directory `/home/tom/postgresql-9.2.1/src/backend/utils' >> /usr/bin/stap -C -h -s probes.d -o probes.h.tmp >> /usr/bin/stap: invalid option -- 'C' > Evidently our DTrace support hasn't been ported to the systemtap > emulation; or maybe you

Re: [GENERAL] configure --enable-dtrace (systemtap) on centos6.4 x86_32,/usr/bin/stap: invalid option -- 'C'

2013-04-16 Thread Alvaro Herrera
wk wrote: > hi:Linux centos6.4 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 > i686 i686 i386 GNU/Linux > > stap -v > A script must be specified. > Systemtap translator/driver (version 1.8/0.152 non-git sources) > Copyright (C) 2005-2012 Red Hat, Inc. and others > my configure: > .

[GENERAL] configure --enable-dtrace ??systemtap?? on centos6.4 x86_32??/usr/bin/stap: invalid option -- 'C'

2013-04-16 Thread wk
hi:Linux centos6.4 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux stap -v A script must be specified. Systemtap translator/driver (version 1.8/0.152 non-git sources) Copyright (C) 2005-2012 Red Hat, Inc. and others my configure: ./configure --enable-debug --

Re: [GENERAL] currval and DISCARD ALL

2013-04-16 Thread Nigel Heron
On 04/15/2013 05:57 PM, Adrian Klaver wrote: On 04/15/2013 02:42 PM, Nigel Heron wrote: Hi, is there a way to clear the session state of sequence values fetched by currval(regclass)? "DISCARD ALL" doesn't seem to do it. Might want to take a look at: http://www.depesz.com/2012/12/02/what-is

[GENERAL] dataset lock

2013-04-16 Thread Philipp Kraus
Hello, I use a PG database on a HPC system (cluster). My processes get a dataset from the database and change the row, each process is independend. My table shows something like: id, status, data id = PK a unqiue number status a enum value which "open", "waiting", "working", "done" So each proc

Re: [GENERAL] Role Authentication Failure

2013-04-16 Thread Adrian Klaver
On 04/15/2013 07:29 PM, Carlos Mennens wrote: I dropped both roles (Carlos & DBA) from the database and I will show you exactly what I'm doing: Now I login as 'carlos': carlos@debian:~$ psql -d postgres Password: psql (9.1.9) Type "help" for help. postgres=> but... To add to my post from l

Re: [GENERAL] Backup advice

2013-04-16 Thread Eduardo Morras
On Mon, 15 Apr 2013 19:54:15 -0700 Jeff Janes wrote: > On Tue, Apr 9, 2013 at 3:05 AM, Eduardo Morras > > > wrote: > > > On Mon, 8 Apr 2013 10:40:16 -0500 > > Shaun Thomas > 'stho...@optionshouse.com');>> wrote: > > > > > > > > Anyone else? > > > > > > > If his db has low inserts/updates/delet

Re: [GENERAL] Install PostgreSQL 9.2.4 to IBM Power System ppc64

2013-04-16 Thread Tatsuo Ishii
> I have two IBM Power System servers, the architecture is ppc64, the > PostgreSQL on RHEL6 for IBM Power is version 8.4 but I need to install 9.2.4 > as I need to use the PostgreSQL replication features. > > I am new to PostgreSQL on ppc64, can any one advise me where to get the > proper 9.2.

[GENERAL] Install PostgreSQL 9.2.4 to IBM Power System ppc64

2013-04-16 Thread ascot.m...@gmail.com
Hi, I have two IBM Power System servers, the architecture is ppc64, the PostgreSQL on RHEL6 for IBM Power is version 8.4 but I need to install 9.2.4 as I need to use the PostgreSQL replication features. I am new to PostgreSQL on ppc64, can any one advise me where to get the proper 9.2.4 insta