Re: [GENERAL] Wiki page on vacuum full

2009-11-25 Thread Craig Ringer
Craig Ringer wrote: > Hi folks > > Since it seems to come up a lot, I've added some info on the pitfalls of > VACUUM FULL to the wiki: > > http://wiki.postgresql.org/index.php?title=VACUUM_FULL Similarly, a page on tools to collect and analyze performance data at the system level - ie outside Pg

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Craig Ringer
Gauthier, Dave wrote: > Actually, limiting resources on a per DB basis would work for me too. > > I thin kOracle had a thing where you could limit resources, or at least > prioritize users. Pg isn't Oracle - for which we can be alternately extremely thankful and somewhat frustrated. Lots of shin

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Gauthier, Dave
Actually, limiting resources on a per DB basis would work for me too. I thin kOracle had a thing where you could limit resources, or at least prioritize users. Someone else was reporting this to me, and again, it was a MySQL DB that I'll eventually be replacing with PG. I'll inherit this probl

[GENERAL] Wiki page on vacuum full

2009-11-25 Thread Craig Ringer
Hi folks Since it seems to come up a lot, I've added some info on the pitfalls of VACUUM FULL to the wiki: http://wiki.postgresql.org/index.php?title=VACUUM_FULL It intentionally avoids going into details of why index bloat is created, etc, and just tries to provide accessible advice as to bette

Re: [GENERAL] How use input parameter as path to COPY in function?

2009-11-25 Thread Tom Lane
Bill Todd writes: > I am missing something basic. How can I use an input parameter as the > destination path in a COPY statement in a function. plpgsql can only substitute parameter values into places where a data value is called for in a DML statement (ie, SELECT/INSERT/UPDATE/DELETE). To use

[GENERAL] How use input parameter as path to COPY in function?

2009-11-25 Thread Bill Todd
I am missing something basic. How can I use an input parameter as the destination path in a COPY statement in a function. The following fails with a syntax error at or near the parameter. CREATE OR REPLACE FUNCTION dvd.export_tables(IN export_path text) RETURNS void AS $$ BEGIN copy dvd.genr

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Craig Ringer
Craig Ringer wrote: > Gauthier, Dave wrote: > >> Is there a way in Postgres to limit how much cpu, memory, other >> resources a certain DB gets? A MySQL DB that I'm now replacing with PG >> has been having problems with run-away users that pound one DB with >> intense processes running periodicall

Re: [GENERAL] Mysql migration to Postgresql

2009-11-25 Thread Craig Ringer
mrciken wrote: > Hello, > > Currently, we are using Mysql: we would like to change. Now, we would like > to use Postgresql. Only problem is that most of our customer addresses and > other information are on Mysql. > Can you help us with this? There are a few options available to you. This has b

Re: [GENERAL] Mysql migration to Postgresql

2009-11-25 Thread Filip Rembiałkowski
this was a very general question. you can use any ETL / script to transfer data from mysql to postgres. for me, sometimes, the following path works: 1. first try to dump the mysql database SQL schema in ANSI-conformant format (consult mysql support how to do it). import this into fresh postgres

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Craig Ringer
Gauthier, Dave wrote: > Is there a way in Postgres to limit how much cpu, memory, other > resources a certain DB gets? A MySQL DB that I'm now replacing with PG > has been having problems with run-away users that pound one DB with > intense processes running periodically in cron jobs. The effect i

Re: [GENERAL] Getting "duplicate key value violates unique constraint" on 2nd run of function.

2009-11-25 Thread David Kerr
On Wed, 2009-11-25 at 16:49 -0700, Scott Marlowe wrote: > On Wed, Nov 25, 2009 at 3:19 PM, David Kerr wrote: > > Howdy all. > > > > I've got a function that basically does this: > > > > DELETE FROM test where id = $1 > > INSERT into test (id) values ($1); > > You're missing a semi-colon up there,

Re: [GENERAL] Postgres database performance on 6 core Opteron vs 4 core Xeon

2009-11-25 Thread Scott Marlowe
On Wed, Nov 25, 2009 at 11:20 AM, Postgres User wrote: > Has anyone seen any performance metrics comparing the Opteron 6-core > Istanbul class processor aginst the 4-core Xeon e5500 series > processor, esp running a dataase?  Or has anyone compared these 2 > processor options before ordering a Pos

Re: [GENERAL] Getting "duplicate key value violates unique constraint" on 2nd run of function.

2009-11-25 Thread Scott Marlowe
On Wed, Nov 25, 2009 at 3:19 PM, David Kerr wrote: > Howdy all. > > I've got a function that basically does this: > > DELETE FROM test where id = $1 > INSERT into test (id) values ($1); You're missing a semi-colon up there, is that a problem? > id is the primay key, so it has to be unique. > > F

Re: [GENERAL] pg_standby instructions

2009-11-25 Thread Devrim GÜNDÜZ
On Wed, 2009-11-25 at 17:24 -0500, akp geek wrote: > OSError: [Errno 2] No such file or directory: '/opt/postgres/archive/ > 10.100.101.150' Did you see this message? -- Devrim GÜNDÜZ, RHCE Command Prompt - http://www.CommandPrompt.com devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linu

Re: [GENERAL] Data Warehousing

2009-11-25 Thread melina386
Here's a link to the docs for rskeymgmt, a command line utility for changing the key used to access the catalog. http://msdn2.microsoft.com/en-us/library/aa179504(SQL.80).aspx You might also need to use the rsactivate, and rsconfig utilities to get everything working. ---

[GENERAL] Mysql migration to Postgresql

2009-11-25 Thread mrciken
Hello, Currently, we are using Mysql: we would like to change. Now, we would like to use Postgresql. Only problem is that most of our customer addresses and other information are on Mysql. Can you help us with this? Thank you. -- View this message in context: http://old.nabble.com/Mysql-mig

Re: [GENERAL] Re: I need help creating a composite type with some sort of constraints.

2009-11-25 Thread John Oyler
On Wed, Nov 25, 2009 at 1:02 PM, Merlin Moncure wrote: > > IMO, ('abc', 'def')::foo honestly should honor constraints on foo. > This probably isn't controversial. So who do we need to convince to make this happen? The things we could do with this kick ass. Maybe the details of the file I linked a

[GENERAL] PostgreSQL RPM packages for Fedora-12 released

2009-11-25 Thread Devrim GÜNDÜZ
Thanks everyone who pestered me last week after Fedora-12 was announced. :) PostgreSQL RPM packages for Fedora-12 was released: http://yum.pgsqlrpms.org/8.4/fedora/fedora-12-i386/repoview/ http://yum.pgsqlrpms.org/8.4/fedora/fedora-12-x86_64/repoview/ http://yum.pgsqlrpms.org/8.3/fedora/fedora-12

Re: [GENERAL] pg_standby instructions

2009-11-25 Thread Joshua D. Drake
On Wed, 2009-11-25 at 17:24 -0500, akp geek wrote: > I have been trying to use the PITR tools , I am running into the > following issue. I don't know how to resolve it. can you please help? > I tried to search the online blogs, I did not find much for the error. > OSError: [Errno 2] No such file o

Re: [GENERAL] pg_standby instructions

2009-11-25 Thread akp geek
I have been trying to use the PITR tools , I am running into the following issue. I don't know how to resolve it. can you please help? I tried to search the online blogs, I did not find much for the error. NOTICE: check_config_func() NOTICE: Performing standard archive NOTICE: archive_func() NOTIC

[GENERAL] Getting "duplicate key value violates unique constraint" on 2nd run of function.

2009-11-25 Thread David Kerr
Howdy all. I've got a function that basically does this: DELETE FROM test where id = $1 INSERT into test (id) values ($1); id is the primay key, so it has to be unique. First time I run it, works great. If I run it again in the same session, I get ERROR: duplicate key value violates unique c

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Bruno Lavoie
no way for PostgreSQL to have something like Profiles to limite ressource usage for users? Is this feature planned for next version? 8-) Jean-Yves F. Barbier a écrit : Gauthier, Dave a écrit : Hi: Is there a way in Postgres to limit how much cpu, memory, other resources a certain DB ge

[GENERAL] Postgres database performance on 6 core Opteron vs 4 core Xeon

2009-11-25 Thread Postgres User
Has anyone seen any performance metrics comparing the Opteron 6-core Istanbul class processor aginst the 4-core Xeon e5500 series processor, esp running a dataase?  Or has anyone compared these 2 processor options before ordering a Postgres server? The 6 core processor should offer a clear edge bu

Re: [GENERAL] pgsql 'prefix'

2009-11-25 Thread Dimitri Fontaine
Hi, Le 23 nov. 2009 à 17:04, Harald Fuchs a écrit : > SELECT id, record > FROM myrecords > WHERE record @> '127' > ORDER BY length(record::text) DESC > LIMIT 1; In prefix 1.0.0 you can say ORDER BY length(record) DESC directly... -- Dimitri Fontaine PostgreSQL DBA, Architecte -- Sent via pgsq

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Jean-Yves F. Barbier
Bill Moran a écrit : > In response to "Gauthier, Dave" : > >> Hi: >> >> Is there a way in Postgres to limit how much cpu, memory, other resources a >>certain DB gets? A MySQL DB that I'm now replacing with PG has been having >>problems with run-away users that pound one DB with intense processe

Re: [GENERAL] Re: I need help creating a composite type with some sort of constraints.

2009-11-25 Thread Merlin Moncure
On Wed, Nov 25, 2009 at 12:15 AM, John Oyler wrote: > And, since composite types aren't true tables, I can't write a trigger > either for it either that checks values (though, with the variations > you've shown me, I'll probably test those just to see what happens). > > So, if anyone has any ideas

Re: [GENERAL] change of oid values?

2009-11-25 Thread Thom Brown
2009/11/25 Yadira Lizama Mue > Hi, > I'd like to know if the values of postgres's Oids can changes its values > for the same object. I want to use them in my aplication, but I'm afraid > they could change and I get errors. > > I use the field Oid of table pg_type to identify the type of a field

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Bill Moran
In response to "Gauthier, Dave" : > Hi: > > Is there a way in Postgres to limit how much cpu, memory, other resources a > certain DB gets? A MySQL DB that I'm now replacing with PG has been having > problems with run-away users that pound one DB with intense processes running > periodically i

[GENERAL] change of oid values?

2009-11-25 Thread Yadira Lizama Mue
Hi, I'd like to know if the values of postgres's Oids can changes its values for the same object. I want to use them in my aplication, but I'm afraid they could change and I get errors. I use the field Oid of table pg_type to identify the type of a field in a query. It could bring me errors in

Re: [GENERAL] limiting resources to users

2009-11-25 Thread Jean-Yves F. Barbier
Gauthier, Dave a écrit : > Hi: > > > > Is there a way in Postgres to limit how much cpu, memory, other > resources a certain DB gets? A MySQL DB that I’m now replacing with PG > has been having problems with run-away users that pound one DB with > intense processes running periodically in cron

[GENERAL] Postgres database performance on 6 core Opteron vs 4 core Xeon

2009-11-25 Thread Postgres User
Has anyone seen any performance metrics comparing the Opteron 6-core Istanbul class processor aginst the 4-core Xeon e5500 series processor, esp running a dataase? Or has anyone compared these 2 processor options before ordering a Postgres server? The 6 core processor should offer a clear edge bu

Re: [GENERAL] limiting resources to users

2009-11-25 Thread John R Pierce
Gauthier, Dave wrote: Hi: Is there a way in Postgres to limit how much cpu, memory, other resources a certain DB gets? A MySQL DB that I’m now replacing with PG has been having problems with run-away users that pound one DB with intense processes running periodically in cron jobs. The effect

[GENERAL] limiting resources to users

2009-11-25 Thread Gauthier, Dave
Hi: Is there a way in Postgres to limit how much cpu, memory, other resources a certain DB gets? A MySQL DB that I'm now replacing with PG has been having problems with run-away users that pound one DB with intense processes running periodically in cron jobs. The effect is that it takes up al

Re: [GENERAL] pgsql 'prefix' error

2009-11-25 Thread Harald Fuchs
In article <87tywid19x@hi-media-techno.com>, Dimitri Fontaine writes: > The BTree opclass is not made to resist to overlapping data. Maybe in > this case though we could say that 12 contains less elements than 1 so > it's less than 1. Here's a test to redefine the pr_cmp() operator in > term

Re: [BUGS] Re: [GENERAL] How duplicate data produce when a UNIQUE index exite ?

2009-11-25 Thread Greg Smith
Tom Lane wrote: The least painful route for a user of an RPM build would be to grab the latest SRPM they can find and then modify that specfile to reference the newer tarball. Rebuilding RPMs from source has its own challenges, if they're not already using a packaged build that may not necessa

Re: [GENERAL] pgsql 'prefix' error

2009-11-25 Thread Dimitri Fontaine
Hi, Bino Oetomo writes: > ERROR: duplicate key value violates unique constraint "myrecords_pkey" > CONTEXT: COPY myrecords, line 2: "12" I think I should add the following code comment to the documentation, if not already done: /* * We invent a prefix_range ordering for convenience, but that's

Re: [BUGS] Re: [GENERAL] How duplicate data produce when a UNIQUE index exite ?

2009-11-25 Thread Tom Lane
Greg Smith writes: > That GCC string suggests this is a RHEL3 system, which would have > shipped with PostgreSQL 7.3. Not sure how they got 8.1 onto there, but a > later 8.1 is certainly a useful first step to take here, before they get > any more corruption from that ancient version when trying t

Re: [GENERAL] DBD::Pg 2.15.1 compilation failed

2009-11-25 Thread Alexandra Roy
Hi Laurenz, hi all, My problem with DBD::Pg is solved. I have used the perl 64-bit, and re-compile DBI, DBD::Oracle, DBD::Pg, etc... using 64-bit libraries and everything works fine. DBD::Pg has been built successfully ! The 64-bit build is possible. I have several problems with DBD::Oracle,

[GENERAL] 答复: [GENERAL] How duplicate data produ ce when a UNIQUE index exite ?

2009-11-25 Thread RD黄永卫
发件人: Scott Marlowe [mailto:scott.marl...@gmail.com] 发送时间: 2009年11月25日 14:44 收件人: RD黄永卫 抄送: pgsql-b...@postgresql.org; pgsql-general@postgresql.org 主题: Re: [GENERAL] How duplicate data produce when a UNIQUE index exite ? 2009/11/24 RD黄永卫 : > Dear all, > > > > When "reindex" operation do,this er

Re: [GENERAL] Re: I need help creating a composite type with some sort of constraints.

2009-11-25 Thread John Oyler
Never fails. About 5 minutes after posting a URL, my cable modem decides to get a new IP (having kept it since May). http://71.228.226.35/~john/custom_data_types.sql -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.

Re: [GENERAL] Excluding null return values from functions

2009-11-25 Thread Pavel Stehule
2009/11/25 Jason Armstrong : > How do I give a condition on the return value of a function (for > example plperl)? > > I have a perl search function that returns either a bigint, or undef > if nothing is found. I want to exclude the undef/null return values > from my select statement, something lik

[GENERAL] Excluding null return values from functions

2009-11-25 Thread Jason Armstrong
How do I give a condition on the return value of a function (for example plperl)? I have a perl search function that returns either a bigint, or undef if nothing is found. I want to exclude the undef/null return values from my select statement, something like: sql> select search(data, 'field', 'v

Re: [GENERAL] [PERFORM] Strange performance degradation

2009-11-25 Thread Matthew Wakeling
On Tue, 24 Nov 2009, Denis Lussier wrote: Bouncing the app will roll back the transactions. Depends on the application. Some certainly use a shutdown hook to flush data out to a database cleanly. Obviously if you kill -9 it, then all bets are off. Matthew -- Software suppliers are trying t