Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E306F475DDA for ; Mon, 6 Jan 2003 17:23:07 -0500 (EST) Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143]) by postgresql.org (Postfix) with ESMTP id 269AF475B47 for ; Mon, 6 Jan 2003 17:23:07 -0500 (EST) Received: from Meshulum ([162.83.185.125]) by out005.verizon.net (InterMail vM.5.01.05.20 201-253-122-126-120-20021101) with ESMTP id <20030106222308.WNUK16306.out005.verizon.net@Meshulum> for ; Mon, 6 Jan 2003 16:23:08 -0600 Content-Type: text/plain; charset="us-ascii" From: mitchell laks Reply-To: mlaks@bellatlantic.net To: pgsql-admin@postgresql.org Subject: repair table? database? how ? neccessary? Date: Mon, 6 Jan 2003 17:21:53 -0500 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200301061721.53120.mlaks@bellatlantic.net> X-Authentication-Info: Submitted using SMTP AUTH PLAIN at out005.verizon.net from [162.83.185.125] at Mon, 6 Jan 2003 16:23:08 -0600 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/45 X-Sequence-Number: 6887 Hi. I have suffered for the last few years with M$ft access as the database= =20 backbone for an application that I have been running. After scouring the=20 internet, I have switched the application to running on Linux, and using=20 Postgresql. The main issue I had with Access was that as the database got larger, My=20 application began to fail regularly, and I began to need to do "repair" of= =20 the database almost on a daily or other daily basis. I had a choice of movi= ng=20 to Mysql or Postgresql. I currently have 2 machines using MySql and 5 using= =20 Postgresql. Now I am still in the early stages of useage, and belatedly it= =20 occured to me that I don't know how to 'repair' a postgresql database. Now I have been religiously running Vacuumdb --analyze (nightly) at 130am, = and=20 the Postgresql database is currently 5 times the size of the level when I= =20 began to have m$ft problems (i know that by the number of records that are= =20 being stored) {by the way how do you find the size of the database itself?= =20 where is it? somewhere in /var/lib/pgsql/data on my redhat7.3 system?)=20 without problems (knock wood) but what do I do if i need to repair? I dont= =20 see anything in the three booksi bought (Momjian, Stinson,Worsley/Drake). I= =20 see that Mysql has such facilities (myisamchk etc). Is Vacuum doing that=20 stuff already? What "stuff" is that stuff anyway? Currently about 500,000= =20 entries in some tables. Is it that Postgresql is just so robust that bad tables can't happen? I am = a=20 bit of a newbie, so I don't know exactly what it is that i have been doing= =20 with "repair" to repair whatever it was that was broken in msft that may no= t=20 occur here with Postgresql. Sigh. I need more knowledge. What do I read? Also I had an occurence. My application seems to be a connection hog. I did= n't=20 know - and left the max_connections =3D 64. Well I blew past that the othe= r=20 day and My application bombed. I got a postgresql error: Fatal 1: Too many clients (or perhaps - was it - not enough clients??). So I tried to go back to the beginning and I killed the application (But no= t=20 the postman - I keep seeing in Tom Lanes responses to people a little line = on=20 the bottom - tip: dont kill the postman, but no reference as to why not - s= o=20 I didn't! - i may be ignorant but i'm no dummy!). Then I logged in as the= =20 postgres user and I did pg_ctl stop. Well It didnt. Well I did pg_ctl stop again. And it didnt. Wel= l=20 then I waited for 5 minutes and did it again. And it didnt. But Tom Lane=20 really scared me so I DIDN"T KILL THE POSTMAN (but I really wanted to, not = in=20 cold blood you understand, but I had all these people screaming that they= =20 WANTED THEIR APPLICATION, but I locked the door and went to lunch, and a=20 while later the postman died on his own (ie the demon stopped)). Then I=20 started up the postman again and the application and it WORKED fine. Also I= =20 upped the client max to 256. So what was going on in the background when I said pg_ctl stop - usually I = get=20 a pretty immediate shutdown of the postgresl demon? and what would have=20 happened if instead of waiting for the postman to die a natural death, I ha= d=20 shutdown -h now the PC?Would I have damaged the Postgresql=20 installation/database? Would it actually have been ok anyway, with both the= =20 postmaster and application starting at boot as usual? Ie: What do I do next= =20 time? Thanks millions for having this forum! Mitchell