Re: [GENERAL] Funky template1 problem?

2005-12-21 Thread Richard Huxton
Jerry LeVan wrote: Hi, I have a bunch of small dbs (levan, pictures, and a couple of others). I have had these db's over many upgrades and I have just noticed that template1 seems to be a bit munged... [snip] I found this out when I tried to create a new user testuser for testing a totally no

Re: [GENERAL] PostgreSQL crashing

2005-12-21 Thread Richard Huxton
[EMAIL PROTECTED] wrote: PostgreSQL runs for a while but always eventually (30min - 2hrs) crashes. I thought it was memory initially but Memtest had no errors after running for a day. I don't think it is a hardware issues because I can run other applications without error. I have ran both vers

Re: [GENERAL] contrib extenstions

2005-12-21 Thread Richard Huxton
S McLurkin wrote: Is there some place where I can find information on all the contrib extenstions? The source distribution has a series of README files in the contrib/ directory. If you have a packaged version, documentation will depend on the packaging. Is there a specific package you are

Re: [GENERAL] view or index to optimize performance

2005-12-21 Thread Richard Huxton
Klein Balázs wrote: Hello everybody, I have a table that stores responses to questions in different questionnaires. This table will grow to millions of rows. [snip] I can store the fact that it is biodata in the bio field - it is biodata if the value of that field is not 0 and I can index that

[GENERAL] Running with fsync=off

2005-12-21 Thread Benjamin Arai
I want to be able to do large updates on an existing backed up database with fsync=off but at the end of the updates how do I ensure that the data gets synced? Somebody said running "sync ; sync; sync" from the console. This seems reasonable but why not just "sync" or is there another command

Re: [GENERAL] two shared memory segments?

2005-12-21 Thread Tom Lane
Ed Loehr <[EMAIL PROTECTED]> writes: > On Wednesday December 21 2005 8:24 pm, Tom Lane wrote: >> I'd say that you had a backend crash, causing the postmaster >> to abandon the original shared memory segment and make a new >> one, but the old segment is still attached to by a couple of >> processes.

Re: [GENERAL] SAVEPOINT performance

2005-12-21 Thread Bruce Momjian
Joseph Shraibman wrote: > Is there any performance impact of releasing savepoints? Releasing savepoints does release a little memory associated with each subtransaction, but I doubt you would be able to measure the difference unless you had thousands of subtransactions. -- Bruce Momjian

[GENERAL] SAVEPOINT performance

2005-12-21 Thread Joseph Shraibman
Is there any performance impact of releasing savepoints? ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] two shared memory segments?

2005-12-21 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > I have a cluster configured for ~800MB of shared memory cache > (shared_buffers = 10), but ipcs shows TWO shared memory > segments of ~800MB belonging to that postmaster. What kind of > a problem do I have here? I'd say that you had a backend crash, caus

Re: [GENERAL] contrib extenstions

2005-12-21 Thread Michael Fuhr
On Tue, Dec 20, 2005 at 10:31:06PM -0800, S McLurkin wrote: > Is there some place where I can find information on all the contrib > extenstions? In the contrib directory of the source code. That directory has a README with a short summary of each extension, and each extension's subdirectory has o

[GENERAL] lo function changed in PostgreSQL 8.1.1 (ask again)

2005-12-21 Thread Premsun Choltanwanich
From contrib/lo I found that it has something  difference between old and new version of PostgreSQL.  And I'm sure that I already tick on Large Object (lo) option when I install.   How can I manage on difference function?       :::New Version::: DOMAIN lo AS pg_catalog.oid;   FUNCTION lo_oid(lo)

[GENERAL] two shared memory segments?

2005-12-21 Thread Ed L.
I have a cluster configured for ~800MB of shared memory cache (shared_buffers = 10), but ipcs shows TWO shared memory segments of ~800MB belonging to that postmaster. What kind of a problem do I have here? T ID KEYMODEOWNER GROUP CREATORCGROUP NATTCH SEGS

Re: [GENERAL] PostgreSQL crashing

2005-12-21 Thread Neil Conway
[EMAIL PROTECTED] wrote: PostgreSQL runs for a while but always eventually (30min - 2hrs) crashes. Dec 20 17:14:57 server4 kernel: postmaster: page allocation failure. order:0, mode:0xd0 Dec 20 17:14:57 server4 kernel: [] __alloc_pages+0x2e1/0x2f7 This looks like a kernel or hardware issue,

Re: [GENERAL] Funky template1 problem?

2005-12-21 Thread Qingqing Zhou
On Wed, 21 Dec 2005, Tom Lane wrote: > > "Jerry LeVan" <[EMAIL PROTECTED]> wrote in message > >> I have had these db's over many upgrades and I have just noticed that > >> template1 seems to be a bit munged... > > I'm sure they are. Oh right -- since CREATE DATABASE just copied the whole direct

Re: [GENERAL] Indices for select count(*)?

2005-12-21 Thread Chris Browne
[EMAIL PROTECTED] (Marcus Engene) writes: > Greg Stark wrote: >> Alexander Scholz <[EMAIL PROTECTED]> writes: >> >>>Hi, thank you for your answer. >>> >>>Regarding the performance flow when trying to find out how many records are >>>currently being stored in the table, I don't see how an index shou

Re: [GENERAL] Funky template1 problem?

2005-12-21 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > "Jerry LeVan" <[EMAIL PROTECTED]> wrote in message >> I have had these db's over many upgrades and I have just noticed that >> template1 seems to be a bit munged... > ... And check if they are really in the template1? I'm sure they are. Probably Jer

Re: [GENERAL] Funky template1 problem?

2005-12-21 Thread Qingqing Zhou
"Jerry LeVan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a bunch of small dbs (levan, pictures, and a couple of others). > > I have had these db's over many upgrades and I have just noticed that > template1 seems to be a bit munged... > > testuser=> \c template1

Re: [GENERAL] Indices for select count(*)?

2005-12-21 Thread Jaime Casanova
On 12/21/05, Marcus Engene <[EMAIL PROTECTED]> wrote: > Greg Stark wrote: > > Alexander Scholz <[EMAIL PROTECTED]> writes: > > > >>Hi, thank you for your answer. > >> > >>Regarding the performance flow when trying to find out how many records are > >>currently being stored in the table, I don't see

Re: [GENERAL] Indices for select count(*)?

2005-12-21 Thread Marcus Engene
Greg Stark wrote: Alexander Scholz <[EMAIL PROTECTED]> writes: Hi, thank you for your answer. Regarding the performance flow when trying to find out how many records are currently being stored in the table, I don't see how an index should help... Nevertheless we've created an unique index on "

Re: [GENERAL] Indices for select count(*)?

2005-12-21 Thread Nicolas Barbier
On 12/21/05, Alexander Scholz <[EMAIL PROTECTED]> wrote: > Regarding the performance flow when trying to find out how many records > are currently being stored in the table, I don't see how an index should > help... Nevertheless we've created an unique index on "ID" but SELECT > count("ID") from "

Re: [GENERAL] Indices for select count(*)?

2005-12-21 Thread Greg Stark
Alexander Scholz <[EMAIL PROTECTED]> writes: > Hi, thank you for your answer. > > Regarding the performance flow when trying to find out how many records are > currently being stored in the table, I don't see how an index should help... > Nevertheless we've created an unique index on "ID" but SE

Re: [GENERAL] view or index to optimize performance

2005-12-21 Thread Klein Balázs
I thought that if I used a view to retrieve data its content might be cached so it would make the query faster. Am Mittwoch, 21. Dezember 2005 21:27 schrieb Klein Balázs: > Or should I instead create a view that contains only the biodata and select > from that? But will postgres use the indexes th

Re: [GENERAL] view or index to optimize performance

2005-12-21 Thread Peter Eisentraut
Am Mittwoch, 21. Dezember 2005 21:27 schrieb Klein Balázs: > Or should I instead create a view that contains only the biodata and select > from that? But will postgres use the indexes than? Would that be a better > approach? Whether the query is executed by a view or typed in in its full form by h

Re: [GENERAL] Indices for select count(*)?

2005-12-21 Thread Peter Eisentraut
Am Mittwoch, 21. Dezember 2005 12:01 schrieb Alexander Scholz: > So - what kind of indexing would speed this up then? You can't speed up a full-table count using an index. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] Memory Question

2005-12-21 Thread Joshua D. Drake
Benjamin Arai wrote: A machine with 4GB of memory has the ability to allocate 2GB to postgres under kenel 2.6. Is the 2GB maximum the sum total of (work_mem, maitenance_work_mem, and shared_memory) or just shared_memory? shared_memory and if I recall correctly that is adjustable but I do

[GENERAL] Memory Question

2005-12-21 Thread Benjamin Arai
A machine with 4GB of memory has the ability to allocate 2GB to postgres under kenel 2.6.  Is the 2GB maximum the sum total of (work_mem, maitenance_work_mem, and shared_memory) or just shared_memory?   

Re: [GENERAL] is this a bug or I am blind?

2005-12-21 Thread Mage
Martijn van Oosterhout wrote: On Sat, Dec 17, 2005 at 05:01:15PM -0500, Tom Lane wrote: Martijn van Oosterhout writes: I think the real solution is to implement COLLATE support. Maybe so, but we still need to figure out what we're doing for the back branches, and that won't be

[GENERAL] PostgreSQL crashing

2005-12-21 Thread barai
PostgreSQL runs for a while but always eventually (30min - 2hrs) crashes. I thought it was memory initially but Memtest had no errors after running for a day. I don't think it is a hardware issues because I can run other applications without error. I have ran both version 8.0.3 and 8.1.1 with th

[GENERAL] view or index to optimize performance

2005-12-21 Thread Klein Balázs
Hello everybody, I have a table that stores responses to questions in different questionnaires. This table will grow to millions of rows. My problem is that while most of the data in the table are rarely used in queries one type of response will be used quite often: biodata - name, gender, e-mail

[GENERAL] Indices for select count(*)?

2005-12-21 Thread Alexander Scholz
Hi, thank you for your answer. Regarding the performance flow when trying to find out how many records are currently being stored in the table, I don't see how an index should help... Nevertheless we've created an unique index on "ID" but SELECT count("ID") from "XYZ" still takes 35 seconds*.

[GENERAL] contrib extenstions

2005-12-21 Thread S McLurkin
Is there some place where I can find information on all the contrib extenstions?

[GENERAL] query for a time interval

2005-12-21 Thread Mark
Hello everybody, I'm looking for an elegant SQL statement that will work in Postgresql, MySQL and ORACLE. The query will be executed by Java client. To have this query for Postgresql is priority number one. In this query I try to get a list of message Ids that expired. time_to_live is in secon

[GENERAL] Funky template1 problem?

2005-12-21 Thread Jerry LeVan
Hi, I have a bunch of small dbs (levan, pictures, and a couple of others). I have had these db's over many upgrades and I have just noticed that template1 seems to be a bit munged... testuser=> \c template1 You are now connected to database "template1". template1=> \d List of relat

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread Seneca Cunningham
DANTE ALEXANDRA wrote: > Last question, how can I see that my 32-bit AIX program being limited to > 256MB of heap, as the user "pg_810" used to launch the postmaster got > when I execute the "ulimit -a" command : > $ ulimit -a > time(seconds)unlimited > file(blocks) unlimited > data

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread Tom Lane
DANTE ALEXANDRA <[EMAIL PROTECTED]> writes: > In my case, does this mean that each one of the two hashs and sorts will > take 64MB, so 192MB ? > What do you want to say with "so the two hashes and sort would think > they could use 3/4ths of the available heap" ? Right, exactly. In this particul

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread DANTE ALEXANDRA
Hello Tom, I've got others questions on work-mem parameter. On the "http://www.powerpostgresql.com/Downloads/annotated_conf_80.html"; web site, I've read that the work-mem specifies the amount of memory to be used by internal sort operations ans hash tables before switching to temporary disk f

Re: [GENERAL] Inheritance Algebra

2005-12-21 Thread Karsten Hilbert
On Wed, Dec 21, 2005 at 01:52:34PM +0100, Martijn van Oosterhout wrote: > On Sun, Dec 04, 2005 at 10:59:10PM -0700, Trent Shipley wrote: > > Relational Constraint Inheritance Algebra > > With regard to class and attribute uniqueness > > It's taken a while to digest this and sorry for the delay. Wh

Re: [GENERAL] Inheritance Algebra

2005-12-21 Thread Martijn van Oosterhout
On Sun, Dec 04, 2005 at 10:59:10PM -0700, Trent Shipley wrote: > Relational Constraint Inheritance Algebra > With regard to class and attribute uniqueness It's taken a while to digest this and sorry for the delay. While I find the ideas intreguing there is a little voice in the back of my head a

Re: [PERFORM] [GENERAL] need help

2005-12-21 Thread Alban Medici \(NetCentrex\)
Try to execute your query (in psql) with prefixing by EXPLAIN ANALYZE and send us the result db=# EXPLAIN ANALYZE UPDATE s_apotik SET stock = 100 WHERE obat_id='A'; regards -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tino Wildenhain Sent: mardi 6 dé

Re: [GENERAL] Questions about server.

2005-12-21 Thread Richard Huxton
max chin wrote: Dear Mr., My name is Chia. I'm a Malaysian student who still persuing my computer course. Now I'm working with a IT company for industry training. I got some questions about server. Hi Chia 1.) What I knew is when too many users access a database at the same time, it will s

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread DANTE ALEXANDRA
Hello, Just to give you explanation, I will try to explain you why I have set the "work_mem" to 64MB. I noticed that some of the queries have finished with an "out of memory" because the file system on which temporary files were created was to small. Consequently, I have increase the size of

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread Martijn van Oosterhout
On Wed, Dec 21, 2005 at 10:22:05AM +0100, DANTE ALEXANDRA wrote: > Hello, > > Thank you for all the answers I've got on this problem. > > Tom, I've checked this morning if the logfile contains lines like > %s: %ld total in %ld blocks; %ld free (%ld chunks); %ld used > and it is the case. > Exec

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread DANTE ALEXANDRA
Hello, According to several answers, my problem could be due to the 32 bits build. I hope I will try to make a 64 bits build in January, in order to give you more explanations about the possible errors I will encounter. I keep preciously your advice, and I hope I will be able to give you an a

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread DANTE ALEXANDRA
Hello, Thank you for all the answers I've got on this problem. Tom, I've checked this morning if the logfile contains lines like %s: %ld total in %ld blocks; %ld free (%ld chunks); %ld used and it is the case. As I launch a series of queries, I hope that the following lines are the exact lines