Thread: BUG #8160: 9.3 Beta 1 Initdb doesn't work
The following bug has been logged on the website: Bug reference: 8160 Logged by: Brad Nicholson Email address: bnicholson@hp.com PostgreSQL version: Unsupported/Unknown Operating system: CentOS release 6.2 (Final) Description: = Hi, I've installed the 9.3 beta 1 packages (via pgdg repo and yum) and when I try to do an initdb it fails. /var/lib/pgsql/9.3/data has nothing in it when I attempt the initdb : #service postgresql-9.3 initdb Initializing database:[FAILED] # cat /var/lib/pgsql/9.3/pgstartup.log The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /var/lib/pgsql/9.3/data ... ok creating directory /var/lib/pgsql/9.3/data/pg_xlog ... ok initdb: could not create symbolic link "/var/lib/pgsql/9.3/data/pg_xlog": File exists initdb: removing contents of data directory "/var/lib/pgsql/9.3/data" initdb: removing transaction log directory "/var/lib/pgsql/9.3/data/pg_xlog" could not open directory "/var/lib/pgsql/9.3/data/pg_xlog": No such file or directory initdb: failed to remove transaction log directory Brad. btw - on the bug reporting form, the popup version does not have 9.3 Beta as an option for version
On 14.05.2013 16:48, bnicholson@hp.com wrote: > I've installed the 9.3 beta 1 packages (via pgdg repo and yum) and when I > try to do an initdb it fails. /var/lib/pgsql/9.3/data has nothing in it when > I attempt the initdb : > > #service postgresql-9.3 initdb > Initializing database:[FAILED] > > # cat /var/lib/pgsql/9.3/pgstartup.log > The files belonging to this database system will be owned by user > "postgres". > This user must also own the server process. > > The database cluster will be initialized with locale "en_US.UTF-8". > The default database encoding has accordingly been set to "UTF8". > The default text search configuration will be set to "english". > Data page checksums are disabled. > > fixing permissions on existing directory /var/lib/pgsql/9.3/data ... ok > creating directory /var/lib/pgsql/9.3/data/pg_xlog ... ok > initdb: could not create symbolic link "/var/lib/pgsql/9.3/data/pg_xlog": > File exists There seems to be a bug in the init script. If you don't give a location for pg_xlog on the command line, it uses $PGDATA/pg_xlog, which confuses initdb: > # If the xlog directory is specified just after the locale parameter, use it: > if [ -z $INITDBXLOGDIR ] > then > INITDBXLOGSTRING=`echo $PGDATA/pg_xlog` > else > INITDBXLOGSTRING=`echo $INITDBXLOGDIR` > fi > ... > # Initialize the database > $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --xlogdir=$INITDBXLOGSTRING --auth='ident' $LOCALESTRING" >> "$PGLOG"2>&1 < /dev/null Seems that if INITDBXLOGDIR is not given, it should just leave out --xlogdir. Devrim? - Heikki
Hi Brad, On Tue, 2013-05-14 at 13:48 +0000, bnicholson@hp.com wrote: > > I've installed the 9.3 beta 1 packages (via pgdg repo and yum) and > when I try to do an initdb it fails. /var/lib/pgsql/9.3/data has > nothing in it when I attempt the initdb : We have released updated packages last night. Which version are you using? beta1-3PGDG are the latest ones, and *should be* error free. Regards, -- Devrim GÜNDÜZ Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogRGV2cmltIEfDnE5Ew5xa IFttYWlsdG86ZGV2cmltQGd1bmR1ei5vcmddDQo+IFNlbnQ6IFR1ZXNkYXksIE1heSAxNCwgMjAx MyAxMTo1MSBBTQ0KPiBUbzogTmljaG9sc29uLCBCcmFkIChUb3JvbnRvLCBPTiwgQ0EpDQo+IENj OiBwZ3NxbC1idWdzQHBvc3RncmVzcWwub3JnDQo+IFN1YmplY3Q6IFJlOiBbQlVHU10gQlVHICM4 MTYwOiA5LjMgQmV0YSAxIEluaXRkYiBkb2Vzbid0IHdvcmsNCj4gDQo+IA0KPiBIaSBCcmFkLA0K PiANCj4gT24gVHVlLCAyMDEzLTA1LTE0IGF0IDEzOjQ4ICswMDAwLCBibmljaG9sc29uQGhwLmNv bSB3cm90ZToNCj4gPg0KPiA+IEkndmUgaW5zdGFsbGVkIHRoZSA5LjMgYmV0YSAxIHBhY2thZ2Vz ICh2aWEgcGdkZyByZXBvIGFuZCB5dW0pIGFuZA0KPiA+IHdoZW4gSSB0cnkgdG8gZG8gYW4gaW5p dGRiIGl0IGZhaWxzLiAvdmFyL2xpYi9wZ3NxbC85LjMvZGF0YSBoYXMNCj4gPiBub3RoaW5nIGlu IGl0IHdoZW4gSSBhdHRlbXB0IHRoZSBpbml0ZGIgOg0KPiANCj4gV2UgaGF2ZSByZWxlYXNlZCB1 cGRhdGVkIHBhY2thZ2VzIGxhc3QgbmlnaHQuIFdoaWNoIHZlcnNpb24gYXJlIHlvdSB1c2luZz8N Cj4gYmV0YTEtM1BHREcgYXJlIHRoZSBsYXRlc3Qgb25lcywgYW5kICpzaG91bGQgYmUqIGVycm9y IGZyZWUuDQoNCkkgZ3JhYmJlZCB0aGVtIHRoaXMgbW9ybmluZyAtIEkgZ3JhYmJlZDoNCmh0dHA6 Ly95dW0ucG9zdGdyZXNxbC5vcmcvOS4zL3JlZGhhdC9yaGVsLTYteDg2XzY0L3BnZGctY2VudG9z OTMtOS4zLTEubm9hcmNoLnJwbQ0KDQpZdW0gaW5mbyBpcyBzaG93aW5nDQoNCk5hbWUgICAgICAg IDogcG9zdGdyZXNxbDkzLXNlcnZlcg0KQXJjaCAgICAgICAgOiB4ODZfNjQNClZlcnNpb24gICAg IDogOS4zYmV0YTENClJlbGVhc2UgICAgIDogM1BHREcucmhlbDYNClNpemUgICAgICAgIDogMTYg TQ0KUmVwbyAgICAgICAgOiBpbnN0YWxsZWQNCkZyb20gcmVwbyAgIDogcGdkZzkzDQoNCkJyYWQu DQo=
Hi, On Tue, 2013-05-14 at 18:49 +0300, Heikki Linnakangas wrote: > There seems to be a bug in the init script. If you don't give a > location > for pg_xlog on the command line, it uses $PGDATA/pg_xlog, which > confuses > initdb: > > > # If the xlog directory is specified just after the locale > parameter, use it: > > if [ -z $INITDBXLOGDIR ] > > then > > INITDBXLOGSTRING=`echo $PGDATA/pg_xlog` > > else > > INITDBXLOGSTRING=`echo $INITDBXLOGDIR` > > fi > > ... > > # Initialize the database > > $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --xlogdir= > $INITDBXLOGSTRING --auth='ident' $LOCALESTRING" >> "$PGLOG" 2>&1 > < /dev/null > > Seems that if INITDBXLOGDIR is not given, it should just leave out > --xlogdir. Devrim? :( Good catch. Will fix. Regards, -- Devrim GÜNDÜZ Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Hi again, On Tue, 2013-05-14 at 13:48 +0000, bnicholson@hp.com wrote: > I've installed the 9.3 beta 1 packages (via pgdg repo and yum) and when I > try to do an initdb it fails. /var/lib/pgsql/9.3/data has nothing in it when > I attempt the initdb : > > #service postgresql-9.3 initdb > Initializing database:[FAILED] <snip> Fixed this issue with 9.3beta1-4 RPMS. Thanks for the report (and thanks Heikki for finding the real issue) Regards, -- Devrim GÜNDÜZ Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz