Re: [GENERAL] could not load plperl library SOLVED

2013-04-04 Thread Robert Fitzpatrick
Paolo Saudin Wednesday, April 03, 2013 3:10 PM Try to check the perl version against Postgres version at http://forums.enterprisedb.com/posts/list/3295.page Thanks! I'm using postgresql 9.2 and needed 5.14, luckily still available.

[GENERAL] Oracle to PostgreSQL transition?

2013-04-04 Thread Roy Anderson
Hey all, We have a very robust Oracle and SQL Server presence at work but we're looking to farm out some of the load to PostgreSQL to limit costs. I'm curious if there are any DBAs out there who have gone down this route before. Any tips, tricks, failures, successes, etc.? I would just like to hea

Re: [GENERAL] bug in COPY implementation (all versions of Postgres)?

2013-04-04 Thread Ian Lawrence Barwick
2013/4/5 Konstantin Izmailov : > I came across an issue that looks like a bug in COPY. There are many similar > posts, e.g. > http://stackoverflow.com/questions/13485030/strange-postgresql-value-too-long-for-type-character-varying500, > without a good unswer. > > Simplified steps to reproduce the i

[GENERAL] bug in COPY implementation (all versions of Postgres)?

2013-04-04 Thread Konstantin Izmailov
I came across an issue that looks like a bug in COPY. There are many similar posts, e.g. http://stackoverflow.com/questions/13485030/strange-postgresql-value-too-long-for-type-character-varying500, without a good unswer. Simplified steps to reproduce the issue: 1. CREATE TABLE TEST (description va

Re: [GENERAL] Triggers on Foreign Tables

2013-04-04 Thread Adrian Klaver
On 04/04/2013 04:28 PM, Robert Lefkowitz wrote: Not sure if this is a feature request or a bug report. I'm trying to use Foreign Tables for a variety of things and it is useful to have a foreign table which appears to be read/write. Having set one up, I can select data from it. However, I ca

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Scott Marlowe
Try an index like: create index yada on mytable (id) where valids=0; then select max(jobid) from mytable where valids=0; On Thu, Apr 4, 2013 at 3:32 PM, Condor wrote: > Hello, > > I have one query in my postgresql 9.2.3 that took 137 ms to me executed > and looking a way > what I can do to o

[GENERAL] Triggers on Foreign Tables

2013-04-04 Thread Robert Lefkowitz
Not sure if this is a feature request or a bug report. I'm trying to use Foreign Tables for a variety of things and it is useful to have a foreign table which appears to be read/write. Having set one up, I can select data from it. However, I can't insert, update or delete. No worries, thinks

Re: [GENERAL] PostgreSQL: CPU utilization creeping to 100%

2013-04-04 Thread David Noel
On 4/3/13, Eduardo Morras wrote: > a) Perhaps process are waiting to I/O, do you take zfs snapshots? How often? > It can limit your i/o performance. Check the output of #zpool iostat 5 > > b) Is the zpool ok? If one of the disks lags behind the others (because > hardware errors) reconstructing the

Re: [GENERAL] PostgreSQL: CPU utilization creeping to 100%

2013-04-04 Thread David Noel
On 4/2/13, John R Pierce wrote: > On 4/2/2013 3:35 PM, David Noel wrote: >> The hardware is a Dell PowerEdge 1420, dual Xeon Nocona's, 3.2ghz, >> 16gb ram. The disks are 4 Kingston HyperX SATA3's attached to a >> HighPoint RocketRAID 2721 controller, ZFS, RAID10. > . >> postgresql.conf, all st

Re: [GENERAL] PostgreSQL: CPU utilization creeping to 100%

2013-04-04 Thread David Noel
On 4/3/13, Kevin Grittner wrote: > David Noel wrote: >> On 4/2/13, Kevin Grittner wrote: >>> David Noel wrote: >>> 'select * from pg_stat_activity' shows that the queries are not waiting, and are in the idle state. >>> >>> The process is idle or the process is running the query? If t

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Merlin Moncure
On Thu, Apr 4, 2013 at 5:15 PM, Tom Lane wrote: > Merlin Moncure writes: >> problem is that you are looking for needles (valids = 0) in the >> haystack. the problem wasn't really the order, but the fact that you >> had to scan an arbitrary amount of rows before finding a candidate >> record. s

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Tom Lane
Merlin Moncure writes: > problem is that you are looking for needles (valids = 0) in the > haystack. the problem wasn't really the order, but the fact that you > had to scan an arbitrary amount of rows before finding a candidate > record. so the partial index manages this problem by creating in

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread John R Pierce
On 4/4/2013 2:49 PM, Condor wrote: Your solution is work, but Im now a little confused. I has a index CREATE INDEX ON mytable (valids) USING BTREE (valids) and the query to find valids = 0 tooks 137 ms. the query can't use that index, and the separate index on id at the same time, it has to p

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Merlin Moncure
On Thu, Apr 4, 2013 at 4:49 PM, Condor wrote: >> SELECT jobid FROM mytable WHERE valids = 0 ORDER BY id ASC LIMIT 1; >> >> should return in zero time since btree indexes can optimize order by >> expressions and the partial index will bypass having to wade through >> the rows you don't want. >> >>

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Condor
On 2013-04-05 00:38, Merlin Moncure wrote: On Thu, Apr 4, 2013 at 4:32 PM, Condor wrote: Hello, I have one query in my postgresql 9.2.3 that took 137 ms to me executed and looking a way what I can do to optimize it. I have one table generated numbers from 1 to 1 000 000 and I need to get f

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Merlin Moncure
On Thu, Apr 4, 2013 at 4:32 PM, Condor wrote: > Hello, > > I have one query in my postgresql 9.2.3 that took 137 ms to me executed and > looking a way > what I can do to optimize it. I have one table generated numbers from 1 to 1 > 000 000 and > I need to get first free id, meanwhile id's when is

[GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Condor
Hello, I have one query in my postgresql 9.2.3 that took 137 ms to me executed and looking a way what I can do to optimize it. I have one table generated numbers from 1 to 1 000 000 and I need to get first free id, meanwhile id's when is taken can be free (deleted data and id is free for next

Re: [GENERAL] CVE-2013-1899 security issue and limited IP addresses in pg_hba.conf

2013-04-04 Thread Mads . Tandrup
Hi Bruce.Didn't catch that in the announcement.Thanks for clearing out the confusion.Best regards,Mads

Re: [GENERAL] Permissions on large objects - db backup and restore

2013-04-04 Thread David Wall
On 4/3/2013 5:57 PM, Tom Lane wrote: $ pg_restore -? ... -O, --no-owner skip restoration of object ownership ... So there you have it. pg_restore just restored all the objects (blobs and otherwise) as owned by the user running it. I should think you'd have had issues with other things besides

Re: [GENERAL] CVE-2013-1899 security issue and limited IP addresses in pg_hba.conf

2013-04-04 Thread Bruce Momjian
On Thu, Apr 4, 2013 at 06:39:22PM +0200, mads.tand...@schneider-electric.com wrote: > Hi All > > I'm trying to understand the implications of the latest security fix to > postgresql [1]. > > We have a setup were we in pg_hba.conf have limited the allowed IP addresses > of > the clients. But do

Re: [GENERAL] CVE-2013-1899 security issue and limited IP addresses in pg_hba.conf

2013-04-04 Thread Devrim Gündüz
Hi, pg_hba.conf does not have protection for this security issue. Regards, Devrim mads.tand...@schneider-electric.com wrote: >Hi All > > >I'm trying to understand the implications of the latest security fix to >postgresql [1]. > > >We have a setup were we in pg_hba.conf have limited the allowed

[GENERAL] CVE-2013-1899 security issue and limited IP addresses in pg_hba.conf

2013-04-04 Thread Mads . Tandrup
Hi AllI'm trying to understand the implications of the latest security fix to postgresql [1].We have a setup were we in pg_hba.conf have limited the allowed IP addresses of the clients. But does anyone know if CVE-2013-1899 allows an arbitrary attacker to use the exploits described in [1]?We are us

Re: [GENERAL] Why not cascade? (was: Using varchar primary keys)

2013-04-04 Thread Merlin Moncure
On Wed, Apr 3, 2013 at 2:58 AM, Gavan Schneider wrote: > On 3/4/13 at 1:49 PM, dix1wji...@sneakemail.com (Julian > tempura-at-internode.on.net |pg-gts/Basic|) wrote: > >> ... having to really think it out is probably a good sign that you >> should stick to a surrogate unless you are really sure. (

Re: [GENERAL] initdb of pg 9.0.13 fails on pg_authid

2013-04-04 Thread Tatsuo Ishii
> Robert writes: >> I'm having some trouble installing `9.0.13`. >>> creating template1 database in /opt/pg9013/data/base/1 ... ok >>> initializing pg_authid ... FATAL: wrong number of index expressions > > Our buildfarm member anchovy has been showing similar failures for > awhile, but no other

Re: [GENERAL] initdb of pg 9.0.13 fails on pg_authid

2013-04-04 Thread Tom Lane
Robert writes: > I'm having some trouble installing `9.0.13`. >> creating template1 database in /opt/pg9013/data/base/1 ... ok >> initializing pg_authid ... FATAL: wrong number of index expressions Our buildfarm member anchovy has been showing similar failures for awhile, but no others do, which

[GENERAL] initdb of pg 9.0.13 fails on pg_authid

2013-04-04 Thread Robert
I'm having some trouble installing `9.0.13`. Compiling worked just fine. (The only flags used were `--prefix=/opt/pg9013 --with-perl`). However after running bin/initdb, it fails: The files belonging to this database system will be owned by user "mobit". > > This user must also own the server pr