Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id NAA00960 for postgres-dist; Tue, 23 Nov 1993 13:47:28 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199311232147.NAA00960@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id NAA00951 for <postgres@nobozo.CS.Berkeley.EDU>; Tue, 23 Nov 1993 13:47:27 -0800
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id NAA18375; Tue, 23 Nov 1993 13:47:23 -0800
Message-Id: <199311232147.NAA18375@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
To: John Peter Lee <jlee@cs.uml.edu>
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: killing process while creating index, and more... 
In-reply-to: Your message of Tue, 23 Nov 1993 15:16:14 -0500 (EST) 
	     <199311232016.AA20071@cs.uml.edu> 
Date: Tue, 23 Nov 93 13:47:22 -0800
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-dist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Tue, 23 Nov 93 13:47:28 -0800
Resent-XMts: smtp

John Peter Lee <jlee@cs.uml.edu> writes:
>   I would like to know what the effect would be if I had killed my process
>   that was building indexes on a newly created database. It seems that the
>   b-tree building is taking an extremely long time, and I'd like to stop
>   for now and do some other work with the database. If I killed the 
>   process and deleted the index (can I do that, or only delete classes ?),
>   would all be well ??? Would anything become corrupted such that the 
>   database is unreadable ??? It took over 25 hours to construct the data-
>   base, and I don't want to make it unusable.

the short answer is, yes, you *can* corrupt your database by doing a 
kill -9 of a backend that's building an index.  specifically, it is
possible (not certain) that you may damage the indexes on the system 
catalogs (which are modified because you're creating a new index 
classes), making the whole database unusable (albeit recoverable with 
some effort).  i don't remember whether 4.0.1 had catalog indexes or 
not, but i certainly would not do that on 4.1.

mind you, it might work.  however, even if you got lucky, the 
transaction would not have committed and the index would not be visible 
to the database, so you would have to clean up the appropriate files 
by hand.

in any case, there is no mechanism for restarting an interrupted 
index build.

>   Also, I never heard back from yesterday's question concerning the 
>   potential memory leak in Postgres. I had to use PQreset every 9000
>   appends to clear out the resident set of the postgres process. Any
>   news on this ?

i hate to say this but -- there is a workaround so this is unlikely 
to be looked at anytime soon.  (if someone here [ucb] has spare cycles, 
feel free to volunteer.)
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
