Re: Current initdb broken.

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk>, hackers(at)postgresql(dot)org
Subject: Re: Current initdb broken.
Date: 2000-06-10 17:37:53
Message-ID: 200006101737.NAA07190@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[ Charset ISO-8859-1 unsupported, converting... ]
> Um, excuse me. Any changes to the format of pg_shadow will break
> pg_dumpall, therefore this needs to be hold back until next release.

I see your point, and the comment in pg_dumpall:

# load all the non-postgres users
# XXX this breaks badly if the layout of pg_shadow ever changes.
# It'd be better to convert the data into CREATE USER commands.

Well, seems there would be no good way to add columns using pg_dumpall,
even if we waited until 7.1. The problem is that pg_dumpall assumes
that the databases being dumped and loaded have a pg_shadow with exactly
the same columns, as you noted in your comment.

Well one solution is to have 7.1 use CREATE USER commands, then add the
pg_shadow columns in 7.2.

If we re-order the new columns to be at the end, those columns will load
in with NULL's.

We could then modify the user code to make default for NULL values in
the new columns.

Another answer is to add some code to COPY to supply default values for
missing fields when loading pg_shadow. If we move the new columns to
the end of pg_shadow, that should be only a few lines of C code which we
can remove later.

>
>
> Bruce Momjian writes:
>
> > THanks. Fixed.
> >
> >
> > > Hi,
> > >
> > > I know it doesn't show in a patch, but.. there are some
> > > rogue spaces at the end of the line containing "usecreatetable".
> > >
> > > Keith.
> > >
> > > *** pgsql/src/bin/initdb/initdb.sh Fri Jun 9 18:09:51 2000
> > > --- /usr/local/pgsql/src/bin/initdb/initdb.sh Sat Jun 10 00:07:07 2000
> > > ***************
> > > *** 523,529 ****
> > > usename, \
> > > usesysid, \
> > > usecreatedb, \
> > > ! \
> > > uselocktable, \
> > > usetrace, \
> > > usesuper, \
> > > --- 523,529 ----
> > > usename, \
> > > usesysid, \
> > > usecreatedb, \
> > > ! usecreatetable, \
> > > uselocktable, \
> > > usetrace, \
> > > usesuper, \
> > >
> > >
> >
> >
> >
>
> --
> Peter Eisentraut Sernanders v?g 10:115
> peter_e(at)gmx(dot)net 75262 Uppsala
> http://yi.org/peter-e/ Sweden
>
>

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-06-10 18:03:15 Re: Current initdb broken.
Previous Message Bruce Momjian 2000-06-10 16:15:11 Re: ALTER TABLE DROP COLUMN