[GENERAL] Drop Cluster

2009-07-31 Thread sweta
Hi, Is there any command to drop a postgres cluster??? I tried the following link http://www.digipedia.pl/man/pg_dropcluster.8.html but it says command not found. Is there any other way?? Any help will be highly appreciated. Thanks in advance. Regards, Sweta. -- Sent via pgsql-general ma

[GENERAL] Drop Cluster

2009-07-31 Thread sweta
Hi, Is there any command to drop a postgres cluster??? I tried the following link http://www.digipedia.pl/man/pg_dropcluster.8.html but it says command not found. Is there any other way?? Any help will be highly appreciated. Thanks in advance. Regards, Sweta. -- Sent via pgsql-general mail

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Greg Smith
On Fri, 31 Jul 2009, Selena Deckelmann wrote: What exactly is the concern? I'm for healthy paranoia, but I'd like to know what exactly you're paranoid about. EDB has this program that runs as a web service. It runs a proprietary tuning routine (what they call "DynaTune") and gives the result

Re: [GENERAL] Design Database, 3 degrees of Users.

2009-07-31 Thread Marc Munro
On Fri, 2009-07-31 at 08:38 -0300, pgsql-general-ow...@postgresql.org wrote: > Date: Fri, 31 Jul 2009 12:38:30 +0100 > From: Andre Lopes > To: pgsql-general@postgresql.org > Subject: Design Database, 3 degrees of Users. > Message-ID: > <18f98e680907310438o764e9bc7hbb6e245d8464...@mail.gmail.com> >

Re: [GENERAL] building a binary-portable database

2009-07-31 Thread Tom Lane
Alexy Khrabrov writes: > That's doable of course, but I wonder what would it take to get it to > work as-is, when building pg from source on each box, giving their > fairly similar characteristics. It's not promised to work, and if it breaks you get to keep both pieces. > Or, if time_t is di

Re: [GENERAL] Make check fails on 8.3.7

2009-07-31 Thread Tom Lane
Christine Desmuke writes: > Tom Lane wrote: >> Years ago I saw roughly similar symptoms when SELinux decided postgres >> shouldn't be allowed to write to /dev/tty. > Thanks for the suggestion. It is not SELinux (SELinux status: disabled), > but _something_ is preventing postgres (both the existi

Re: [GENERAL] building a binary-portable database

2009-07-31 Thread Alexy Khrabrov
On Jul 31, 2009, at 6:30 PM, John R Pierce wrote: Alexy Khrabrov wrote: I've filled a database on Linux and tried to bring it across to Mac OSX, and got an error: FATAL: incorrect checksum in control file. use pg_dumpall | psql to export/import databases between machines. That's doable o

Re: [GENERAL] building a binary-portable database

2009-07-31 Thread John R Pierce
Alexy Khrabrov wrote: I've filled a database on Linux and tried to bring it across to Mac OSX, and got an error: FATAL: incorrect checksum in control file. use pg_dumpall | psql to export/import databases between machines. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] Division by zero

2009-07-31 Thread Josh Kupershmidt
On Fri, 31 Jul 2009 11:49:47 -0700 Jeff Davis wrote: > "Find all store locations which have not achieved an average sale price > of $100." > > SELECT store_name FROM sales WHERE totalsales/nsales < 100; > > The person running that query might be missing stores with no sales at > all, and they migh

[GENERAL] building a binary-portable database

2009-07-31 Thread Alexy Khrabrov
I've filled a database on Linux and tried to bring it across to Mac OSX, and got an error: FATAL: incorrect checksum in control file. Exploring with pg_controldata shows differences such as: Linux: pg_control version number:833 Catalog version number: 200711281 Database

Re: [GENERAL] Make check fails on 8.3.7

2009-07-31 Thread Christine Desmuke
Tom Lane wrote: Christine Desmuke writes: I'm trying to install 8.3.7, but can't get past make check. CentOS release 4.7 (Final), with an existing install of 8.3.1 running as a warm standby ... It looks in every case like the ERROR (and also HINT lines) lines are causing the failures, but I'

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Selena Deckelmann
Hi Greg! On Fri, Jul 31, 2009 at 11:43 AM, Greg Smith wrote: > As such, I know I really don't want to see any such output show up on one of > these mailing lists.  The PostgreSQL community at large should avoid > learning what they're doing just so it's clear that any open development > work here

Re: [GENERAL] Limiting records in pg_dump

2009-07-31 Thread Adrian Klaver
- "Sandra Arnold" wrote: > Thanks for that suggestion. Since I have a schema on the database, I > could create the view on my schema or even a table with the same name > with just the records that I want to copy to the other database. I > had thought about the table but not necessary th

Re: [GENERAL] Design Database, 3 degrees of Users.

2009-07-31 Thread Merlin Moncure
On Fri, Jul 31, 2009 at 9:47 AM, Rich Shepard wrote: > On Fri, Jul 31, 2009 at 4:38 AM, Andre Lopes wrote: > >> I need to design a Database that will handle 3 degrees of users: >> >> Administrators - They can see all the information in the database. >> Managers - They only can see the information o

Re: [GENERAL] change ownership on all tables

2009-07-31 Thread John R Pierce
Alan McKay wrote: OK, my DB Admin is on vacation, and 15 minutes of googling didn't get me the answer :-) Although in that 15 minutes I could have done all 109 tables manually :-) I know this command for a single table, and checked the manual but don't see anything about wildcards ALTER TABLE

Re: [GENERAL] Division by zero

2009-07-31 Thread Jeff Davis
On Fri, 2009-07-31 at 18:27 +0100, Oliver Kohll - Mailing Lists wrote: > Divide by zero errors have come up a couple of times on this list > (once raised by me). I wonder if I could propose a feature for > discussion. Could the result of a division by zero be treated as > infinity or null, rather t

Re: [GENERAL] Design Database, 3 degrees of Users.

2009-07-31 Thread Steve Crawford
Andre Lopes wrote: I need to design a Database that will handle 3 degrees of users: Administrators - They can see all the information in the database. Managers - They only can see the information of his dependants. Dependants - Theirs action must be aprovet by the managers. A little more

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Greg Smith
On Fri, 31 Jul 2009, Jennifer Trey wrote: So this is a special request, if you could provide a screen shot with perhaps three images, then I could go through it myself one by one and do similar things on mine. As a general note here, the Enterprise DB TuningWizard program is technically open

[GENERAL] change ownership on all tables

2009-07-31 Thread Alan McKay
OK, my DB Admin is on vacation, and 15 minutes of googling didn't get me the answer :-) Although in that 15 minutes I could have done all 109 tables manually :-) I know this command for a single table, and checked the manual but don't see anything about wildcards ALTER TABLE tablename OWNER to u

Re: [GENERAL] Limiting records in pg_dump

2009-07-31 Thread Arnold, Sandra
Thanks for that suggestion. Since I have a schema on the database, I could create the view on my schema or even a table with the same name with just the records that I want to copy to the other database. I had thought about the table but not necessary the view. We are just in the process

Re: [GENERAL] Limiting records in pg_dump

2009-07-31 Thread John R Pierce
Arnold, Sandra wrote: Is there a way to just dump records equal to a specific value using pg_dump? In Oracle, you can export data and use a WHERE clause and only pull a range of data. We currently use this in Oracle to load data sets in our Development database. As we move to PostgreSQL we

[GENERAL] Division by zero

2009-07-31 Thread Oliver Kohll - Mailing Lists
Hello, Divide by zero errors have come up a couple of times on this list (once raised by me). I wonder if I could propose a feature for discussion. Could the result of a division by zero be treated as infinity or null, rather than raising an error? Floating point types already have the co

Re: [GENERAL] Limiting records in pg_dump

2009-07-31 Thread Raymond O'Donnell
On 31/07/2009 18:27, Arnold, Sandra wrote: > Is there a way to just dump records equal to a specific value using > pg_dump? In Oracle, you can export data and use a WHERE clause and only > pull a range of data. We currently use this in Oracle to load data sets > in our Development database. As w

[GENERAL] Limiting records in pg_dump

2009-07-31 Thread Arnold, Sandra
Is there a way to just dump records equal to a specific value using pg_dump? In Oracle, you can export data and use a WHERE clause and only pull a range of data. We currently use this in Oracle to load data sets in our Development database. As we move to PostgreSQL we will be wanting to do th

Re: [GENERAL] PG equivalent of "mysqlhotcopy"?

2009-07-31 Thread Dimitri Fontaine
Hi, Le 30 juil. 09 à 15:34, Phoenix Kiula a écrit : I know about pg_dumpall, which creates a humongous SQL file, but is there something equivalent in the postgresql world, like a "pgsqlhotcopy" which copies data folders in a similar way as mysqlhotcopy? Copying the raw data files of a live da

Re: [GENERAL] size of data stored in gist index

2009-07-31 Thread Tom Lane
Gerhard Heift writes: > I try to index histograms in my table. For this I uses the cube contrib > module in which I removed the dimension check. If the cube has more than > 255 dimensions, for example 256 ^= 4 + 4 + 256 * 2 * 8 = 4104 bytes, this > data can not be stored in the gist index any more

Re: [GENERAL] Grouping Question

2009-07-31 Thread Ketema Harris
OK that worked, but now how do I get the integer returned by extract into a human friendly string like 7/1 - 7/8 or something similar ? On Jul 31, 2009, at 12:37 PM, Rob Wickert wrote: You would use some of postgresql built in date functions to extract the week from the date and group by tha

Re: [GENERAL] Grouping Question

2009-07-31 Thread Rob Wickert
You would use some of postgresql built in date functions to extract the week from the date and group by that i.e. select carrier, extract(week from start_time) as week, sum(call_length) as totallength, sum(cost) as total_cost from mytable group by carrier, extract(week from start_time) order

Re: [GENERAL] Grouping Question

2009-07-31 Thread Gerhard Heift
On Fri, Jul 31, 2009 at 12:09:51PM -0400, Ketema Harris wrote: > I have a table defined as > > CREATE TABLE mytable > ( > carrier varchar, > start_time timestamp with time zone, > call_date date, > cost numeric, > call_length numeric > ) > > I want to create a query that will generate a

[GENERAL] size of data stored in gist index

2009-07-31 Thread Gerhard Heift
Hello, I try to index histograms in my table. For this I uses the cube contrib module in which I removed the dimension check. If the cube has more than 255 dimensions, for example 256 ^= 4 + 4 + 256 * 2 * 8 = 4104 bytes, this data can not be stored in the gist index any more. If I try it, I get th

Re: [GENERAL] export csv file on XP

2009-07-31 Thread Raymond O'Donnell
On 31/07/2009 17:23, Thomas Kellerer wrote: >> Looks like a permissions problem - check that the user as which the >> server is running has read permissions on that file. > > I think *write* permission is the approriate ;) Whoops - my mistake - you're absolutely write! :-P Ray. ---

Re: [GENERAL] export csv file on XP

2009-07-31 Thread Thomas Kellerer
Raymond O'Donnell wrote on 31.07.2009 18:12: On 31/07/2009 16:57, Wang Kuo-Ying wrote: Command: copy test to 'c:/test.csv' delimiters ',' ; but the error ERROR: could not open file "c:/test.csv" for writing: Permission denied Looks like a permissions problem - check that the user as which t

Re: [GENERAL] Grouping Question

2009-07-31 Thread Sam Mason
On Fri, Jul 31, 2009 at 12:09:51PM -0400, Ketema Harris wrote: > I want to create a query that will generate a the following columns: > > carrier, week, sum(call_length) as totallength, sum(cost) as total_cost > from mytable > group by carrier, (WHAT HERE?) > order by week, carrier > > week is de

Re: [GENERAL] export csv file on XP

2009-07-31 Thread Raymond O'Donnell
On 31/07/2009 16:57, Wang Kuo-Ying wrote: > Command: > copy test to 'c:/test.csv' > delimiters ',' ; > > but the error ERROR: could not open file "c:/test.csv" for writing: > Permission denied Looks like a permissions problem - check that the user as which the server is running has read permiss

[GENERAL] Grouping Question

2009-07-31 Thread Ketema Harris
I have a table defined as CREATE TABLE mytable ( carrier varchar, start_time timestamp with time zone, call_date date, cost numeric, call_length numeric ) I want to create a query that will generate a the following columns: carrier, week, sum(call_length) as totallength, sum(cost) as

[GENERAL] export csv file on XP

2009-07-31 Thread Wang Kuo-Ying
I want to know how to export csv file. Command: copy test to 'c:/test.csv' delimiters ',' ; but the error ERROR: could not open file "c:/test.csv" for writing: Permission denied

[GENERAL] export csv file on XP

2009-07-31 Thread Wang Kuo-Ying
I want to know how to export csv file. Command: copy test to 'c:/test.csv' delimiters ',' ; but the error ERROR: could not open file "c:/test.csv" for writing: Permission denied

Re: [GENERAL] MSSQL to PostgreSQL

2009-07-31 Thread Merlin Moncure
On Fri, Jul 31, 2009 at 9:17 AM, Thom Brown wrote: > >> That's going to depend a lot on how many features of the database you >> were using...especially higher level features like stored procedures. >> Converting the schema and the data shouldn't be too bad -- there are a >> number of relatively ea

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Alvaro Herrera
Jennifer Trey escribió: > I think I got everything now. Most things where on by default it seems. > > > #-- > # RUNTIME STATISTICS > #-- > > # -

Re: [GENERAL] Clients disconnect but query still runs

2009-07-31 Thread Tatsuo Ishii
> > Right. For this purpose, pgpool sends param packet to client > > periodically while waiting for a reply from backend to detect if the > > connection to the client is broken. If it's broken, pgool sends cancel > > packet to backend not to waste backend machine's CPU cycle. > > The downside to t

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Jennifer Trey
I think I got everything now. Most things where on by default it seems. #-- # RUNTIME STATISTICS #-- # - Query/Index Statistics Collector - tra

Re: [GENERAL] Design Database, 3 degrees of Users.

2009-07-31 Thread Rich Shepard
On Fri, Jul 31, 2009 at 4:38 AM, Andre Lopes wrote: I need to design a Database that will handle 3 degrees of users: Administrators - They can see all the information in the database. Managers - They only can see the information of his dependants. Dependants - Theirs action must be aprovet by t

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Ashesh Vashi
Hi Jennifer, Magnus Hagander wrote: On Fri, Jul 31, 2009 at 12:35, Jennifer Trey wrote: On Fri, Jul 31, 2009 at 12:29 PM, Thomas Kellerer wrote: Jennifer Trey, 31.07.2009 12:17: Hi, I wanted to start with the TuningWizard and then configure the one they suggested, thinking that I am startin

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Ashesh Vashi
Hi Magnus, Magnus Hagander wrote: On Fri, Jul 31, 2009 at 15:47, Ashesh Vashi wrote: Magnus Hagander wrote: AFAICS, the edb tuning wizard has not (yet) been updated to support PostgreSQL 8.4. The hints it gives are for 8.3 and earlier. It would probably be a good idea if they gave a warning for

Re: [GENERAL] why is autovacuum still ongoing even if set to off ?

2009-07-31 Thread Costin Grigoras
Ok, if autovacuum doesn't actually lock the tables for this long time then it's fine. But I started investigating this because the inserts were hanging and I'm still puzzled why it's active when it shouldn't be :) In principle you are right, but in this particular case autovacuum gets in the w

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Magnus Hagander
On Fri, Jul 31, 2009 at 15:47, Ashesh Vashi wrote: > Magnus Hagander wrote: > AFAICS, the edb tuning wizard has not (yet) been updated to support > PostgreSQL 8.4. The hints it gives are for 8.3 and earlier. It would > probably be a good idea if they gave a warning for that, but I take it > they do

[GENERAL] tsearch2 on Synology

2009-07-31 Thread Dennis Janezic
Hi, I am using a Synology NAS and want to use the installed postgresql 8.2.5 database as backend for mediawiki 1.25.1. The problem is that mediawiki needs tsearch2 installed, but I can't find a solution to get tsearch2 on my NAS. There are several packages for nearly all linux distribution

Re: [GENERAL] How do I run PG Tuning Wizard on Linux?

2009-07-31 Thread Ashesh Vashi
Hi Jennifer, Some times, gtk does not work as expected. Please try to run TuningWizard using the following command: DISPLAY=:0.0 LD_LIBRARY_PATH=/opt/PostgreSQL/EnterpriseDB-TuningWizard/lib /opt/PostgreSQL/EnterpriseDB-TuningWizard/TuningWizard. Hope - this will help you. BTW: TuningWizard i

Re: [GENERAL] MSSQL to PostgreSQL

2009-07-31 Thread Ivan Sergio Borgonovo
On Fri, 31 Jul 2009 13:47:39 +0100 Thom Brown wrote: > Hi all, > We're migrating the contents of an old MSSQL server to PostgreSQL > 8.3.7, so a full conversion is required. Does anyone know of any > guides which highlight common gotchas and other userful > information? http://wiki.postgresql

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Adrian Klaver
On Friday 31 July 2009 6:18:30 am Jennifer Trey wrote: > Is autovacuum on by default? > or do I uncomment > > #autovacuum = on > > and > > #track_counts = on > > to enable it? Anything else I should do? > > Thanks / Jennifer You might check out this part of the manual :) http://www.postgresql.org/

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Jennifer Trey
Is autovacuum on by default? or do I uncomment #autovacuum = on and #track_counts = on to enable it? Anything else I should do? Thanks / Jennifer On Fri, Jul 31, 2009 at 1:10 PM, Jennifer Trey wrote: > Ok. I will.. when it comes to the other settings, like autovacuum and such. > Could I have

Re: [GENERAL] Design Database, 3 degrees of Users.

2009-07-31 Thread bricklen
Would Veil be useful to you? http://veil.projects.postgresql.org/curdocs/index.html On Fri, Jul 31, 2009 at 4:38 AM, Andre Lopes wrote: > I need to design a Database that will handle 3 degrees of users: > > > Administrators - They can see all the information in the database. > > Managers - They o

Re: [GENERAL] MSSQL to PostgreSQL

2009-07-31 Thread Thom Brown
> That's going to depend a lot on how many features of the database you > were using...especially higher level features like stored procedures. > Converting the schema and the data shouldn't be too bad -- there are a > number of relatively easy ways to do it including microsoft DTS > levering the p

Re: [GENERAL] MSSQL to PostgreSQL

2009-07-31 Thread Merlin Moncure
On Fri, Jul 31, 2009 at 8:47 AM, Thom Brown wrote: > Hi all, > > We're migrating the contents of an old MSSQL server to PostgreSQL 8.3.7, so > a full conversion is required.  Does anyone know of any guides which > highlight common gotchas and other userful information? That's going to depend a lot

Re: [GENERAL] Design Database, 3 degrees of Users.

2009-07-31 Thread Sam Mason
On Fri, Jul 31, 2009 at 12:38:30PM +0100, Andre Lopes wrote: > I need to design a Database that will handle 3 degrees of users: > > Administrators - They can see all the information in the database. > Managers - They only can see the information of his dependants. > Dependants - Theirs action must

[GENERAL] MSSQL to PostgreSQL

2009-07-31 Thread Thom Brown
Hi all, We're migrating the contents of an old MSSQL server to PostgreSQL 8.3.7, so a full conversion is required. Does anyone know of any guides which highlight common gotchas and other userful information? Thanks Thom

[GENERAL] Design Database, 3 degrees of Users.

2009-07-31 Thread Andre Lopes
I need to design a Database that will handle 3 degrees of users: Administrators - They can see all the information in the database. Managers - They only can see the information of his dependants. Dependants - Theirs action must be aprovet by the managers. Wich the best way to implement this i

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Jennifer Trey
Ok. I will.. when it comes to the other settings, like autovacuum and such. Could I have a look at yours ? :) I will list the ones that I find important and that i already have figured out good values for, please fill in if there is more I should look at: max_connections effective_cache random_pag

Re: [GENERAL] pg_config --sharedir points to the wrong folder.. is this a problem?

2009-07-31 Thread Daniel Verite
Jennifer Trey wrote: > Should I still add the pg_config to the $PATH ? > >> export PATH=/opt/PostgreSQL/8.4/bin/:$PATH Yes. > pn postgresql (no description > available) > un postgresql-7.4 (no description > available

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Magnus Hagander
On Fri, Jul 31, 2009 at 12:35, Jennifer Trey wrote: > On Fri, Jul 31, 2009 at 12:29 PM, Thomas Kellerer > wrote: >> >> Jennifer Trey, 31.07.2009 12:17: >>> >>> Hi, >>> >>> I wanted to start with the TuningWizard and then configure the one they >>> suggested, thinking that I am starting from good d

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Jennifer Trey
On Fri, Jul 31, 2009 at 12:29 PM, Thomas Kellerer wrote: > Jennifer Trey, 31.07.2009 12:17: > >> Hi, >> >> I wanted to start with the TuningWizard and then configure the one they >> suggested, thinking that I am starting from good default values. >> >> But I am not able to run TuningWizard for som

Re: [GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Thomas Kellerer
Jennifer Trey, 31.07.2009 12:17: Hi, I wanted to start with the TuningWizard and then configure the one they suggested, thinking that I am starting from good default values. But I am not able to run TuningWizard for some strange reason, but I am actually mostly interested in some few setting

[GENERAL] Can I have a look at your TuningWizard generated config file?

2009-07-31 Thread Jennifer Trey
Hi, I wanted to start with the TuningWizard and then configure the one they suggested, thinking that I am starting from good default values. But I am not able to run TuningWizard for some strange reason, but I am actually mostly interested in some few settings that it usually provides. Especially

Re: [GENERAL] SVN and Postgres 8.3

2009-07-31 Thread Phoenix Kiula
On Fri, Jul 31, 2009 at 12:29 PM, Greg Smith wrote: > On Thu, 30 Jul 2009, Phoenix Kiula wrote: > >> svn: error while loading shared libraries: libpq.so.4: cannot open >> shared object file: No such file or directory > > There's a long guide to working around the issues you run into converting > fr

Re: [GENERAL] pg_config --sharedir points to the wrong folder.. is this a problem?

2009-07-31 Thread Jennifer Trey
On Fri, Jul 31, 2009 at 3:02 AM, Daniel Verite wrote: >Jennifer Trey wrote: > > > >> locate pg_config > > /opt/PostgreSQL/8.4/bin/pg_config > > /opt/PostgreSQL/8.4/include/ecpg_config.h > > /opt/PostgreSQL/8.4/include/pg_config.h > > /opt/PostgreSQL/8.4/include/pg_config_manual.h > > /opt/