Re: [GENERAL] Multiple instances with same version?

2011-04-20 Thread Magnus Hagander
2011/4/20 durumdara : > Dear Everybody! > > I want to ask that have some way to install PGSQL 9.0 as two instances in > one machine? > > Most important question. The OS is can be Windows or Linux. > > I asked this, because formerly we heard about a story. I cite this as I > remember: > > We have so

Re: [GENERAL] Using column aliasses in the same query

2011-04-20 Thread Tore Halvorsen
On Wed, Apr 20, 2011 at 12:13 AM, Andrej wrote: > That's an accurate observation, but has nothing to do w/ what > the original poster was looking for, nor does it refute Toms > argument against the OPs suggestion. You're right, I jumped in without thinking enough.Sorry. I had just written some q

Re: [GENERAL] Help - corruption issue?

2011-04-20 Thread Phoenix Kiula
> On a fast network it should only take a few minutes.  Now rsyncing > live 2.4 TB databases, that takes time. :)  Your raptors, if they're > working properly, should be able to transfer at around 80 to > 100Megabytes a second.  10 to 15 seconds a gig.  30 minutes or so via > gig ethernet.  I'd run

Re: [GENERAL] Auto Adjust Age

2011-04-20 Thread Jasen Betts
On 2011-04-06, Carlos Mennens wrote: > I've only been using PostgreSQL since Oct 2010 and it's my first > experience with SQL or any ORDBMS. I've searched on the web and been > creating my own database users, databases, tables from scratch which > has been interesting to say the least but now I wo

Re: [GENERAL] Auto Adjust Age

2011-04-20 Thread Jasen Betts
On 2011-04-06, Jerry Sievers wrote: > Carlos Mennens writes: > >> CREATE TABLE users >> ( >>id integer PRIMARY KEY UNIQUE NOT NULL, --ID >>fname character varying(40) NOT NULL, --First name >>lname character varying(40) NOT NULL, --Last name >>email character varying NOT NULL, --e

Re: [GENERAL] Auto Adjust Age

2011-04-20 Thread Bill Moran
In response to Jasen Betts : > On 2011-04-06, Jerry Sievers wrote: > > Carlos Mennens writes: > > > >> CREATE TABLE users > >> ( > >>id integer PRIMARY KEY UNIQUE NOT NULL, --ID > >>fname character varying(40) NOT NULL, --First name > >>lname character varying(40) NOT NULL, --Last na

[GENERAL] How to uninstall PostgreSQL 8.4 on both Windows XP and Windows 7

2011-04-20 Thread Mlondolozi Ncapayi
Hi there I installed PostgreSql 8.4 and now I want to delete/ uninstall it completely to start a new fresh installation. Can you please give me clear instructions on how to do that or maybe a script that I can run. I am doing assignment using postgres your help would be highly appreciated. Mlo

Re: [GENERAL] How to uninstall PostgreSQL 8.4 on both Windows XP and Windows 7

2011-04-20 Thread raghu ram
On Wed, Apr 20, 2011 at 12:32 PM, Mlondolozi Ncapayi wrote: > Hi there > > I installed PostgreSql 8.4 and now I want to delete/ uninstall it > completely to start a new fresh installation. > Can you please give me clear instructions on how to do that or maybe a > script that I can run. > I am doi

[GENERAL] Join query including two generate_series calls causes big memory growth and crash

2011-04-20 Thread Jorge Arévalo
Hello, I'm executing this query: SELECT x, y, another_field FROM generate_series(1, 10) x, generate_series(1, 10) y, my_table The field 'another_field' belongs to 'my_table'. And that table has 36 entries. In a 64 bits machine, with 4GB RAM, Ubuntu 10.10 and postgres 8.4.7, the query works f

Re: [GENERAL] Join query including two generate_series calls causes big memory growth and crash

2011-04-20 Thread Tom Lane
=?ISO-8859-1?Q?Jorge_Ar=E9valo?= writes: > I'm executing this query: > SELECT x, y, another_field FROM generate_series(1, 10) x, > generate_series(1, 10) y, my_table > The field 'another_field' belongs to 'my_table'. And that table has > 36 entries. In a 64 bits machine, with 4GB RAM, Ubuntu

Re: [GENERAL] Join query including two generate_series calls causes big memory growth and crash

2011-04-20 Thread tv
> Hello, > > I'm executing this query: > > SELECT x, y, another_field FROM generate_series(1, 10) x, > generate_series(1, 10) y, my_table Well, do you realize this is a cartesian product that gives 10 x 10 x 36 = 36.000.000 rows in the end. Not sure how wide is the third table (how many colu

[GENERAL] How to realize ROW_NUMBER() in 8.3?

2011-04-20 Thread Emi Lu
Hello, ROW_NUMBER() is only ready in 8.4. For 8.3, is there a simple way to get row_number select row_number(), col1, col2... FROM tableName Thanks a lot! 丁叶 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.or

Re: [GENERAL] Join query including two generate_series calls causes big memory growth and crash

2011-04-20 Thread Jorge Arévalo
On Wed, Apr 20, 2011 at 5:34 PM, Tom Lane wrote: > =?ISO-8859-1?Q?Jorge_Ar=E9valo?= writes: >> I'm executing this query: > >> SELECT x, y, another_field FROM generate_series(1, 10) x, >> generate_series(1, 10) y, my_table > >> The field 'another_field' belongs to 'my_table'. And that table has >>

Re: [GENERAL] How to uninstall PostgreSQL 8.4 on both Windows XP and Windows 7

2011-04-20 Thread raghu ram
On Wed, Apr 20, 2011 at 8:39 PM, Mlondolozi Ncapayi wrote: > Thank Sir, I have managed to uninstall it. > Now I installed PostgreSQL 8.4.4 and PostGIS 1.4.2. > > Can you please send me command prompts to load shapefiles using Windows 7. > > I want to load cities.shp into template_postgis14 [dbname

Re: [GENERAL] How to realize ROW_NUMBER() in 8.3?

2011-04-20 Thread raghu ram
On Wed, Apr 20, 2011 at 9:21 PM, Emi Lu wrote: > Hello, > > ROW_NUMBER() is only ready in 8.4. For 8.3, is there a simple way to get > row_number > > select row_number(), col1, col2... > FROM tableName > > Below link will demonstrates ROW_NUMBER features in pre Postgresql-8.4:: http://www.pos

Re: [GENERAL] Join query including two generate_series calls causes big memory growth and crash

2011-04-20 Thread Jorge Arévalo
2011/4/20 : >> Hello, >> >> I'm executing this query: >> >> SELECT x, y, another_field FROM generate_series(1, 10) x, >> generate_series(1, 10) y, my_table > > Well, do you realize this is a cartesian product that gives > > 10 x 10 x 36 = 36.000.000 > > rows in the end. Not sure how wide is th

[GENERAL] Trouble loading Perl modules from postgresql.conf

2011-04-20 Thread Chris Greenhill
Hello, I'm having difficulty pre-loading Perl modules and my own libraries. When I edit something like this into the postgresql.conf: custom_variable_classes = 'plperl' plperl.on_init = 'use MyModule;' and restart the server it doesn't seem to load the modules (they don't appear in %IN

[GENERAL] Different views of remote server

2011-04-20 Thread Bob Pawley
Hi This is probably going to turn out to be me doing something stupid, but- I have two computers, one of which I use as a remote server for my database. When I connect to the remote database through my interface there are errors that suggest a problem with the data in one of the tables. Using

Re: [GENERAL] REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it

2011-04-20 Thread Tom Lane
Frank van Vugt writes: > mmm, indeed it seems that some things are our of sync here > ... > This confirms that these 60 functions do not have a 'o' (owner) record in > pg_shdepend, it therefor matches what you seemed to expect: no records in > pg_shdepend, so "reassign owned" does not do anythin

[GENERAL] Needs Suggestion

2011-04-20 Thread SUBHAM ROY
By doing \timing in psql, we enable the timing and then when we type the query we are able to see its execution time. Similarly, is there any way to view the number I/Os and memory usage by a particular query. And also the timing result that gets displayed, in which log file does it get recorded?

Re: [GENERAL] Help - corruption issue?

2011-04-20 Thread Tomas Vondra
Dne 20.4.2011 12:56, Phoenix Kiula napsal(a): >> On a fast network it should only take a few minutes. Now rsyncing >> live 2.4 TB databases, that takes time. :) Your raptors, if they're >> working properly, should be able to transfer at around 80 to >> 100Megabytes a second. 10 to 15 seconds a g

Re: [GENERAL] Needs Suggestion

2011-04-20 Thread raghu ram
On Wed, Apr 20, 2011 at 10:41 PM, SUBHAM ROY wrote: > By doing \timing in psql, we enable the timing and then when we type the > query we are able to see its execution time. > Similarly, is there any way to view the number I/Os and memory usage by a > particular query. > > PGsnap module will desc

Re: [GENERAL] REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it

2011-04-20 Thread Frank van Vugt
Hi, Op woensdag 20 april 2011, schreef Tom Lane: > I wonder whether the pg_shdepend data is actually wrong, or just the > indexes on it are at fault. Did you try forcing that query to be done > with a seqscan Just did by setting enable_indexscan to false and verifying that all is used are seq_s

Re: [GENERAL] REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it

2011-04-20 Thread Tom Lane
Frank van Vugt writes: > Op woensdag 20 april 2011, schreef Tom Lane: >> To explain your problem that way would require assuming that somebody >> was REINDEX'ing pg_shdepend at approximately the same time that somebody >> else was rolling back DDL that had modified these same pg_shdepend >> entrie

Re: [GENERAL] REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it

2011-04-20 Thread Frank van Vugt
Hi, Op woensdag 20 april 2011, schreef Tom Lane: > Actually, now that I think about it, 8.4 didn't allow on-the-fly > reindexing of shared catalogs anyway. So that couldn't be your problem > even if the test had shown the indexes didn't match the catalog. But > it seems the rows actually disappe

Re: [GENERAL] REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it

2011-04-20 Thread Tom Lane
Frank van Vugt writes: > Op woensdag 20 april 2011, schreef Tom Lane: >> Actually, now that I think about it, 8.4 didn't allow on-the-fly >> reindexing of shared catalogs anyway. So that couldn't be your problem >> even if the test had shown the indexes didn't match the catalog. But >> it seems

Re: [GENERAL] Different views of remote server

2011-04-20 Thread Adrian Klaver
On Wednesday, April 20, 2011 11:09:59 am Bob Pawley wrote: > Hi > > This is probably going to turn out to be me doing something stupid, but- > > I have two computers, one of which I use as a remote server for my > database. > > When I connect to the remote database through my interface there are

Re: [GENERAL] Help - corruption issue?

2011-04-20 Thread Tomas Vondra
Dne 20.4.2011 22:11, Tomas Vondra napsal(a): > There's a very nice guide on how to do that > > http://blog.endpoint.com/2010/06/tracking-down-database-corruption-with.html > > It sure seems like the problem you have (invalid alloc request etc.). > The really annoying part is locating the block, a

Re: [GENERAL] pg_reorg

2011-04-20 Thread Scott Mead
On Tue, Apr 19, 2011 at 9:48 AM, Jens Wilke wrote: > On Tue, Apr 19, 2011 at 04:02:01AM +0530, Vibhor Kumar wrote: > > > > IIRC "vacuum full" mode rewrites the indexes as well. > > > > Till 8.4 no. From 9.0 onwards yes. However VACUUM FULL still locks the > table. > > Don't be confused with the "

Re: [GENERAL] Different views of remote server

2011-04-20 Thread Scott Marlowe
On Wed, Apr 20, 2011 at 1:09 PM, Bob Pawley wrote: > Hi > > This is probably going to turn out to be me doing something stupid, but- > > I have two computers, one of which I use as a remote server for my database. > > When I connect to the remote database through my interface there are errors > th

Re: [GENERAL] Help - corruption issue?

2011-04-20 Thread Phoenix Kiula
On Thu, Apr 21, 2011 at 7:27 AM, Tomas Vondra wrote: > Dne 20.4.2011 22:11, Tomas Vondra napsal(a): >> There's a very nice guide on how to do that >> >> http://blog.endpoint.com/2010/06/tracking-down-database-corruption-with.html >> >> It sure seems like the problem you have (invalid alloc request

Re: [GENERAL] Help - corruption issue?

2011-04-20 Thread Phoenix Kiula
On Thu, Apr 21, 2011 at 11:49 AM, Phoenix Kiula wrote: > On Thu, Apr 21, 2011 at 7:27 AM, Tomas Vondra wrote: >> Dne 20.4.2011 22:11, Tomas Vondra napsal(a): >>> There's a very nice guide on how to do that >>> >>> http://blog.endpoint.com/2010/06/tracking-down-database-corruption-with.html >>> >>

[GENERAL] Poor performance of btrfs with Postgresql

2011-04-20 Thread Toby Corkindale
I've done some testing of PostgreSQL on different filesystems, and with different filesystem mount options. I found that xfs and ext4 both performed similarly, with ext4 just a few percent faster; and I found that adjusting the mount options only gave small improvements, except for the barrier

Re: [GENERAL] how to force an insert before Raise Exception?

2011-04-20 Thread Craig Ringer
On 19/04/11 21:39, giova wrote: > Hi. > > I made a function that Raise exception with some conditions. > No problem with that, it is the goal. > > My problem is that i want to do an INSERT into a log table before to raise > the exception. But RAISE EXCEPTION cancels my Insert. > > How to force t