X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4F6745E46C2 for ; Wed, 25 Aug 2004 08:02:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07928-04 for ; Wed, 25 Aug 2004 11:02:53 +0000 (GMT) Received: from smtp111.mail.sc5.yahoo.com (smtp111.mail.sc5.yahoo.com [66.163.170.9]) by svr1.postgresql.org (Postfix) with SMTP id 933DA5E40AC for ; Wed, 25 Aug 2004 08:02:50 -0300 (ADT) Received: from unknown (HELO jupiter.black-lion.info) (janwieck@68.80.245.191 with login) by smtp111.mail.sc5.yahoo.com with SMTP; 25 Aug 2004 11:02:53 -0000 Received: from [172.21.8.18] ([192.168.192.101]) (authenticated bits=0) by jupiter.black-lion.info (8.12.10/8.12.9) with ESMTP id i7PB2qT7099953; Wed, 25 Aug 2004 07:02:52 -0400 (EDT) (envelope-from JanWieck@Yahoo.com) Message-ID: <412C71F1.4030902@Yahoo.com> Date: Wed, 25 Aug 2004 07:03:13 -0400 From: Jan Wieck User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: my ho Cc: pgsql-performance@postgresql.org Subject: Re: postgresql performance with multimedia References: <20040825065405.83731.qmail@web54107.mail.yahoo.com> In-Reply-To: <20040825065405.83731.qmail@web54107.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/334 X-Sequence-Number: 7970 On 8/25/2004 2:54 AM, my ho wrote: >> Tom Lane answered to that question. The code in >> question does resolve >> "localhost" with getaddrinfo() and then tries to >> create and bind a UDP >> socket to all returned addresses. For some reason >> "localhost" on your >> system resolves to an address that is not available >> for bind(2). > > I tried to put my_ip instead of "localhost" in > bufmng.c and it seems to work (no more complaining). > However i check the pg_statio_all_tables and dont see > any recorded statistic at all. (all the columns are > '0') The block level statistics are disabled by default in the postgresql.conf file. > some time postmaster shut down with this err msg: > LOG: statistics collector process () > exited with exit code 1 Fix your operating systems network settings instead of curing the symptoms by breaking PostgreSQL. > i starts postmaster with this command: > postmaster -i -p $PORT -D $PGDATA -k $PGDATA -N 32 -B > 64 -o -s > >> > btw, what i want to ask here is does postgreSQL >> have >> > any kind of read-ahead buffer implemented? 'cos it >> > would be useful in multimedia case when we always >> scan >> > the large table for continous data. >> >> Since there is no mechanism to control that data is >> stored contiguously >> in the tables, what would that be good for? > > i thought that rows in the table will be stored > contiguously? in that case, if the user is requesting > 1 row, we make sure that the continue rows are ready > in the buffer pool so that when they next requested, > they wont be asked to read from disk. For multimedia > data, this is important 'cos data needs to be > presented continuously without any waiting. They are only stored in that way on initial load and if the load is done with a single process. And don't you rely on this for the future. Right now, if you ever update or delete tuples, that order changes already. Also keep in mind that large values are not stored inline, but in an extra "TOAST" relation. For your "streaming" purposes I strongly recommend you do it in your application with the appropriate thread model. A relational database management system is not a multimedia cache. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #