Broken source tree

Поиск
Список
Период
Сортировка
Искать

Broken source tree

От:
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Дата:
I did a CVSup a few minutes ago, and tried to do a clean install.
configure seemed to do the right thing, but initdb was not happy. Looks
like (perhaps) the recent changes to initdb to allow non-interactive use
might have broken things?

Regarding specific symptoms:
1) libpq.so.1 did get made and is in the right place afaik. Don't know
why pg_id is complaining.
2) initdb has a syntax error in the script.
3) initdb does not print a valid uid for the postgres user.
4) Bootstrapping the template database fails.

I haven't done a clean install (or a cvs update) for a few weeks, and
I've seen a bit of traffic on the list about problems like this. Help!

                     - Tom

golem$ initdb
initdb: using /opt/postgres/current/lib/local1_template1.bki.source as
input to create the template database.
initdb: using /opt/postgres/current/lib/global1.bki.source as input to
create the global classes.
initdb: using /opt/postgres/current/lib/pg_hba.conf.sample as the
host-based authentication control file.

pg_id: can't load library 'libpq.so.1'
/opt/postgres/current/bin/initdb: [: =: unary operator expected
pg_id: can't load library 'libpq.so.1'
pg_id: can't load library 'libpq.so.1'
/opt/postgres/current/bin/initdb: [: too many arguments
We are initializing the database system with username postgres (uid=).
This user will own all the files and must also own the server process.

Creating Postgres database system directory /opt/postgres/current/data

Creating Postgres database system directory
/opt/postgres/current/data/base

initdb: creating template database in
/opt/postgres/current/data/base/template1
Running: postgres -boot -C -F -D/opt/postgres/current/data -Q template1
ERROR:  pg_atoi: error in "f": can't parse "f"
ERROR:  pg_atoi: error in "f": can't parse "f"
initdb: could not create template database
initdb: cleaning up by wiping out
/opt/postgres/current/data/base/template1
golem$

Re: [HACKERS] Broken source tree

От:
t-ishii@sra.co.jp
Дата:
>I did a CVSup a few minutes ago, and tried to do a clean install.
>configure seemed to do the right thing, but initdb was not
>happy. Looks

Seems linux users have been experiencing problems with initdb, and I
decided to make another challenge of installing PostgreSQL to my
RedHat 4.0 box from scratch. (I did cvs up a few hours ago). So far no
problem was found.
 
>like (perhaps) the recent changes to initdb to allow non-interactive use
					        ~~~~~~~~~~~~~~~~~~~~~~~~~
>might have broken things?

I didn't know about this. Maybe you mean the patches I have sent
recently?

>Regarding specific symptoms:
>1) libpq.so.1 did get made and is in the right place afaik. Don't know
>why pg_id is complaining.

don't know too.

>2) initdb has a syntax error in the script.

maybe due to pg_id returning null string?
--
Tatsuo Ishii
t-ishii@sra.co.jp

Re: [HACKERS] Broken source tree

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> >I did a CVSup a few minutes ago, and tried to do a clean install.
> >configure seemed to do the right thing, but initdb was not
> >happy. Looks
> 
> Seems linux users have been experiencing problems with initdb, and I
> decided to make another challenge of installing PostgreSQL to my
> RedHat 4.0 box from scratch. (I did cvs up a few hours ago). So far no
> problem was found.
>  
> >like (perhaps) the recent changes to initdb to allow non-interactive use
> 					        ~~~~~~~~~~~~~~~~~~~~~~~~~
> >might have broken things?
> 
> I didn't know about this. Maybe you mean the patches I have sent
> recently?
> 
> >Regarding specific symptoms:
> >1) libpq.so.1 did get made and is in the right place afaik. Don't know
> >why pg_id is complaining.
> 
> don't know too.
> 
> >2) initdb has a syntax error in the script.
> 
> maybe due to pg_id returning null string?
> --
> Tatsuo Ishii
> t-ishii@sra.co.jp
> 

Multi-byte pg_class_mb.h and others had duplicate copies of the file in
them.  I am committing a fix now.

As far as I am concerned, if you want to just add the endcoding field to
various tables, go ahead.  It is easier than maintaining two copies of
the files, and should make your job easier. 

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: [HACKERS] Broken source tree

От:
t-ishii@sra.co.jp
Дата:
>Multi-byte pg_class_mb.h and others had duplicate copies of the file in
>them.  I am committing a fix now.

Thanks.

>As far as I am concerned, if you want to just add the endcoding field to
>various tables, go ahead.  It is easier than maintaining two copies of
>the files, and should make your job easier. 

Thanks again! If there's no objection, I will go ahead.
--
Tatsuo Ishii
t-ishii@sra.co.jp

new MB patch and pg_type oid problem

От:
t-ishii@sra.co.jp
Дата:
>>Multi-byte pg_class_mb.h and others had duplicate copies of the file in
>>them.  I am committing a fix now.
>
>Thanks.
>
>>As far as I am concerned, if you want to just add the endcoding field to
>>various tables, go ahead.  It is easier than maintaining two copies of
>>the files, and should make your job easier. 
>
>Thanks again! If there's no objection, I will go ahead.

Included patches are mainly for this purpose. 

o note that now pg_database has a new attribuite "encoding" even if
MULTIBYTE is not enabled. So be sure to run initdb.

o these patches are made against the latest source tree (after Bruce's
massive patch, I think) BTW, I noticed that after running regression,
the oid field of pg_type seems disappeared.

	regression=> select oid from pg_type;
	ERROR:  attribute 'oid' not found

this happens after the constraints test. This occures with/without my
patches. strange...

o pg_database_mb.h, pg_class_mb.h, pg_attribute_mb.h are no longer
used, and shoud be removed.

o GetDatabaseInfo() in utils/misc/database.c removed (actually in
#ifdef 0). seems nobody uses.

touched files are:

Index: src/backend/bootstrap/Makefile
Index: src/backend/bootstrap/bootparse.y
Index: src/backend/bootstrap/bootscanner.l
Index: src/backend/catalog/Makefile
Index: src/backend/commands/copy.c
Index: src/backend/commands/dbcommands.c
Index: src/backend/commands/rename.c
Index: src/backend/parser/gram.y
Index: src/backend/storage/lmgr/Makefile
Index: src/backend/storage/lmgr/lmgr.c
Index: src/backend/storage/smgr/md.c
Index: src/backend/tcop/utility.c
Index: src/backend/utils/cache/Makefile
Index: src/backend/utils/cache/fcache.c
Index: src/backend/utils/init/postinit.c
Index: src/backend/utils/mb/conv.c
Index: src/backend/utils/mb/wchar.c
Index: src/backend/utils/misc/database.c
Index: src/bin/initdb/initdb.sh
Index: src/bin/pg_dump/pg_dumpall
Index: src/include/miscadmin.h
Index: src/include/catalog/pg_attribute.h
Index: src/include/catalog/pg_class.h
Index: src/include/catalog/pg_database.h
Index: src/include/commands/dbcommands.h
Index: src/include/mb/pg_wchar.h
Index: src/include/nodes/parsenodes.h

---------------------------------------------------------------------
begin 644 mb.patch.gz
M'XL("+N"VC4``VUB+G!A=&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8+T?>'W;GZ0^T2P^'<=),HQ&DVGJ
M.NPR&UU,6G4%"$RO]?.K\-7YOYM4&J0#Z:3
M290.9YJ4*)YJN8'R8,0,=-W+R8PY@'KCW+;-P1BSU/KD)3&]>-U)I?+9L";Z
MGM>KI@1O9$9=)6U2G_N8N;5JA=`58\4T-183F;_1EKD4O.?Y8K-8+[=+>RF4
MF1JNB1Q
M%9;/NLQ.#D,;QQ@UFLV"ZQ+0+@'M,9./
M@/8(:,@L80(:$M`^N`$![8L9P&?H:I4_L#FYA<4=UX)`E#?6)]GY>O6TLZR>
MQS/P/;[DS*YOOA6`#6)*"^/!"ZM1^B]/FC*_2O"&9U&I9*\*M=S&U/*:4LMO
M2*V@*;4ZSZ)6]QG4H@A#4XLB#$TMBC`TM4C"U'"+(DP-MRC"U'"+(DP-MRC"
MU'"K\[K<(O;OZK]!][&)5T=1[\*QM<5.`-;@^6YN-.B-NHW>#Z_+-FJ'WX5O
MZ"2RW-+IVB]!V#X(PE)C=+`,9+9@RCU6][!3VX6V=224*S.L4H;:B-!]`RY-
M7(2CS'B^#Q:&4EWK(C-4P:S2<):/E!'YJKFE@LL9]`U;&IE@OR\?#07JK7Q"
B^2,`&$CM

Re: new MB patch and pg_type oid problem

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> >>Multi-byte pg_class_mb.h and others had duplicate copies of the file in
> >>them.  I am committing a fix now.
> >
> >Thanks.
> >
> >>As far as I am concerned, if you want to just add the endcoding field to
> >>various tables, go ahead.  It is easier than maintaining two copies of
> >>the files, and should make your job easier. 
> >
> >Thanks again! If there's no objection, I will go ahead.
> 
> Included patches are mainly for this purpose. 
> 
> o note that now pg_database has a new attribuite "encoding" even if
> MULTIBYTE is not enabled. So be sure to run initdb.
> 
> o these patches are made against the latest source tree (after Bruce's
> massive patch, I think) BTW, I noticed that after running regression,
> the oid field of pg_type seems disappeared.
> 
> 	regression=> select oid from pg_type;
> 	ERROR:  attribute 'oid' not found

I just tried:

	select oid from pg_type;

and it worked.

> 
> this happens after the constraints test. This occures with/without my
> patches. strange...

What contraints test?

> 
> o pg_database_mb.h, pg_class_mb.h, pg_attribute_mb.h are no longer
> used, and shoud be removed.
> 
> o GetDatabaseInfo() in utils/misc/database.c removed (actually in
> #ifdef 0). seems nobody uses.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: new MB patch and pg_type oid problem

От:
t-ishii@sra.co.jp
Дата:
>> o these patches are made against the latest source tree (after Bruce's
>> massive patch, I think) BTW, I noticed that after running regression,
>> the oid field of pg_type seems disappeared.
>> 
>> 	regression=> select oid from pg_type;
>> 	ERROR:  attribute 'oid' not found
>
>I just tried:
>
>	select oid from pg_type;
>
>and it worked.
>
>> 
>> this happens after the constraints test. This occures with/without my
>> patches. strange...
>
>What contraints test?

The constraints test in the regression test suite.  Following step
should reproduce the problem.

------------------------------------------------
% cd src/test/regress
% gmake all
% createdb test
% psql -c "select count(oid) from pg_type" test
count
-----
  106
(1 row)
% psql test < sql/constraints.sql 
% psql -c "select count(oid) from pg_type" test
ERROR:  attribute 'oid' not found
------------------------------------------------

I found the problem while debugging pg_dump command. I ran the
regression test, then tried to dump the regression database using
pg_dump that failed with an error message:

	getTypes(): SELECT failed

Inspecting the regression test step by step, I found the "no oid
attribute problem" had occured right after the constraints test.
--
Tatsuo Ishii
t-ishii@sra.co.jp

Re: new MB patch and pg_type oid problem

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> >> o these patches are made against the latest source tree (after Bruce's
> >> massive patch, I think) BTW, I noticed that after running regression,
> >> the oid field of pg_type seems disappeared.
> >> 
> >> 	regression=> select oid from pg_type;
> >> 	ERROR:  attribute 'oid' not found
> >
> >I just tried:
> >
> >	select oid from pg_type;
> >
> >and it worked.
> >
> >> 
> >> this happens after the constraints test. This occures with/without my
> >> patches. strange...
> >
> >What contraints test?
> 
> The constraints test in the regression test suite.  Following step
> should reproduce the problem.
> 
> ------------------------------------------------
> % cd src/test/regress
> % gmake all
> % createdb test
> % psql -c "select count(oid) from pg_type" test
> count
> -----
>   106
> (1 row)
> % psql test < sql/constraints.sql 
> % psql -c "select count(oid) from pg_type" test
> ERROR:  attribute 'oid' not found
> ------------------------------------------------
> 
> I found the problem while debugging pg_dump command. I ran the
> regression test, then tried to dump the regression database using
> pg_dump that failed with an error message:
> 
> 	getTypes(): SELECT failed
> 
> Inspecting the regression test step by step, I found the "no oid
> attribute problem" had occured right after the constraints test.

I see the following change to pg_attribute.  I am researching why.

They are exactly the rows you say are missing.

---------------------------------------------------------------------------

*** /tmp/c	Thu Aug 20 11:43:41 1998
--- /tmp/d	Thu Aug 20 11:44:10 1998
***************
*** 12,21 ****
  1247	typoutput	24	0	4	12	0	-1	-1	t	f	i	f	f
  1247	typreceive	24	0	4	13	0	-1	-1	t	f	i	f	f
  1247	typsend	24	0	4	14	0	-1	-1	t	f	i	f	f
- 1247	typalign	18	0	1	15	0	-1	-1	t	f	c	f	f
- 1247	typdefault	25	0	-1	16	0	-1	-1	f	f	i	f	f
- 1247	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
- 1247	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
  1247	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
  1247	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
  1247	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
--- 12,17 ----
***************
*** 393,395 ****
--- 389,503 ----
  17184	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
  17184	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
  17184	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143776	i	23	0	4	1	0	-1	-1	t	f	i	f	t
+ 143776	x	25	0	-1	2	0	-1	-1	f	f	i	f	t
+ 143776	f	701	0	8	3	0	-1	-1	f	f	d	f	t
+ 143776	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143776	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143776	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143776	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143776	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143776	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143795	sequence_name	19	0	32	1	0	-1	-1	f	f	d	f	f
+ 143795	last_value	23	0	4	2	0	-1	-1	t	f	i	f	f
+ 143795	increment_by	23	0	4	3	0	-1	-1	t	f	i	f	f
+ 143795	max_value	23	0	4	4	0	-1	-1	t	f	i	f	f
+ 143795	min_value	23	0	4	5	0	-1	-1	t	f	i	f	f
+ 143795	cache_value	23	0	4	6	0	-1	-1	t	f	i	f	f
+ 143795	is_cycled	18	0	1	7	0	-1	-1	t	f	c	f	f
+ 143795	is_called	18	0	1	8	0	-1	-1	t	f	c	f	f
+ 143795	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143795	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143795	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143795	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143795	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143795	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143812	i1	23	0	4	1	0	-1	-1	t	f	i	f	t
+ 143812	i2	23	0	4	2	0	-1	-1	t	f	i	f	t
+ 143812	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143812	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143812	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143812	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143812	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143812	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143828	x	23	0	4	1	0	-1	-1	t	f	i	f	f
+ 143828	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143828	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143828	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143828	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143828	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143828	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143841	sequence_name	19	0	32	1	0	-1	-1	f	f	d	f	f
+ 143841	last_value	23	0	4	2	0	-1	-1	t	f	i	f	f
+ 143841	increment_by	23	0	4	3	0	-1	-1	t	f	i	f	f
+ 143841	max_value	23	0	4	4	0	-1	-1	t	f	i	f	f
+ 143841	min_value	23	0	4	5	0	-1	-1	t	f	i	f	f
+ 143841	cache_value	23	0	4	6	0	-1	-1	t	f	i	f	f
+ 143841	is_cycled	18	0	1	7	0	-1	-1	t	f	c	f	f
+ 143841	is_called	18	0	1	8	0	-1	-1	t	f	c	f	f
+ 143841	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143841	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143841	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143841	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143841	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143841	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143858	x	23	0	4	1	0	-1	-1	t	f	i	f	f
+ 143858	y	25	0	-1	2	0	-1	-1	f	f	i	f	f
+ 143858	z	23	0	4	3	0	-1	-1	t	f	i	f	f
+ 143858	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143858	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143858	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143858	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143858	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143858	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143872	sequence_name	19	0	32	1	0	-1	-1	f	f	d	f	f
+ 143872	last_value	23	0	4	2	0	-1	-1	t	f	i	f	f
+ 143872	increment_by	23	0	4	3	0	-1	-1	t	f	i	f	f
+ 143872	max_value	23	0	4	4	0	-1	-1	t	f	i	f	f
+ 143872	min_value	23	0	4	5	0	-1	-1	t	f	i	f	f
+ 143872	cache_value	23	0	4	6	0	-1	-1	t	f	i	f	f
+ 143872	is_cycled	18	0	1	7	0	-1	-1	t	f	c	f	f
+ 143872	is_called	18	0	1	8	0	-1	-1	t	f	c	f	f
+ 143889	x	23	0	4	1	0	-1	-1	t	f	i	f	t
+ 143889	y	25	0	-1	2	0	-1	-1	f	f	i	f	t
+ 143889	z	23	0	4	3	0	-1	-1	t	f	i	f	t
+ 143889	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143889	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143889	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143889	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143889	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143889	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143911	sequence_name	19	0	32	1	0	-1	-1	f	f	d	f	f
+ 143911	last_value	23	0	4	2	0	-1	-1	t	f	i	f	f
+ 143911	increment_by	23	0	4	3	0	-1	-1	t	f	i	f	f
+ 143911	max_value	23	0	4	4	0	-1	-1	t	f	i	f	f
+ 143911	min_value	23	0	4	5	0	-1	-1	t	f	i	f	f
+ 143911	cache_value	23	0	4	6	0	-1	-1	t	f	i	f	f
+ 143911	is_cycled	18	0	1	7	0	-1	-1	t	f	c	f	f
+ 143911	is_called	18	0	1	8	0	-1	-1	t	f	c	f	f
+ 143911	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143911	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143911	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143911	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143911	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143911	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143928	xd	23	0	4	1	0	-1	-1	t	f	i	f	f
+ 143928	yd	25	0	-1	2	0	-1	-1	f	f	i	f	f
+ 143928	zd	23	0	4	3	0	-1	-1	t	f	i	f	f
+ 143946	x	23	0	4	1	0	-1	-1	t	f	i	f	f
+ 143946	y	25	0	-1	2	0	-1	-1	f	f	i	f	f
+ 143946	z	23	0	4	3	0	-1	-1	t	f	i	f	f
+ 143946	ctid	27	0	6	-1	0	-1	-1	f	f	i	f	f
+ 143946	oid	26	0	4	-2	0	-1	-1	t	f	i	f	f
+ 143946	xmin	28	0	4	-3	0	-1	-1	f	f	i	f	f
+ 143946	cmin	29	0	4	-4	0	-1	-1	t	f	i	f	f
+ 143946	xmax	28	0	4	-5	0	-1	-1	f	f	i	f	f
+ 143946	cmax	29	0	4	-6	0	-1	-1	t	f	i	f	f
+ 143961	i	23	0	4	1	0	-1	-1	t	f	i	t	f
+ 143961	t	25	0	-1	2	0	-1	-1	f	f	i	f	f
+ 143979	i	23	0	4	1	0	-1	-1	t	f	i	t	f
+ 143979	t	25	0	-1	2	0	-1	-1	f	f	i	t	f
+ 143997	i	23	0	4	1	0	-1	-1	t	f	i	f	f
+ 143997	t	25	0	-1	2	0	-1	-1	f	f	i	f	f
+ 144017	i	23	0	4	1	0	-1	-1	t	f	i	f	f
+ 144017	t	25	0	-1	2	0	-1	-1	f	f	i	f	f


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: new MB patch and pg_type oid problem

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> >> o these patches are made against the latest source tree (after Bruce's
> >> massive patch, I think) BTW, I noticed that after running regression,
> >> the oid field of pg_type seems disappeared.
> >> 
> >> 	regression=> select oid from pg_type;
> >> 	ERROR:  attribute 'oid' not found
> >
> >I just tried:
> >
> >	select oid from pg_type;
> >
> >and it worked.
> >
> >> 
> >> this happens after the constraints test. This occures with/without my
> >> patches. strange...
> >
> >What contraints test?
> 
> The constraints test in the regression test suite.  Following step
> should reproduce the problem.
> 
> ------------------------------------------------
> % cd src/test/regress
> % gmake all
> % createdb test
> % psql -c "select count(oid) from pg_type" test
> count
> -----
>   106
> (1 row)
> % psql test < sql/constraints.sql 
> % psql -c "select count(oid) from pg_type" test
> ERROR:  attribute 'oid' not found
> ------------------------------------------------
> 
> I found the problem while debugging pg_dump command. I ran the
> regression test, then tried to dump the regression database using
> pg_dump that failed with an error message:
> 
> 	getTypes(): SELECT failed
> 
> Inspecting the regression test step by step, I found the "no oid
> attribute problem" had occured right after the constraints test.

OK, I have fixed this problem in the code.  I had messed up index
destruction badly.

The constraint regression test works now for me, while it did not
before.  Should be good.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: new MB patch and pg_type oid problem

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
Applied.


> >>Multi-byte pg_class_mb.h and others had duplicate copies of the file in
> >>them.  I am committing a fix now.
> >
> >Thanks.
> >
> >>As far as I am concerned, if you want to just add the endcoding field to
> >>various tables, go ahead.  It is easier than maintaining two copies of
> >>the files, and should make your job easier. 
> >
> >Thanks again! If there's no objection, I will go ahead.
> 
> Included patches are mainly for this purpose. 
> 
> o note that now pg_database has a new attribuite "encoding" even if
> MULTIBYTE is not enabled. So be sure to run initdb.
> 
> o these patches are made against the latest source tree (after Bruce's
> massive patch, I think) BTW, I noticed that after running regression,
> the oid field of pg_type seems disappeared.
> 
> 	regression=> select oid from pg_type;
> 	ERROR:  attribute 'oid' not found

Fixed earlier, thanks to your report.


> 
> this happens after the constraints test. This occures with/without my
> patches. strange...
> 
> o pg_database_mb.h, pg_class_mb.h, pg_attribute_mb.h are no longer
> used, and shoud be removed.
> 
> o GetDatabaseInfo() in utils/misc/database.c removed (actually in
> #ifdef 0). seems nobody uses.
> 
> touched files are:
> 
> Index: src/backend/bootstrap/Makefile
> Index: src/backend/bootstrap/bootparse.y
> Index: src/backend/bootstrap/bootscanner.l
> Index: src/backend/catalog/Makefile
> Index: src/backend/commands/copy.c
> Index: src/backend/commands/dbcommands.c
> Index: src/backend/commands/rename.c
> Index: src/backend/parser/gram.y
> Index: src/backend/storage/lmgr/Makefile
> Index: src/backend/storage/lmgr/lmgr.c
> Index: src/backend/storage/smgr/md.c
> Index: src/backend/tcop/utility.c
> Index: src/backend/utils/cache/Makefile
> Index: src/backend/utils/cache/fcache.c
> Index: src/backend/utils/init/postinit.c
> Index: src/backend/utils/mb/conv.c
> Index: src/backend/utils/mb/wchar.c
> Index: src/backend/utils/misc/database.c
> Index: src/bin/initdb/initdb.sh
> Index: src/bin/pg_dump/pg_dumpall
> Index: src/include/miscadmin.h
> Index: src/include/catalog/pg_attribute.h
> Index: src/include/catalog/pg_class.h
> Index: src/include/catalog/pg_database.h
> Index: src/include/commands/dbcommands.h
> Index: src/include/mb/pg_wchar.h
> Index: src/include/nodes/parsenodes.h
> 
> ---------------------------------------------------------------------
> begin 644 mb.patch.gz
> M'XL("+N"VC4``VUB+G!A=&-H`.P\>U_;2))_BT_1>)@@@XSU\`L8N"6.DWA#
> M@,-D=F>3K"/+LE$B2QI)#F&3?/>KZH<>M@3.TWNWEYD?5K>J2_7JZJKNDOK>
> MV/YP0*+0JH],ZYWMC>LCWX^C.#2#^G/SG3UQ7'OCZ-O_;5QV!P21'9#Z/`KK
> MKF^9;MUZ'X7PN'HPC?YTZW=3H;S?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P9]R/QBWQ0*)@<$4QAU;9.112\5.
> MJ+K+*3/@M^8KH1KNMW1AYFA];[WRO+2OW-^@I-%D/(Q""5/&%\[NEDKJ$9$-
> M^`4_GVD;T&XDM:"(P:EF!E(?
> M;&''6H`U^G=V8<#KW3Q>^?>Q8+T?>'W;GZ0^T2P^'<=),HQ&DVGJ
> M.NPR&UU,6G4%"$RO]?.K\-7YOYM4&J0#Z:3
> M290.9YJ4*)YJN8'R8,0,=-W+R8PY@'KCW+;-P1BSU/KD)3&]>-U)I?+9L";Z
> MGM>KI@1O9$9=)6U2G_N8N;5JA=`58\4T-183F;_1EKD4O.?Y8K-8+[=+>RF4
> MF1JNB1Q
> M%9;/NLQ.#D,;QQ@UFL MT[$@P8A\<`FD!ST"Z1%('T("Z1/(`/H$,B"03"-O$]`.`>V"ZQ+0+@'M,9./
> M@/8(:,@L80(:$M`^N`$![8L9P&?H:I4_L#FYA<4=UX)`E#?6)]GY>O6TLZR>
> MQS/P/;[DS*YOOA6`#6)*"^/!"ZM1^B]/FC*_2O"&9U&I9*\*M=S&U/*:4LMO
> M2*V@*;4ZSZ)6]QG4H@A#4XLB#$TMBC`TM4C"U'"+(DP-MRC"U'"+(DP-MRC"
> MU'"K\[K<(O;OZK]!][&)5T=1[\*QM<5.`-;@^6YN-.B-NHW>#Z_+-FJ'WX5O
> MZ"2RW-+IVB]!V#X(PE)C=+`,9+9@RCU6][!3VX6V=224*S.L4H;:B-!]`RY-
> M7(2CS'B^#Q:&4EWK(C-4P:S2<):/E!'YJKFE@LL9]`U;&IE@OR\?#07JK7Q"
> B^2,`&$CM `
> end
> 


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Re: [HACKERS] Re: new MB patch and pg_type oid problem

От:
Tatsuo Ishii <t-ishii@sra.co.jp>
Дата:
>Applied.

Thanks. But patches for src/backend/catalog/Makefile seems missing in
the current source tree. Please apply attached patches.

It also includes some corrections to src/backend/util/mb/wchar.c.
--
Tatsuo Ishii
t-ishii@sra.co.jp

----------------------------------------------------------------
Index: backend/catalog/Makefile
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/backend/catalog/Makefile,v
retrieving revision 1.12
diff -c -r1.12 Makefile
*** Makefile	1998/07/26 04:30:20	1.12
--- Makefile	1998/08/25 03:59:43
***************
*** 24,52 ****
  
  GENBKI= ./genbki.sh
  
- ifdef MULTIBYTE
  GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \
-                   pg_database_mb.h pg_variable.h pg_shadow.h \
-                   pg_group.h pg_log.h \
-                  )
- else
- GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \
                    pg_database.h pg_variable.h pg_shadow.h \
                    pg_group.h pg_log.h \
                   )
- endif
  
- ifdef MULTIBYTE
  LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
-                  pg_proc.h pg_type.h pg_attribute_mb.h pg_class_mb.h \
-                  pg_inherits.h pg_index.h pg_version.h pg_statistic.h \
-                  pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
-                  pg_language.h pg_parg.h \
-                  pg_aggregate.h pg_ipl.h pg_inheritproc.h \
-                  pg_rewrite.h pg_listener.h pg_description.h indexing.h \
-                 )
- else
- LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
                   pg_proc.h pg_type.h pg_attribute.h pg_class.h \
                   pg_inherits.h pg_index.h pg_version.h pg_statistic.h \
                   pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
--- 24,35 ----
***************
*** 54,60 ****
                   pg_aggregate.h pg_ipl.h pg_inheritproc.h \
                   pg_rewrite.h pg_listener.h pg_description.h indexing.h \
                  )
! endif
  global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS)
  	sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
  
--- 37,43 ----
                   pg_aggregate.h pg_ipl.h pg_inheritproc.h \
                   pg_rewrite.h pg_listener.h pg_description.h indexing.h \
                  )
! 
  global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS)
  	sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
  
Index: backend/utils/mb/wchar.c
===================================================================
RCS file: /usr/local/cvsroot/pgsql/src/backend/utils/mb/wchar.c,v
retrieving revision 1.2
diff -c -r1.2 wchar.c
*** wchar.c	1998/08/24 01:14:01	1.2
--- wchar.c	1998/08/25 04:00:20
***************
*** 13,18 ****
--- 13,41 ----
   * supported in the client, you don't need to define 
   * mb2wchar_with_len() function (SJIS is the case).
   */
+ 
+ /*
+  * SQL/ASCII
+  */
+ static void pg_ascii2wchar_with_len
+ (const unsigned char *from, pg_wchar *to, int len)
+ {
+   while (*from && len > 0) {
+     *to++ = *from++;
+     len--;
+   }
+   *to = 0;
+ }
+ 
+ static int pg_ascii_mblen(const unsigned char *s)
+ {
+   return(1);
+ }
+ 
+ /*
+  * EUC
+  */
+ 
  static void pg_euc2wchar_with_len
  (const unsigned char *from, pg_wchar *to, int len)
  {
***************
*** 316,322 ****
  }
  
  pg_wchar_tbl pg_wchar_table[] = {
!   {0, 0},
    {pg_eucjp2wchar_with_len, pg_eucjp_mblen},
    {pg_euccn2wchar_with_len, pg_euccn_mblen},
    {pg_euckr2wchar_with_len, pg_euckr_mblen},
--- 339,345 ----
  }
  
  pg_wchar_tbl pg_wchar_table[] = {
!   {pg_ascii2wchar_with_len, pg_ascii_mblen},
    {pg_eucjp2wchar_with_len, pg_eucjp_mblen},
    {pg_euccn2wchar_with_len, pg_euccn_mblen},
    {pg_euckr2wchar_with_len, pg_euckr_mblen},

Re: [HACKERS] Re: new MB patch and pg_type oid problem

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> >Applied.
> 
> Thanks. But patches for src/backend/catalog/Makefile seems missing in
> the current source tree. Please apply attached patches.
> 
> It also includes some corrections to src/backend/util/mb/wchar.c.
> --
> Tatsuo Ishii
> t-ishii@sra.co.jp

Done.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)
FAQ