[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

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

2013-04-04 Thread Tom Lane
Robert drb...@fatalsyntax.com 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

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

2013-04-04 Thread Tatsuo Ishii
Robert drb...@fatalsyntax.com 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,

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 pg-...@snkmail.com 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

[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 ifCVE-2013-1899 allows an arbitrary attacker to use the exploits described in [1]?We are

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 IP

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 does

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 Mads . Tandrup
Hi Bruce.Didn't catch that in the announcement.Thanks for clearing out the confusion.Best regards,Mads

[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

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Merlin Moncure
On Thu, Apr 4, 2013 at 4:32 PM, Condor con...@stz-bg.com 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

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 con...@stz-bg.com 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

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Merlin Moncure
On Thu, Apr 4, 2013 at 4:49 PM, Condor con...@stz-bg.com 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

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

Re: [GENERAL] Need advice to avoid ORDER BY

2013-04-04 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com 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

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 t...@sss.pgh.pa.us wrote: Merlin Moncure mmonc...@gmail.com 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

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

2013-04-04 Thread David Noel
On 4/3/13, Kevin Grittner kgri...@ymail.com wrote: David Noel david.i.n...@gmail.com wrote: On 4/2/13, Kevin Grittner kgri...@ymail.com wrote: David Noel david.i.n...@gmail.com wrote: 'select * from pg_stat_activity' shows that the queries are not waiting, and are in the idle state. The

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

2013-04-04 Thread David Noel
On 4/2/13, John R Pierce pie...@hogranch.com 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. .

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

2013-04-04 Thread David Noel
On 4/3/13, Eduardo Morras emorr...@yahoo.es 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)

[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,

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 con...@stz-bg.com wrote: Hello, I have one query in my postgresql 9.2.3 that took 137 ms to me executed and looking a way what

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

[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

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

2013-04-04 Thread Ian Lawrence Barwick
2013/4/5 Konstantin Izmailov pgf...@gmail.com: 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