Re: [GENERAL] Query sometimes takes down server

2009-01-15 Thread Jeff Davis
On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote: > > > > > I have not looked into the detail of the explain, and I do see visually > > > that very different plans are being chosen. > > > > > > > It would help to share these plans with us... > > > See EXPLAIN ANALYZE below for three

Re: [GENERAL] Initial ugly reverse-translator

2009-01-15 Thread Oleg Bartunov
Hi, ltree and pg_trgm with UTF8 support are available from CVS HEAD, see See http://archives.postgresql.org/pgsql-committers/2008-06/msg00356.php http://archives.postgresql.org/pgsql-committers/2008-11/msg00139.php Oleg On Fri, 16 Jan 2009, pepone.onrez wrote: On Sat, Apr 19, 2008 at 6:10 PM,

[GENERAL] Question regarding Postgres + OpenSSL + FIPs

2009-01-15 Thread Dhaval Shah
I am setting up Postgres for OpenSSL + FIPs. I am compiling Postgres with OpenSSL FIPS library using the "-with-openssl" option. The question I have is, just doing that suffice? Or do I have to modify the postgres source code? Since I read through the OpenSSL FIPS documentation, it mentions to t

Re: [GENERAL] Query sometimes takes down server

2009-01-15 Thread marcin mank
> I have a dynamically built query that will periodically(2 times a day and > becoming more frequent) make my server totally unresponsive. does this query involve more than geqo_threshold (default 12) tables? If so, this most probably is geqo (genetic query optimizer) kicking in. Try to fiddle wi

HTML email (was: Re: [GENERAL] Vacuum and Reindex hangs)

2009-01-15 Thread Ivan Sergio Borgonovo
On Thu, 15 Jan 2009 12:56:51 -0800 "Joshua D. Drake" wrote: > I know many perfectly intelligent people that are better served > through diagrams, pdf and color than a mailing list. Most of them > make sure geeks like us, *EAT*. > Does that mean they are not intelligent or perhaps that there > ta

Re: [GENERAL] Query sometimes takes down server

2009-01-15 Thread Jeff Davis
On Thu, 2009-01-15 at 18:44 -0600, Jason Long wrote: > The query that hangs the system is requesting a count(*) > based on some parameters the users selects. Can you show an example of the full offending query? How big is the table? > And maybe 1 in 20 will not complete. If you really have nothi

[GENERAL] Query sometimes takes down server

2009-01-15 Thread Jason Long
I am having a serious problem with my application and I hope someone can help me out. This could not happen at a worse time as a consulting firm is at my clients to recommend a new financial system and the inventory system(which I developed) keeps locking up. I have a dynamically built query t

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Justin Pasher
Tom Lane wrote: I read it like this: #0 0x0827441d in MemoryContextAlloc () <-- real #1 0x08274467 in MemoryContextStrdup ()<-- real #2 0x0826501c in database_getflatfilename () <-- real #3 0x0826504e in database_getflatfilename () <-- must be write_database_file #4 0x08

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Hmm. This isn't very trustworthy for lack of debug symbols (what we're >> probably looking at are the nearest global function names before the >> actual locations). > The lack of debug symbols makes this all mere guesses though. The > backtrace did no

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Alvaro Herrera
Tom Lane wrote: > Hmm. This isn't very trustworthy for lack of debug symbols (what we're > probably looking at are the nearest global function names before the > actual locations). However, it strongly suggests that something is > broken in the active memory context, and the most likely explanat

Re: [GENERAL] How good is the default values for autovacuum?

2009-01-15 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 3:49 PM, Bjørn T Johansen wrote: > Just wondering if I need to change the defalt values for autovacuum in > version 8.3.5? They're fairly good. A good way to see if it's working for you is to let autovacuum run for a few days with your server handling a normal load, and

Re: [GENERAL] Initial ugly reverse-translator

2009-01-15 Thread pepone . onrez
On Sat, Apr 19, 2008 at 6:10 PM, Oleg Bartunov wrote: > On Sat, 19 Apr 2008, Tom Lane wrote: > >> Craig Ringer writes: >>> >>> Tom Lane wrote: I don't really see the problem. I assume from your reference to pg_trgm that you're using trigram similarity as the prefilter for potentia

[GENERAL] How good is the default values for autovacuum?

2009-01-15 Thread Bjørn T Johansen
Just wondering if I need to change the defalt values for autovacuum in version 8.3.5? Regards, BTJ -- --- Bjørn T Johansen b...@havleik.no -

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Tom Lane
Justin Pasher writes: > Program terminated with signal 11, Segmentation fault. > #0 0x0827441d in MemoryContextAlloc () > (gdb) bt > #0 0x0827441d in MemoryContextAlloc () > #1 0x08274467 in MemoryContextStrdup () > #2 0x0826501c in database_getflatfilename () > #3 0x0826504e in database_getf

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 2:24 PM, Jason Long wrote: > Scott Marlowe wrote: > You got me. I have a set of mirrored raptors. I am not sure the disk i/o > subsystem is a bottleneck. > The whole DB is 50 mb with minimal users. Then you're only ever writing to the db, and 50Meg is teeny tiny. Even m

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Justin Pasher
Tom Lane wrote: Having debug symbols would be more useful, but unless the binary is totally stripped, a backtrace might provide enough info without that. Try it and see if you get any function names in the trace, or only numbers. (BTW, does Debian have anything comparable to Red Hat's debuginfo

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Tom Lane
Justin Pasher writes: > I'll let you know when I get a chance to get a core dump from the > process. I assume I will need a version of Postgres built with debug > symbols for it to be useful? I'm not seeing one in the standard Debian > repositories, so I might have to compile from source. Havi

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Justin Pasher
Tom Lane wrote: Justin Pasher writes: Richard Huxton wrote: Segmentation fault - probably a bug or bad RAM. It's a relatively new machine, but that's obviously a possibility with any hardware. I haven't seen any other programs experiencing problems on the box, but the Postgres

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Alvaro Herrera
Andreas Wenk wrote: > Yes thats correct with the IP address range. Maybe I did not understand > the auth concept yet. I thought, that with METHOD set to md5, a md5 > hashed password is required. The password is submitted with the PHP 5 > pg_connect function - as plain text. It is specified

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Tom Lane
Justin Pasher writes: > Richard Huxton wrote: >> Segmentation fault - probably a bug or bad RAM. > It's a relatively new machine, but that's obviously a possibility with > any hardware. I haven't seen any other programs experiencing problems on > the box, but the Postgres daemon is the one that

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Hi Tom, Tom Lane schrieb: Andreas Wenk writes: In pg_hba.conf we have: # TYPE DATABASEUSERCIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident sameuser # IPv4 local connections: host

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-15 Thread Jason Long
Steven Lembark wrote: I would like to use PSQLFS(http://www.edlsystems.com/psqlfs/) to store 100 GB of images in PostgreSQL. Once they are in there I can deal with them. My main purpose is to use rsync to get the files into the database. Is there a better way to load 20,000 plus files reliably

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Bill Moran
In response to Kirk Strauser : > On Jan 15, 2009, at 2:39 PM, Bill Moran wrote: > > > However, it pgpool can't pool connections if each connection has its > > own username. Not sure what exactly is causing it not to work for > > you, > > but that was the first thing that came to mind. > > The

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Justin Pasher
Richard Huxton wrote: Justin Pasher wrote: Hello, I have a server running PostgreSQL 8.1.15-0etch1 (Debian etch) that was recently put into production. Last week a developer started having a problem with his psql connection being terminated every couple of minutes when he was running a query

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Steve Crawford
Kirk Strauser wrote: ... I understand why pooling within a process itself is a good thing. However, say I have two users running the same program on different desktop machines. At present, those applications connect with the same username/password that's tied to the program and not the actu

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Jason Long
Scott Marlowe wrote: On Thu, Jan 15, 2009 at 1:28 PM, Jason Long wrote: A faster server. Well the sever is plenty fast. It has 2 quad core 1600MHz FSB 3.0 GHz Xeon 5472 CPUs and a very light workload. A few things. That doesn't make a fast server. The disk i/o subsystem makes a fas

Re: HTML email (was Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Steve Atkins
On Jan 15, 2009, at 1:02 PM, Scott Marlowe wrote: On Thu, Jan 15, 2009 at 1:56 PM, Jason Long wrote: Steve Atkins wrote: I'm sure none of that other than the last actually applies to you, but those are the expectations you set by using HTML email and then insulting all the list members w

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Kirk Strauser
On Jan 15, 2009, at 2:54 PM, Steve Crawford wrote: If you know that the application does not change GUC variables then you will probably benefit greatly by using pgbouncer. Thanks, Steve! That's just the kind of pointer I can use. I've been using PostgreSQL for years but I've never really

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 1:26 PM, Kirk Strauser wrote: > On Jan 15, 2009, at 12:30 PM, Steve Crawford wrote: > >> But if your application is designed to work well with pooling, it can >> provide dramatic performance benefits. > > I think that's the problem. As I mentioned at one point, a lot of ou

Re: HTML email (was Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 1:56 PM, Jason Long wrote: > Steve Atkins wrote: >> >> I'm sure none of that other than the last actually applies to you, but >> those are >> the expectations you set by using HTML email and then insulting all >> the list members when someone asks you to stop. That's not th

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Joshua D. Drake
On Thu, 2009-01-15 at 20:39 +, Grzegorz Jaśkiewicz wrote: > and we also oppose to answering on top of message, and citing > everything underneeth. > Why? Because your words should say what you mean, not show it by its > look. Hence, plain ascii is enough for us - and should be for every > intel

Re: HTML email (was Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Jason Long
Steve Atkins wrote: On Jan 15, 2009, at 12:32 PM, Jason Long wrote: I don't mean to be a pain either and I mean no disrespect to anyone on this list in the following comments. However, this is about the most anal list ever. I see so many emails on here about people complaining regarding the

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Kirk Strauser
On Jan 15, 2009, at 2:39 PM, Bill Moran wrote: However, it pgpool can't pool connections if each connection has its own username. Not sure what exactly is causing it not to work for you, but that was the first thing that came to mind. The usernames are per-app. Zope connections with usern

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Steve Crawford
Kirk Strauser wrote: On Jan 15, 2009, at 12:30 PM, Steve Crawford wrote: But if your application is designed to work well with pooling, it can provide dramatic performance benefits. I think that's the problem. As I mentioned at one point, a lot of our applications have connections open for

HTML email (was Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Steve Atkins
On Jan 15, 2009, at 12:32 PM, Jason Long wrote: I don't mean to be a pain either and I mean no disrespect to anyone on this list in the following comments. However, this is about the most anal list ever. I see so many emails on here about people complaining regarding the proper way to repl

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Raymond O'Donnell
On 15/01/2009 20:44, Scott Marlowe wrote: > We're a bunch of fuzzy little kittens > playing with balls of yarn by comparison. :) Now *there's* an image! :-) Ray. -- Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland r

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Raymond O'Donnell
On 15/01/2009 20:32, Jason Long wrote: > However, this is about the most anal list ever. I see so many emails on > here about people complaining regarding the proper way to reply or post > to the list. Well, as someone else has just pointed out, it's all about readability and making your words ea

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 1:28 PM, Jason Long wrote: > A faster server. > Well the sever is plenty fast. It has 2 quad core 1600MHz FSB 3.0 GHz Xeon > 5472 CPUs and a very light workload. A few things. That doesn't make a fast server. The disk i/o subsystem makes a fast server. And you've menti

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Joshua D. Drake
On Thu, 2009-01-15 at 14:32 -0600, Jason Long wrote: > I don't mean to be a pain either and I mean no disrespect to anyone on > this list in the following comments. > > However, this is about the most anal list ever. You haven't been to the debian list have you? :). > I see so many emails on h

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Grzegorz Jaśkiewicz
and we also oppose to answering on top of message, and citing everything underneeth. Why? Because your words should say what you mean, not show it by its look. Hence, plain ascii is enough for us - and should be for every intelligent human being. On Thu, Jan 15, 2009 at 8:32 PM, Jason Long wrote

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Bill Moran
In response to Kirk Strauser : > On Jan 15, 2009, at 12:30 PM, Steve Crawford wrote: > > > But if your application is designed to work well with pooling, it > > can provide dramatic performance benefits. > > I think that's the problem. As I mentioned at one point, a lot of our > application

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Jason Long
I don't mean to be a pain either and I mean no disrespect to anyone on this list in the following comments. However, this is about the most anal list ever. I see so many emails on here about people complaining regarding the proper way to reply or post to the list. I used larger font to point

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Jason Long
Alan Hodgson wrote: On Thursday 15 January 2009, Jason Long wrote: *I am attempting to vacuum and reindex my database. It keeps timing out. See commands and last part of output below. The vacuum or reindex only takes a short time to complete normally because the database it less than 50 m

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Kirk Strauser
On Jan 15, 2009, at 12:30 PM, Steve Crawford wrote: But if your application is designed to work well with pooling, it can provide dramatic performance benefits. I think that's the problem. As I mentioned at one point, a lot of our applications have connections open for hours at a time and

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Raymond O'Donnell
On 15/01/2009 20:21, Joshua D. Drake wrote: > On Thu, 2009-01-15 at 20:13 +, Raymond O'Donnell wrote: >> I don't mean to be a pain, but could you please avoid HUGE type sizes >> such as the aboveor better still, avoid using HTML altogether in >> your emails to this list. > The answer to th

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Joshua D. Drake
On Thu, 2009-01-15 at 20:13 +, Raymond O'Donnell wrote: > On 15/01/2009 20:06, Jason Long wrote: > > I am attempting to vacuum...[snip] > > I don't mean to be a pain, but could you please avoid HUGE type sizes > such as the aboveor better still, avoid using HTML altogether in > your email

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Alan Hodgson
On Thursday 15 January 2009, Jason Long wrote: > *I am attempting to vacuum and reindex my database. It keeps timing > out. See commands and last part of output below. The vacuum or reindex > only takes a short time to complete normally because the database it > less than 50 mb. I have the qu

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Joshua D. Drake
On Thu, 2009-01-15 at 14:06 -0600, Jason Long wrote: > I am attempting to vacuum and reindex my database. It keeps timing > out. See commands and last part of output below. The vacuum or > reindex only takes a short time to complete normally because the > database it less than 50 mb. I have the

Re: [GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Raymond O'Donnell
On 15/01/2009 20:06, Jason Long wrote: I am attempting to vacuum...[snip] I don't mean to be a pain, but could you please avoid HUGE type sizes such as the aboveor better still, avoid using HTML altogether in your emails to this list. It makes it look as if you are not just shouting, but SCR

[GENERAL] Vacuum and Reindex hangs

2009-01-15 Thread Jason Long
*I am attempting to vacuum and reindex my database. It keeps timing out. See commands and last part of output below. The vacuum or reindex only takes a short time to complete normally because the database it less than 50 mb. I have the query timeout set to 2 minutes, but I do not know if th

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Alvaro Herrera schrieb: Andreas Wenk wrote: Yes thats correct with the IP address range. Maybe I did not understand the auth concept yet. I thought, that with METHOD set to md5, a md5 hashed password is required. The password is submitted with the PHP 5 pg_connect function - as plain tex

Re: [GENERAL] Query question

2009-01-15 Thread mailinglists
> On Wed, Jan 14, 2009 at 07:36:03PM -0800, mailingli...@net-virtual.com > wrote: >> CREATE TABLE listings ( >> trans_id SERIAL, >> mode CHAR(1), >> listing_id INT, >> region_id INT, >> category INT >> ); >> >> "SELECT * FROM listings ORDER BY region_id, category, listing_id, >> trans_id

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Alvaro Herrera
>> Justin Pasher wrote: > Are there any internal Postgres tables I can look at that may shed some > light on this? Any particular maintenance commands that could be run for > repair? Please obtain a backtrace from the core file. If there's no core file, please set "ulimit -c unlimited" in th

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
Hi Joshua Joshua D. Drake schrieb: On Thu, 2009-01-15 at 18:05 +0100, Andreas Wenk wrote: postgres=# SELECT rolname,rolpassword from pg_authid; rolname | rolpassword - ---+- postgres | pgadmin | plaintext odie | md5passs

Re: [GENERAL] fastest way to upgrade from 8.2 to 8.3

2009-01-15 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 11:02 AM, Jeremy Kister wrote: > I've got two 300GB databases that I'm going to be upgrading from 8.2.4 (32 > bit) to 8.3.5 (64 bit). > > The systems are running on Solaris 10u5 64bit with lots of disks in a zfs > raid10 and have 32GB ram. > > I've read lots of docs and Goo

[GENERAL] fastest way to upgrade from 8.2 to 8.3

2009-01-15 Thread Jeremy Kister
I've got two 300GB databases that I'm going to be upgrading from 8.2.4 (32 bit) to 8.3.5 (64 bit). The systems are running on Solaris 10u5 64bit with lots of disks in a zfs raid10 and have 32GB ram. I've read lots of docs and Google, and found a special flavor of postgresql.conf that helps t

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Kirk Strauser
On Jan 15, 2009, at 10:20 AM, Bill Moran wrote: I don't believe that's true. My understanding of pgpool is that it will reuse an existing connection if it's free, or open a new one if required. Gah! It just made it worse! $ ps auxwww | grep pgpool | grep dbuser | wc -l 30 $ ps aux

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Tom Lane
Andreas Wenk writes: > In pg_hba.conf we have: > # TYPE DATABASEUSERCIDR-ADDRESS METHOD > # "local" is for Unix domain socket connections only > local all all ident sameuser > # IPv4 local connections: > hostall all

Re: [GENERAL] MD5 password issue

2009-01-15 Thread Joshua D. Drake
On Thu, 2009-01-15 at 18:05 +0100, Andreas Wenk wrote: > postgres=# SELECT rolname,rolpassword from pg_authid; > rolname | rolpassword > - ---+- > postgres | > pgadmin | plaintext > odie | md5passsorrrd > > The user odi

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Sam Mason
On Thu, Jan 15, 2009 at 11:57:13AM -0500, Guy Rouillier wrote: > Connections are pooled on the client end, not on the server end. So, > you'd be able to pool connections on your web server, and should, for > reasons documented by others. However, since Abby and Barb are using > different compu

[GENERAL] MD5 password issue

2009-01-15 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everybody, I posted this allready to the ADMIN list but recieved no reply (what is for sure ok in a way ;-) ). So I thought I'll give it a try here. Sorry for any inconvenience. We are trying to understand an issue concerning the md5 password enc

Re: [GENERAL] Mac ordering with locales

2009-01-15 Thread David Blewett
On Thu, Feb 21, 2008 at 12:01 PM, Tom Lane wrote: > Pascal Cohen writes: >> The fact is that works on Linux and win but under Mac I always get the >> ordering with 'default' C locale (I displayed all the lc_* and all are >> right set) > > Yeah, this has been complained of before, eg here > http:/

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Guy Rouillier
Kirk Strauser wrote: I understand why pooling within a process itself is a good thing. However, say I have two users running the same program on different desktop machines. At present, those applications connect with the same username/password that's tied to the program and not the actual us

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Kirk Strauser
On Jan 15, 2009, at 10:08 AM, Tom Lane wrote: As an example, any system catalog update has to be broadcast to all live backends, and they all have to dutifully search their catalog caches to flush stale entries. That costs the same whether the backend is being put to use or has been sitti

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Bill Moran
Kirk Strauser wrote: [snip] > I understand why pooling within a process itself is a good thing. > However, say I have two users running the same program on different > desktop machines. At present, those applications connect with the > same username/password that's tied to the program an

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Christopher Browne
On Thu, Jan 15, 2009 at 10:54 AM, Kirk Strauser wrote: > I have a PostgreSQL 8.3.5 server with max_connections = 400. At this > moment, I have 223 open connections, including 64 from a bunch of webserver > processes and about 100 from desktop machines running a particular > application. The rest

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Alvaro Herrera
Tom Lane wrote: > Kirk Strauser writes: > > I have a PostgreSQL 8.3.5 server with max_connections = 400. At this > > moment, I have 223 open connections, including 64 from a bunch of > > webserver processes and about 100 from desktop machines running a > > particular application. The rest

Re: [GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Tom Lane
Kirk Strauser writes: > I have a PostgreSQL 8.3.5 server with max_connections = 400. At this > moment, I have 223 open connections, including 64 from a bunch of > webserver processes and about 100 from desktop machines running a > particular application. The rest are from various scheduled

[GENERAL] Why would I want to use connection pooling middleware?

2009-01-15 Thread Kirk Strauser
I have a PostgreSQL 8.3.5 server with max_connections = 400. At this moment, I have 223 open connections, including 64 from a bunch of webserver processes and about 100 from desktop machines running a particular application. The rest are from various scheduled processes and other assorted

[GENERAL] Question regarding new windowing functions in 8.4devel

2009-01-15 Thread A. Kretschmer
Hi, first, many thanks to all for the great work, i'm waiting for 8.4. I have played with the new possibilities: test=# select typ, ts, rank() over (partition by typ order by ts desc ) from foo; typ | ts | rank -+---+-- 1 | 20

Re: [GENERAL] Polymorphic "setof record" function?

2009-01-15 Thread Merlin Moncure
On Thu, Jan 15, 2009 at 4:57 AM, Christian Schröder wrote: > Merlin Moncure wrote: >>> them. >>> I need something like: >>> select * from myfunc('mytable') as x(like mytable) >>> or >>> select * from myfunc('mytable') as x(mytable%TYPE) >>> >>> Is there any solution for PostgreSQL 8.2? >>>

Re: [GENERAL] Select CASE when null ?

2009-01-15 Thread Sam Mason
On Wed, Jan 14, 2009 at 03:56:25PM -0500, Mark Styles wrote: > SELECT COALESCE(mid,0) AS mid, COALESCE(id_group,0) AS id_group > FROM users > WHERE username = 'test' > UNION > SELECT 0, 0 > WHERE NOT EXISTS (SELECT 1 FROM users WHERE username = 'test'); An alternative using outer joins would be:

Re: [GENERAL] Query question

2009-01-15 Thread Sam Mason
On Wed, Jan 14, 2009 at 07:36:03PM -0800, mailingli...@net-virtual.com wrote: > CREATE TABLE listings ( > trans_id SERIAL, > mode CHAR(1), > listing_id INT, > region_id INT, > category INT > ); > > "SELECT * FROM listings ORDER BY region_id, category, listing_id, > trans_id" > [...] wh

Re: [GENERAL] function to return both table row and varchar

2009-01-15 Thread Kenneth Lundin
Sorry, I should have RTFM(!!!). I found it under 4.2.4 Field selection. Apparently it works just as I want, but I should have put parenthesis around the row-name like this: > select result,(resulting_row).name from verify_record(1234); name | result ---| "Test" | "OK" I also discove

Re: [GENERAL] inconsistency in aliasing

2009-01-15 Thread Grzegorz Jaśkiewicz
as far as I know, this bit (statement evaluation) wasn't implemented then. It only got there in 8.4, so you can have even subselects evaluated. So it isn't a bug, it just wasn't implemented to work that way back than, -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make c

[GENERAL] function to return both table row and varchar

2009-01-15 Thread Kenneth Lundin
Hi, i'm defining a function in plpqsql and would like it to return one varchar and one row from another table. I have defined it like this (this is only a test and does not really make sense yet, but it's the principle i'm after): CREATE OR REPLACE FUNCTION verify_record(IN number_to_verify bigin

Re: [GENERAL] Polymorphic "setof record" function?

2009-01-15 Thread Christian Schröder
Merlin Moncure wrote: On 1/13/09, Christian Schröder wrote: Hi list, I have written a function that returns a setof record. The function has a table name as a parameter and the resulting records have the same structure as this table. Is there any easy way to specify this when I call the fun

Re: [GENERAL] Autovacuum daemon terminated by signal 11

2009-01-15 Thread Richard Huxton
Justin Pasher wrote: > Hello, > > I have a server running PostgreSQL 8.1.15-0etch1 (Debian etch) that was > recently put into production. Last week a developer started having a problem > with his psql connection being terminated every couple of minutes when he > was running a query. When I look th

Re: [GENERAL] one-click installer postgresql-8.3.5-1-linux.bin failed

2009-01-15 Thread Dave Page
On Thu, Jan 15, 2009 at 9:27 AM, m zyzy wrote: > > Thank you Scott and Dave. > Dave , the url given , not really helpful unless I go through each and every > details, The text at the link I gave reads: The installer crashes on Linux. What can I do? BitRock InstallBuilder has been designed

Re: [GENERAL] one-click installer postgresql-8.3.5-1-linux.bin failed

2009-01-15 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 2:27 AM, m zyzy wrote: > > Scott , my latest attempt to install in centos 5 this time work well by > re-downloading .bin installer . But , in fc10 the > ./postgresql-8.3.5-1-linux.bin command still to no avail. > for now , the text mode , > ./postgresql-8.3.5-1-linux.bin --

Re: [GENERAL] one-click installer postgresql-8.3.5-1-linux.bin failed

2009-01-15 Thread m zyzy
Thank you Scott and Dave. Dave , the url given , not really helpful unless I go through each and every details,I dont know -searcg the page for the word segmentation returns nothing . another thing ,just to let you know my postGIS installation through StackBuilder still failed by returning error af

Re: [GENERAL] one-click installer postgresql-8.3.5-1-linux.bin failed

2009-01-15 Thread Dave Page
On Thu, Jan 15, 2009 at 7:47 AM, m zyzy wrote: > I had this weird problem in CentOS 5 and Fedora 10 . the one-click binary > installer failed > execute this > ./postgresql-8.3.5-1-linux.bin > > shows > > Segmentation fault Do either of the suggestions at http://bitrock.com/support_installbuilder_

Re: [GENERAL] one-click installer postgresql-8.3.5-1-linux.bin failed

2009-01-15 Thread Scott Marlowe
On Thu, Jan 15, 2009 at 12:47 AM, m zyzy wrote: > I had this weird problem in CentOS 5 and Fedora 10 . the one-click binary > installer failed > execute this > ./postgresql-8.3.5-1-linux.bin > > shows > > Segmentation fault I don't know what's causing it, I use the PGDG RHEL 5 packages for pgsql