Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by hub.org (8.9.3/8.9.3) with ESMTP id TAA53996; Thu, 3 Feb 2000 19:12:02 -0500 (EST) (envelope-from Inoue@tpf.co.jp) Received: from cadzone ([126.0.1.40] (may be forged)) by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP id JAA11742; Fri, 04 Feb 2000 09:10:53 +0900 From: "Hiroshi Inoue" To: "Bruce Momjian" Cc: "Tom Lane" , , , "Chris" Subject: relhasindex(was RE: [HACKERS] Proposed Changes to PostgreSQL) Date: Fri, 4 Feb 2000 09:16:46 +0900 Message-ID: <000201bf6ea5$1f8a9be0$2801007e@tpf.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-reply-To: <200002031237.HAA21220@candle.pha.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > -----Original Message----- > From: owner-pgsql-hackers@postgreSQL.org > [mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Bruce Momjian > > > Bruce Momjian wrote: > > > > > > Well I see that pg_class has columns like "relhasindex". If > we added a > > > > "relhassubclass", the overhead should be unmeasureable. > > > > > > Yes, but how do you keep that accurate? If I add indexes, then drop > > > them, does relhasindex go to false. > > > > I don't know. Does it? > > Let me add that to the TODO list. > > > > > >Could you do that for relhassubclass? > > > > If we made it relnumsubclasses and incremented/decremented on > > CREATE/DROP, it seems easy in theory. > > Yes, that would work. Seems hasindex has problems. > This posting may be off the point,sorry. Isn't relhasindex a kind of item that we can live without it ? I proposed to change the use of this item in [[HACKERS] Index recreation in vacuum]. Though I have heard no clear objection, I want to confirm again. My proposal is as follows. 1) DDL commands don't rely on relhasindex. 2) DML commands don't take indexes into account if relhasindex is set to false. 3) REINDEX command and vacuum with REINDEX option sets this flag to false at the beginning and sets it to true when recreation of all indexes completed. Comments ? Regards. Hiroshi Inoue Inoue@tpf.co.jp