Re: [ADMIN] Windows XP Service startup

2005-06-10 Thread Magnus Hagander
> I have been using an application which uses PostgreSql on > Solaris for a few years and now I am trying to our > application running on Windows XP. I want the postmaster > started as a "service" which is a choice during installation. > However, when the service is started, I want to use a >

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Steve Crawford
On Friday 10 June 2005 10:03 am, Lee Wu wrote: > That is exactly what I did: > > \o a_lot_room_to_hold_my_result > select * from a_table > > either > 1. out of memory for query result > 2. killed > 3. crash PG > > "If you have a very large table you can exhaust memory on the > client side unless yo

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Tom Lane
"Lee Wu" <[EMAIL PROTECTED]> writes: > either > 1. out of memory for query result > 2. killed > 3. crash PG Cases 2 and 3 represent the kernel out-of-memory code going nuts. Google for "OOM kill" and "memory overcommit". IMHO you never want Linux's default memory overcommit behavior on a product

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Lee Wu
Which memory are you refer Tom? shared_buffers= 32768 and RAM is 4G while the table is about 2G. Why straight "select * from" need so big memory? From top, I did not see the process eating a lot of memory. From vmstat, I did not see any swaping. It is a dedicate test box, with only PG running.

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Lee Wu
That is exactly what I did: \o a_lot_room_to_hold_my_result select * from a_table either 1. out of memory for query result 2. killed 3. crash PG "If you have a very large table you can exhaust memory on the client side unless you are writing the data directly to a file." How besides "\o" and p

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Steve Crawford
On Friday 10 June 2005 9:33 am, Lee Wu wrote: > Even without saving to file, it is still killed: >... > My_db=# select * from a_table; > Killed >... The previous examples don't work for me. In psql try this: --First set the output to a file \o 'my_output.txt' --Now run the query select * from myf

Re: [ADMIN] Indexes getting corrupted.

2005-06-10 Thread Tom Lane
"Bruno G. Albuquerque" <[EMAIL PROTECTED]> writes: > Any pointers? Is there anything I can do for Windows to actually wait > for the postgresql processes to clean up? What it looks like to me is that your disk drive is lying about what it's actually written; or possibly Windows is lying to Postgr

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Tom Lane
"Lee Wu" <[EMAIL PROTECTED]> writes: > My_db=3D# select * from a_table; > Killed Apparently the table is bigger than psql can hold in memory? The simplest way to do this is certainly to use pg_dump in one-table mode. If you're intent on using psql, you could use a cursor or OFFSET/LIMIT to fetch

Re: [ADMIN] Indexes getting corrupted.

2005-06-10 Thread Bruno G. Albuquerque
Scott Marlowe wrote: I am having a weird problem here. I have the automated process to install PostgreSQL (8.0.1) on Windows 2000 machines. Besides installing the database server itself, my process does the following: 1 - Runs initdb to created the database I will be using. 2 - Runs a SQL

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Lee Wu
Even without saving to file, it is still killed:   Welcome to psql 8.0.3, the PostgreSQL interactive terminal.   Type:  \copyright for distribution terms    \h for help with SQL commands    \? for help with psql commands    \g or terminate with semicolon to execute query

Re: [ADMIN] How to recover when can't start database

2005-06-10 Thread Tom Lane
"Colin E. Freas" <[EMAIL PROTECTED]> writes: > 2005-06-07 16:02:38 EDTLOG: statement: update pg_class set > reltriggers=foo.c from (select relname,count(tgrelid) as c from > pg_class,pg_trigger where pg_class.oid=tgrelid and relnamespace=2200 > group by relname) foo; I'm afraid that database i

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Lee Wu
Same: My_db=# select * from a_table \o 'test2.dat' My_db-# ; Killed -Original Message- From: Bricklen Anderson [mailto:[EMAIL PROTECTED] Sent: Friday, June 10, 2005 9:35 AM To: Lee Wu Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] select * and save into a text file failed Lee Wu wr

Re: [ADMIN] PostgreSQL default data location

2005-06-10 Thread Tom Lane
James Herbers <[EMAIL PROTECTED]> writes: > It is a problem with the /etc/init.d/postgresql script. > On line 31 the script grabs the defaults from the > /etc/sysconfig/postgresql file which is where they should be. But then > on line 41-42 it goes to set these defaults by using the file > /etc

Re: [ADMIN] How to recover when can't start database

2005-06-10 Thread Colin E. Freas
Sorry if this post winds up as a duplicate on the list... --- In an effort to disable all of the foreign key restraints on a set of tables in my installation of PostgreSQL 8.0.1, I was fiddling with the pg_class table and managed to elicit behavior similar to what L. Boldareva ran into. (T

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread James Herbers
From a client machine try the program Aqua Data Studio (http://aquafold.com/) it has a nice export feature to export to text files. James Herbers Lee Wu wrote: Hi, When I try to save a query result into a text file from “select * from a_table”, once I got: out of memory for query result

Re: [ADMIN] select * and save into a text file failed

2005-06-10 Thread Bricklen Anderson
Lee Wu wrote: > > How can I save PG data into text file without using pg_dump? > did you try select * from table \o '/var/tmp/textfile.txt' ; -- ___ This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations

[ADMIN] select * and save into a text file failed

2005-06-10 Thread Lee Wu
Hi,   When I try to save a query result into a text file from “select * from a_table”, once I got: out of memory for query result under psql   Once got killed: My_db=# select * from a_table; Killed bash-2.05b$   And once it caused PG crashed.   My PG version is: select version

Re: [ADMIN] Is there a way to build 32-bit mode on 64-bit Linux boxes?

2005-06-10 Thread Mohan, Ross
Wayne, Comments inlined " || " below. - Ross -Original Message- When trying to build all 3 as 32-bit, I get this when building postgresql: ./configure --prefix=/scratch/slocal/schroede/test2/pgsql --enable-odbc --without-readline gmake /usr/bin/ld: Relocatable linking with relocati

Re: [ADMIN] PostgreSQL default data location

2005-06-10 Thread James Herbers
Found the problem, It is a problem with the /etc/init.d/postgresql script. On line 31 the script grabs the defaults from the /etc/sysconfig/postgresql file which is where they should be. But then on line 41-42 it goes to set these defaults by using the file /etc/sysconfig/postgresql.d/${NAME}