Re: [GENERAL] SELECT DISTINCT triggers sorting operation

2010-02-06 Thread Tom Lane
=?iso-8859-1?Q?Ga=EBtan_Allart?= writes: > I'm experiencing an interesting issue with PostgreSQL 8.4.2-r2. > I was running a pretty big database on another server (8.3) pretty fine. > When I moved it to this new server, behaviour changed. Did you ANALYZE the database after loading it? Are you su

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Tom Lane
Greg Smith writes: > ... Part of the reason this feature > hasn't been been perceived as more valuable is because just letting the > two cache levels involved here sort out what's really valuable or not > can often outperform what an application developer thinks the optimal > configuration wi

Re: [GENERAL] SELECT DISTINCT triggers sorting operation

2010-02-06 Thread Scott Marlowe
On Sat, Feb 6, 2010 at 3:49 PM, Gaëtan Allart wrote: > Hi everybody, > > I'm experiencing an interesting issue with PostgreSQL 8.4.2-r2. > I was running a pretty big database on another server (8.3) pretty fine. > When I moved it to this new server, behaviour changed. What does explain analyze ru

Re: [GENERAL] Snow Leopard-how to get PG 8.4 to start up on demand?

2010-02-06 Thread Scott Mead
On Sat, Feb 6, 2010 at 2:19 PM, Michael Kohout wrote: > Hi All; > > I've got a development box that I use for a bunch of other purposes(mostly > music), and I was wondering if there was a way to configure launchd to only > start up postgres when it's needed. SSH does the same thing so I've tried

[GENERAL] SELECT DISTINCT triggers sorting operation

2010-02-06 Thread Gaëtan Allart
Hi everybody, I'm experiencing an interesting issue with PostgreSQL 8.4.2-r2. I was running a pretty big database on another server (8.3) pretty fine. When I moved it to this new server, behaviour changed. On a complex SELECT DISTINCT query, pgsql now runs a "SORT" operation although I've never r

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Greg Smith
Bret S. Lambert wrote: On Sat, Feb 06, 2010 at 02:44:32PM +0100, C?dric Villemain wrote: I am working on pgfincore which allow in some way to prepare buffer cache. You need pg > 8.4 and linux (probably working with bsd too) Why do something with a non-portable interface? Most OSes supp

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Greg Smith
Alexei Vladishev wrote: Is there a way of configuring PostgreSQL so that one specific table would use, say, 4GB of buffer cache while other tables would use the rest? It sounds like you're looking for what other databases call "pinning". It's not supported in PostgreSQL right now, and as far

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Alexei Vladishev
Bret, Thank you for your response! Greetings, Is there a way of configuring PostgreSQL so that one specific table would use, say, 4GB of buffer cache while other tables would use the rest? I would like to keep the table and its indexes always in "hot" state, so that other queries won't pollut

[GENERAL] Error installing pljava

2010-02-06 Thread Susan M Farley
I'm trying to install pljava on my laptop. I'm running Windows 7 Professional 64 bit and have PostgreSQL 8.4 installed. I download the jre 6 and jdk 1.5 and 1.6 from java and the lastest from pljava.For my Classpath I have the following added "D:\Program Files\PostgreSQL\pgJDBC\postgresql-8.4-70

Re: [GENERAL] add column specify position

2010-02-06 Thread Jasen Betts
On 2010-02-03, Scott Frankel wrote: > > Hi all, > > Is it possible to specify a position when adding a column to a table? no. > I want to swap one column for another without losing the column's > position. eg: given that 'foo' is the 5th column in an 8 column > table, I want to replace it

Re: [GENERAL] ODBC mac os

2010-02-06 Thread Enrico Pirozzi
Thank you very much ;) Enrico 2010/1/29 Dave Page : > On Fri, Jan 29, 2010 at 1:29 PM, Enrico Pirozzi wrote: >> Hi, >> I would like to find an odbc driver for mac os x, >> where I can find it? >> >> Thanks to all > > If you're running the one-click PG installer, you can install the ODBC > driver

[GENERAL] Snow Leopard-how to get PG 8.4 to start up on demand?

2010-02-06 Thread Michael Kohout
Hi All; I've got a development box that I use for a bunch of other purposes(mostly music), and I was wondering if there was a way to configure launchd to only start up postgres when it's needed. SSH does the same thing so I've tried to fashion a plist for this purpose modeled after that(on my box

[GENERAL] adding libpq to pgbouncer breaks single handler

2010-02-06 Thread Merlin Moncure
Having a weird issue that I just can't figure out. We are playing with implementing listen/notify in pgbouncer. Our strategy involved some libpq calls etc so we added libpq to the make. Doing this completely broke pgbouncer signals...something else is catching SIGINT. If we comment our function

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Cédric Villemain
-- > > Teach CanIt if this mail (ID 80190050) is spam: > Spam: > http://filter.kgbinternet.com/canit/b.php?i=80190050&m=fbb7172fd677&t=201002 > 06&c=s > Not spam: > http://filter.kgbinternet.com/canit/b.php?i=80190050&m=fbb7172fd677&t=201002 > 0

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Cédric Villemain
2010/2/6 Bret S. Lambert : > On Sat, Feb 06, 2010 at 02:44:32PM +0100, C?dric Villemain wrote: >> 2010/2/6 Bret S. Lambert : >> > On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: >> >> Greetings, >> >> >> >> Is there a way of configuring PostgreSQL so that one specific table would

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread BillR
ernet.com/canit/b.php?i=80190050&m=fbb7172fd677&t=201002 06&c=f -- END-ANTISPAM-VOTING-LINKS __ Information from ESET Smart Security, version of virus signature database 4841 (20100206) __ The message was checked by ESE

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Bret S. Lambert
On Sat, Feb 06, 2010 at 02:44:32PM +0100, C?dric Villemain wrote: > 2010/2/6 Bret S. Lambert : > > On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: > >> Greetings, > >> > >> Is there a way of configuring PostgreSQL so that one specific table would > >> use, say, 4GB of buffer cache

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Bret S. Lambert
On Sat, Feb 06, 2010 at 03:46:58PM +0200, Alexei Vladishev wrote: > Bret, > > Thank you for your response! > > >>Greetings, > >> > >>Is there a way of configuring PostgreSQL so that one specific table would > >>use, say, 4GB of buffer cache while other tables would use the rest? > >> > >>I would

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Cédric Villemain
2010/2/6 Bret S. Lambert : > On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: >> Greetings, >> >> Is there a way of configuring PostgreSQL so that one specific table would >> use, say, 4GB of buffer cache while other tables would use the rest? >> >> I would like to keep the table a

Re: [GENERAL] How can I test my web application against SQL Injections?

2010-02-06 Thread pedro2009
Hi Andre, What we do at my job to avoid SQL injections (PHP example): for every web variable that comes from _POST or _GET: if we expect a integer: $x = intval($_GET['x']); if we expect money: $x = sprintf("%.2f",$_GET['x']) if we expect string: $x = pg_escape_string(

Re: [GENERAL] Multiple buffer cache?

2010-02-06 Thread Bret S. Lambert
On Fri, Feb 05, 2010 at 11:41:13PM +0200, Alexei Vladishev wrote: > Greetings, > > Is there a way of configuring PostgreSQL so that one specific table would > use, say, 4GB of buffer cache while other tables would use the rest? > > I would like to keep the table and its indexes always in "hot" >

[GENERAL] Multiple buffer cache?

2010-02-06 Thread Alexei Vladishev
Greetings, Is there a way of configuring PostgreSQL so that one specific table would use, say, 4GB of buffer cache while other tables would use the rest? I would like to keep the table and its indexes always in "hot" state, so that other queries won't pollute this part of the buffer cache. It