Re: [HACKERS] 7.0 status request

From: wieck(at)debis(dot)com (Jan Wieck)
To: bhirt(at)mobygames(dot)com
Cc: wieck(at)debis(dot)com, pgsql-hackers(at)postgreSQL(dot)org, bhirt(at)loopy(dot)berkhirt(dot)com
Subject: Re: [HACKERS] 7.0 status request
Date: 1999-11-19 22:17:39
Message-ID: m11owLb-0003kIC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I submitted a very small patch to dumpdb that creates SQL that will
> reindex the database. It's then trivial to then redirect that output to
> pgsql on UNIX. I run into this problem frequently, so I wanted
> to automate the process. I never saw a reply to my post on the list,
> so I wonder if it made it.
>
> I'm not sure how reindexdb worked, but if it just generated SQL based of
> the indexes in the database it would make sense to only have the SQL
> generation in one common place instead of having it in dumpdb and reindexdb.
> Two branches of nearly identical code would be a pain to maintain.

It's a different approach. And recreating system catalog
indices cannot work through the regular psql interface. So
your pgdump enhancement will never be able to do that.

You need to be in bootstrap processing mode (the one the
system is running in while initdb) to drop or create indices
on the system catalog tables. Therefore the postmaster must
NOT be running and you have a (very limited) interface to the
bootstrapping postgres process. Thus you'll have to talk the
*.bki.source dialect to issue commands.

I already made some tests, but they all corrupted more than
they fixed :-). Seems the semantics of the Postgres 4.2
reindexdb have been hit by changes in index handling since
1994. Not really surprising to me.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-11-19 22:33:35 Re: [HACKERS] All forked up
Previous Message Tom Lane 1999-11-19 22:14:52 Re: [HACKERS] 7.0 status request