Re: [GENERAL] Clustering, parallelised operating system, super-computing

2010-05-13 Thread Brian Modra
On 14/05/2010, Bruce Momjian wrote: > Brian Modra wrote: >> Hi, >> I've been told that PostgreSQL and other similar databases don't work >> well on a parallelised operating system because they make good use of >> shared memory which does not cross the boundary between nodes in a >> cluster. >> >>

[GENERAL] PANIC: corrupted item pointer: 32766

2010-05-13 Thread Catalin BOIE
Hello! I have a serious problem with one of my tables. Version: postgresql-server-8.4.3-1.fc12.x86_64 Kernel: kernel-2.6.32.11-99.fc12.x86_64 I reindexed all indexes on that table, but I still cannot workaround this problem. Memory is ECC and the storage is RAID10 (BIOS reported it OK). How I

Re: [GENERAL] Pulling data from a constraint def

2010-05-13 Thread Alvaro Herrera
Excerpts from Tom Lane's message of vie may 14 00:32:12 -0400 2010: > Josh Kupershmidt writes: > > On Thu, May 13, 2010 at 8:08 PM, Tom Lane wrote: > >> Well, the inability to change the list of values is certainly an > >> unpleasant limitation, but is it so fatal that we should hide the > >> fea

Re: [GENERAL] Documentation availability as a single page of text

2010-05-13 Thread Alvaro Herrera
Excerpts from Peter Eisentraut's message of jue may 13 12:10:21 -0400 2010: > On ons, 2010-05-12 at 15:24 +0200, John Gage wrote: > > Yes it would. In fact, I have often wondered why this doesn't exist. > > How can I do it? > > cd doc/src/sgml > make html JADEFLAGS='-V nochunks -V rootchunk' >

Re: [GENERAL] Pulling data from a constraint def

2010-05-13 Thread Tom Lane
Josh Kupershmidt writes: > On Thu, May 13, 2010 at 8:08 PM, Tom Lane wrote: >> Well, the inability to change the list of values is certainly an >> unpleasant limitation, but is it so fatal that we should hide the >> feature from people who could possibly use it?  I think not. > I happened upon t

Re: [GENERAL] Pulling data from a constraint def

2010-05-13 Thread Josh Kupershmidt
On Thu, May 13, 2010 at 8:08 PM, Tom Lane wrote: > Well, the inability to change the list of values is certainly an > unpleasant limitation, but is it so fatal that we should hide the > feature from people who could possibly use it?  I think not. I happened upon this article relevant to the subje

Re: [GENERAL] Unpivot / uncrosstab support?

2010-05-13 Thread Josh.Vote
> -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of josh.v...@csiro.au > Sent: Thursday, 13 May 2010 10:41 AM > To: pgsql-general@postgresql.org > Subject: [ExternalEmail] [GENERAL] Unpivot / uncrosstab support? > > Hi

Re: [GENERAL] Clustering, parallelised operating system, super-computing

2010-05-13 Thread Bruce Momjian
Brian Modra wrote: > Hi, > I've been told that PostgreSQL and other similar databases don't work > well on a parallelised operating system because they make good use of > shared memory which does not cross the boundary between nodes in a > cluster. > > So I am wondering if any work is being done t

Re: [GENERAL] pg_dumpall for Postgres Database Daily Backup

2010-05-13 Thread Scott Marlowe
On Thu, May 13, 2010 at 9:50 AM, Wang, Mary Y wrote: > Hi, > > I'm running on Postgres 8.3.8.  My system admin is ready to set up a cron job > for a daily database backup. > By reading the documentation over here: > http://www.postgresql.org/docs/8.3/static/backup-dump.html#BACKUP-DUMP-ALL (I >

Re: [GENERAL] Pulling data from a constraint def

2010-05-13 Thread David Fetter
On Thu, May 13, 2010 at 08:08:31PM -0400, Tom Lane wrote: > David Fetter writes: > > On Thu, May 13, 2010 at 12:33:08AM -0400, Tom Lane wrote: > >> I'm surprised no one has yet suggested an ENUM type. > > > I didn't suggest it because I didn't know about it, but because > > I've found ENUM to be

Re: [GENERAL] Pulling data from a constraint def

2010-05-13 Thread Tom Lane
David Fetter writes: > On Thu, May 13, 2010 at 12:33:08AM -0400, Tom Lane wrote: >> I'm surprised no one has yet suggested an ENUM type. > I didn't suggest it because I didn't know about it, but because I've > found ENUM to be a trap for the unwary. > Very seldom are people absolutely certain th

Re: [GENERAL] Pulling data from a constraint def

2010-05-13 Thread David Fetter
On Thu, May 13, 2010 at 12:33:08AM -0400, Tom Lane wrote: > Josh Kupershmidt writes: > > On Wed, May 12, 2010 at 12:58 AM, David Fetter wrote: > >> If you've measured a performance issue for a table that tiny, it's a > >> bug that needs fixing in PostgreSQL. �What measurements have you done > >>

Re: [GENERAL] current_user in seucurity DEFINER functions

2010-05-13 Thread strk
On Thu, May 13, 2010 at 09:21:46AM +0200, Pavel Stehule wrote: > 2010/5/13 strk : > > In a security definer function current_user yelds the > > name of the function definer rather than invoker. > > Is it possible to fetch the invoker name instead ? How ? > > > > Thanks in advance. > > try to use s

Re: [GENERAL] autovacuum: 50% iowait for hours

2010-05-13 Thread Scott Marlowe
On Thu, May 13, 2010 at 4:05 PM, Joao Ferreira wrote: > > Hello all, > > I have a hard situation in hands. my autovacuum does not seem to be able > to get his job done; > > database is under active INSERTs/UPDATEs; > CPU is in aprox 50% iowait for the past 5 hours; > > I've tried turning off autov

Re: [GENERAL] autovacuum: 50% iowait for hours

2010-05-13 Thread Tom Lane
Joao Ferreira writes: > I have a hard situation in hands. my autovacuum does not seem to be able > to get his job done; > database is under active INSERTs/UPDATEs; > CPU is in aprox 50% iowait for the past 5 hours; > I've tried turning off autovacuum and the effect goes away; I turn it back > on

[GENERAL] autovacuum: 50% iowait for hours

2010-05-13 Thread Joao Ferreira
Hello all, I have a hard situation in hands. my autovacuum does not seem to be able to get his job done; database is under active INSERTs/UPDATEs; CPU is in aprox 50% iowait for the past 5 hours; I've tried turning off autovacuum and the effect goes away; I turn it back on and it goes back to 5

Re: [GENERAL] pg_dumpall for Postgres Database Daily Backup

2010-05-13 Thread Vick Khera
On Thu, May 13, 2010 at 11:50 AM, Wang, Mary Y wrote: > it looks like pg_dumpall > outfile is the best choice.  I'd like to ask the > community to reconfirm. We do an individual pg_dump on each DB separately, using the '-Fc' format. The only thing we miss from pg_dumpall we get via "pg_dumpall

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread Tom Lane
Stephen Frost writes: > * S G (sgennar...@gmail.com) wrote: >> I guess to really get down to the issue, I'm curious if what I'm doing is >> considered 'standard procedure' to others-- i.e. using funny workarounds >> like building the query in a text var and executing it with plpgsql's RETURN >> QU

Re: [GENERAL] Persistence problem

2010-05-13 Thread Tom Lane
"I. B." writes: > When I do this: > realResult = (mPoint *)palloc(result->length); > memcpy(realResult, result, result->length); > I get a right result in the same session, but corrupted in the next > one. I'm guessing a bit here, but I think what is happening is this: > typedef struct {

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread S G
> > It would help if you post the output from EXPLAIN ANALYZE for each case, > as this will hopefully show where the bottleneck is. > I'm glad you asked, and I think I've discussed enough about what *could-be* happening that I'd like to get my hands dirty with what's really going on. Maybe now I c

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread S G
> I wrote a blog article about this: Google for "Why is my function > slow?" Greg, great article. It's funny and humbling how I thought I'd invented the wheel with this workaround, but now it suddenly appears to be common practice. I guess I'm

Re: [GENERAL] pg_dumpall custom format?

2010-05-13 Thread Guillaume Lelarge
Le 13/05/2010 19:24, Thom Brown a écrit : > On 13 May 2010 17:49, Guillaume Lelarge wrote: > >> Le 13/05/2010 14:12, Thom Brown a écrit : >>> On 5 March 2009 12:08, Thom Brown wrote: [...] >>> I'm bringing this thread back to life to see if there are any further >>> thoughts on this. It wo

Re: [GENERAL] [KB] Information required - Thanks

2010-05-13 Thread Steve Crawford
On 05/13/2010 09:30 AM, Richard Broersma wrote: wrote: I am trying to formulate a checklist for securing... Here is an excellent presentation put together by Josh Berkus http://www.pgexperts.com/document.html?id=3 Here's another good one: http://www.ibm.com/developerworks

Re: [GENERAL] pg_dumpall custom format?

2010-05-13 Thread Thom Brown
On 13 May 2010 17:49, Guillaume Lelarge wrote: > Le 13/05/2010 14:12, Thom Brown a écrit : > > On 5 March 2009 12:08, Thom Brown wrote: > >> [...] > > I'm bringing this thread back to life to see if there are any further > > thoughts on this. It would be nice to have a complete backup of a > da

Re: [GENERAL] Question about Beta for Windows 64 bits

2010-05-13 Thread Dave Page
Psqlodbc already supports 64bit. We just need to package it for win64. On 5/13/10, Joshua D. Drake wrote: > On Thu, 2010-05-13 at 19:08 +0200, Magnus Hagander wrote: >> On Thu, May 13, 2010 at 7:01 PM, Joshua D. Drake >> wrote: >> > On Thu, 2010-05-13 at 15:15 +0100, Dave Page wrote: >> >> On Th

Re: [GENERAL] Question about Beta for Windows 64 bits

2010-05-13 Thread Joshua D. Drake
On Thu, 2010-05-13 at 19:08 +0200, Magnus Hagander wrote: > On Thu, May 13, 2010 at 7:01 PM, Joshua D. Drake > wrote: > > On Thu, 2010-05-13 at 15:15 +0100, Dave Page wrote: > >> On Thu, May 13, 2010 at 3:03 PM, Igor Neyman > >> wrote: > >> > Will 9.0 also have 64-bit ODBC driver? > >> > >> Eve

Re: [GENERAL] Question about Beta for Windows 64 bits

2010-05-13 Thread Magnus Hagander
On Thu, May 13, 2010 at 7:01 PM, Joshua D. Drake wrote: > On Thu, 2010-05-13 at 15:15 +0100, Dave Page wrote: >> On Thu, May 13, 2010 at 3:03 PM, Igor Neyman wrote: >> > Will 9.0 also have 64-bit ODBC driver? >> >> Eventually. > > What would be the benefit? We considered it with ODBCng but couldn

Re: [GENERAL] Question about Beta for Windows 64 bits

2010-05-13 Thread Joshua D. Drake
On Thu, 2010-05-13 at 15:15 +0100, Dave Page wrote: > On Thu, May 13, 2010 at 3:03 PM, Igor Neyman wrote: > > Will 9.0 also have 64-bit ODBC driver? > > Eventually. What would be the benefit? We considered it with ODBCng but couldn't find any real suitable purpose. Joshua D. Drake > > > --

Re: [GENERAL] pg_dumpall for Postgres Database Daily Backup?

2010-05-13 Thread Joshua D. Drake
On Thu, 2010-05-13 at 09:15 -0700, Wang, Mary Y wrote: > Hi, > > I'm running on Postgres 8.3.8. My system admin is ready to set up a cron job > for a daily database backup. > By reading the documentation over here: > http://www.postgresql.org/docs/8.3/static/backup-dump.html#BACKUP-DUMP-ALL (I

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread Stephen Frost
S G, * S G (sgennar...@gmail.com) wrote: > I guess to really get down to the issue, I'm curious if what I'm doing is > considered 'standard procedure' to others-- i.e. using funny workarounds > like building the query in a text var and executing it with plpgsql's RETURN > QUERY EXECUTE command.

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Also re: Raymond's request, I tried humoring myself with the EXPLAIN output, > and I actually don't see anything useful-looking at all when I run it on a > stored function like I'm using. Is there any way to utilize EXPLAIN on a > query embed

Re: [GENERAL] [HACKERS] Retiring from the PostgreSQL core team

2010-05-13 Thread David Fetter
On Thu, May 13, 2010 at 12:24:47AM -0400, Jan Wieck wrote: > To whom it may concern, > > this is to inform the PostgreSQL community of my retirement from my > PostgreSQL core team position. > > Over the past years I have not been able to dedicate as much time to > PostgreSQL as everyone would hav

Re: [GENERAL] pg_dumpall custom format?

2010-05-13 Thread Guillaume Lelarge
Le 13/05/2010 14:12, Thom Brown a écrit : > On 5 March 2009 12:08, Thom Brown wrote: >> [...] > I'm bringing this thread back to life to see if there are any further > thoughts on this. It would be nice to have a complete backup of a database > cluster in custom format, and use pg_restore to rest

[GENERAL] UUID + RPM + 64 bit

2010-05-13 Thread Christopher Browne
A colleague pointed me to an issue that RPMs for 64 bit Linux (not certain if this was oriented to CentOS/Fedora/RHEL) did not include the uuid-ossp portion, and a client apparently is mighty keen on: a) Using stock packages, and b) Generating UUIDs on the DBMS side, and c) Using 64 bit Linux (a

[GENERAL] pg_dumpall for Postgres Database Daily Backup?

2010-05-13 Thread Wang, Mary Y
Hi, I'm running on Postgres 8.3.8. My system admin is ready to set up a cron job for a daily database backup. By reading the documentation over here: http://www.postgresql.org/docs/8.3/static/backup-dump.html#BACKUP-DUMP-ALL (I only found the documentation for 8.3.10), and it looks like pg_dum

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread S G
Thanks Stephen, that makes a lot of sense based on some research I was doing yesterday. I'm still a bit green to understand the inner workings of the planner and all the stuff coming out of EXPLAIN, but I'm definitely trying to keep it all in mind as I progress at this stuff. I guess to really ge

Re: [GENERAL] [KB] Information required - Thanks

2010-05-13 Thread Richard Broersma
On Thu, May 13, 2010 at 6:59 AM, Joel Alphonso wrote: > I am trying to formulate a checklist for securing or  securely configuring > the PostgreSQL DB. Wondering if you already have some thing in place or > perhaps a hardening document. Could you point me to some place where i could > find this.

[GENERAL] pg_dumpall for Postgres Database Daily Backup

2010-05-13 Thread Wang, Mary Y
Hi, I'm running on Postgres 8.3.8. My system admin is ready to set up a cron job for a daily database backup. By reading the documentation over here: http://www.postgresql.org/docs/8.3/static/backup-dump.html#BACKUP-DUMP-ALL (I only found the documentation for 8.3.10), and it looks like pg_dum

Re: [GENERAL] Documentation availability as a single page of text

2010-05-13 Thread Peter Eisentraut
On ons, 2010-05-12 at 15:24 +0200, John Gage wrote: > Yes it would. In fact, I have often wondered why this doesn't exist. > How can I do it? cd doc/src/sgml make html JADEFLAGS='-V nochunks -V rootchunk' That will produce an index.html file with the entire documentation in it. -- Sent vi

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread Stephen Frost
S G, * S G (sgennar...@gmail.com) wrote: > Can anyone lend a guess as to what I'm running into here, or do I need to > provide more specifics to recreate the issue? It's repeatable, but it's a > fair bit of data for me to just post in here as-is. I've already discovered > a few creative workarou

Re: [GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread Raymond O'Donnell
On 13/05/2010 16:59, S G wrote: > Can anyone lend a guess as to what I'm running into here, or do I need > to provide more specifics to recreate the issue? It's repeatable, but > it's a fair bit of data for me to just post in here as-is. I've already > discovered a few creative workarounds (e.g.

Re: [GENERAL] Persistence problem

2010-05-13 Thread I. B.
I'll try to explain with as less code as possible. One of the types I wanted to create is called mpoint. This is a part of code: Datum mpoint_in(PG_FUNCTION_ARGS) { char *str = PG_GETARG_CSTRING(0); mPoint *result; result = (mPoint *) create_mPoint(str); if (result == NULL) {

Re: [GENERAL] Persistence problem

2010-05-13 Thread I. B.
UPDATE: When I do this: realResult = (mPoint *)palloc(result->length); memcpy(realResult, result, result->length); I get a right result in the same session, but corrupted in the next one. I've also found one place in create_mPoint where I used realloc. But why would it matter if I copi

Re: [GENERAL] Persistence problem

2010-05-13 Thread I. B.
Thanks for the reply. However, I don't really understand how it works... Can you help? How should this function look like? Can I still create the type the same way I did for now and add something like this: Datum mpoint_in(PG_FUNCTION_ARGS) { char *str = PG_GETARG_CSTRING(0); mPoint *re

[GENERAL] [KB] Information required - Thanks

2010-05-13 Thread Joel Alphonso
Hi, I am trying to formulate a checklist for securing or securely configuring the PostgreSQL DB. Wondering if you already have some thing in place or perhaps a hardening document. Could you point me to some place where i could find this. Thanks, Joel

[GENERAL] SQL code runs slower as a stored function

2010-05-13 Thread S G
Hi all, It's my first time posting to the list, though it's helped me through numerous jams throughout the past year as I've been familiarizing myself with all of the wonderful postgresisms =) Just yesterday, I made what I thought would be a very minor and routine modification to a stored functio

Re: [GENERAL] Question about Beta for Windows 64 bits

2010-05-13 Thread Dave Page
On Thu, May 13, 2010 at 3:03 PM, Igor Neyman wrote: > Will 9.0 also have 64-bit ODBC driver? Eventually. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] Question about Beta for Windows 64 bits

2010-05-13 Thread Igor Neyman
Will 9.0 also have 64-bit ODBC driver? Igor Neyman > -Original Message- > From: Dave Page [mailto:dp...@pgadmin.org] > Sent: Wednesday, May 12, 2010 11:34 AM > To: Igor Neyman > Cc: Luis Guillermo Dangel; pgsql-general@postgresql.org > Subject: Re: Question about Beta for Windows 64 bits

Re: [GENERAL] Pulling data from a constraint def

2010-05-13 Thread Gauthier, Dave
Hm Very Interesting idea. I';l have to try that one. One difference that may be an issue in other apps (not mine though) might be the inability to defer constraint checking using enum. Still, enum looks very appealing. And more portable, cleaner than parsing the values out of pg_co

Re: [GENERAL] Retiring from the PostgreSQL core team

2010-05-13 Thread Bill Moran
In response to Jan Wieck : > To whom it may concern, > > this is to inform the PostgreSQL community of my retirement from my > PostgreSQL core team position. > > Over the past years I have not been able to dedicate as much time to > PostgreSQL as everyone would have liked. The main reason for th

Re: [GENERAL] pg_dumpall custom format?

2010-05-13 Thread Thom Brown
On 5 March 2009 12:08, Thom Brown wrote: > Thanks for the suggestion Marc. It would still be nice to have the custom > format included as an option though with pg_restore supporting it, just for > consistency. > > I will, however, follow your recommendation. > > Thom > > 2009/3/5 Marc Mamin > >

Re: [GENERAL] Persistence problem

2010-05-13 Thread Martijn van Oosterhout
On Thu, May 13, 2010 at 12:04:56PM +0200, I. B. wrote: > > > I'll try to explain with as less code as possible. > One of the types I wanted to create is called mpoint. This is a part of code: > typedef struct { > int4 length; > int noOfUnits; > void *units; // this is later casted

Re: [GENERAL] Authentication method for web app

2010-05-13 Thread Ivan Voras
On 05/13/10 09:21, Leonardo F wrote: > Hi all, > > > we're going to deploy a web app that manages users/roles for another > application. > > We want the database to be "safe" from changes made by malicious > users. > > I guess our options are: > > 1) have the db listen only on local connection

Re: [GENERAL] [HACKERS] Retiring from the PostgreSQL core team

2010-05-13 Thread Simon Riggs
On Thu, 2010-05-13 at 00:24 -0400, Jan Wieck wrote: > Over the past years I have not been able to dedicate as much time to > PostgreSQL as everyone would have liked. The main reason for that was > that I was swamped with other work and private matters and simply > didn't have time. I did follow th

Re: [GENERAL] [HACKERS] Retiring from the PostgreSQL core team

2010-05-13 Thread Andrew Dunstan
Jan Wieck wrote: To whom it may concern, this is to inform the PostgreSQL community of my retirement from my PostgreSQL core team position. Over the past years I have not been able to dedicate as much time to PostgreSQL as everyone would have liked. The main reason for that was that I was swa

[GENERAL] Clustering, parallelised operating system, super-computing

2010-05-13 Thread Brian Modra
Hi, I've been told that PostgreSQL and other similar databases don't work well on a parallelised operating system because they make good use of shared memory which does not cross the boundary between nodes in a cluster. So I am wondering if any work is being done to make it possible to have a sing

Re: [GENERAL] current_user in seucurity DEFINER functions

2010-05-13 Thread Pavel Stehule
2010/5/13 strk : > In a security definer function current_user yelds the > name of the function definer rather than invoker. > Is it possible to fetch the invoker name instead ? How ? > > Thanks in advance. try to use session_user regards Pavel Stehule > > --strk; > >  ()   Free GIS & Flash con

[GENERAL] Authentication method for web app

2010-05-13 Thread Leonardo F
Hi all, we're going to deploy a web app that manages users/roles for another application. We want the database to be "safe" from changes made by malicious users. I guess our options are: 1) have the db listen only on local connections; basically when the machine is accessed the db could be "co