dbTalk Databases Forums  

Re: [BUGS] 8.0: Absolute path required for INITDB?

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] 8.0: Absolute path required for INITDB? in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-08-2004 , 11:19 PM






Josh Berkus <josh (AT) agliodbs (DOT) com> writes:
Quote:
If a relative path is used for the -L option in initdb, the following fatal
error happens:
7.4 fails in the same way, and probably every prior release too.
The problem is that the backend has done a chdir into the template1
subdirectory, so paths that are relative from your perspective
no longer apply.

It might be worth absolut-izing this path in initdb before it's
passed down, but I can't get exceedingly excited about it.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #2  
Old   
Josh Berkus
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-09-2004 , 11:57 AM






Tom,

Quote:
It might be worth absolut-izing this path in initdb before it's
passed down, but I can't get exceedingly excited about it.
Well, once again let me check the docs to make sure people are warned about
this ....

--
Josh Berkus
Aglio Database Solutions
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #3  
Old   
Josh Berkus
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-09-2004 , 12:08 PM



Tom,

Quote:
Why would it matter? I don't think I've ever once had occasion to use
the -L switch in initdb, because it figures it out just fine for itself.
People who are using it should be wizardly enough to know about the
chdir.
Oh. Then I have a different bug to report, because INITDB for Sunday's CVS
would not run without the -L option.

--
Josh Berkus
Aglio Database Solutions
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #4  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-09-2004 , 12:12 PM



Josh Berkus <josh (AT) agliodbs (DOT) com> writes:
Quote:
It might be worth absolut-izing this path in initdb before it's
passed down, but I can't get exceedingly excited about it.

Well, once again let me check the docs to make sure people are warned about
this ....
Why would it matter? I don't think I've ever once had occasion to use
the -L switch in initdb, because it figures it out just fine for itself.
People who are using it should be wizardly enough to know about the
chdir.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #5  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-09-2004 , 12:15 PM



Josh Berkus <josh (AT) agliodbs (DOT) com> writes:
Quote:
Oh. Then I have a different bug to report, because INITDB for Sunday's CVS
would not run without the -L option.
Well, that does deserve investigation. But I've been initdb'ing
frequently and not noticed any problems. What configure switches
did you use exactly? Did you try to move the installation tree
after configure?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #6  
Old   
Josh Berkus
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-09-2004 , 12:38 PM



Tom,

Quote:
Well, that does deserve investigation. But I've been initdb'ing
frequently and not noticed any problems. What configure switches
did you use exactly? Did you try to move the installation tree
after configure?
My only configure switch was --prefix=/usr/local/pg80b

I did not move the tree.

I will drop the data directory and re-run it so I can cut and paste the error
this afternoon.

--
Josh Berkus
Aglio Database Solutions
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #7  
Old   
Josh Berkus
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-09-2004 , 02:28 PM



Tom,

Quote:
Well, that does deserve investigation. But I've been initdb'ing
frequently and not noticed any problems. What configure switches
did you use exactly? Did you try to move the installation tree
after configure?
Here's the issue: if you start initdb from a directory other than PGBASE, you
can run into trouble:

postgres@mole:/usr/local/pg80b/bin> ./initdb -D ../data
initdb: file "/usr/local/pg80b/bin/share/postgresql/postgres.bki" does not
exist
This means you have a corrupted installation or identified
the wrong directory with the invocation option -L.
postgres@mole:/usr/local/pg80b/bin>

I don't recall having this issue with 7.4.

--
-Josh Berkus
Aglio Database Solutions
San Francisco


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #8  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-09-2004 , 03:31 PM



Josh Berkus <josh (AT) agliodbs (DOT) com> writes:
Quote:
Here's the issue: if you start initdb from a directory other than PGBASE, you
can run into trouble:

postgres@mole:/usr/local/pg80b/bin> ./initdb -D ../data
initdb: file "/usr/local/pg80b/bin/share/postgresql/postgres.bki" does not
exist
Actually, the problem seems to be specific to the use of "." or ".." in
the invocation path. I have applied a patch that seems to fix it for
me.

Quote:
I don't recall having this issue with 7.4.
All that path-hacking logic is new in 8.0, I believe. Before we were
using some shell utilities to do it for us.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #9  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-09-2004 , 03:47 PM




Why don't we just throw an error if it isn't an abolute path name,
rather than failing in a weird way?

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

Josh Berkus wrote:
Quote:
Tom,

Well, that does deserve investigation. But I've been initdb'ing
frequently and not noticed any problems. What configure switches
did you use exactly? Did you try to move the installation tree
after configure?

Here's the issue: if you start initdb from a directory other than PGBASE, you
can run into trouble:

postgres@mole:/usr/local/pg80b/bin> ./initdb -D ../data
initdb: file "/usr/local/pg80b/bin/share/postgresql/postgres.bki" does not
exist
This means you have a corrupted installation or identified
the wrong directory with the invocation option -L.
postgres@mole:/usr/local/pg80b/bin

I don't recall having this issue with 7.4.

--
-Josh Berkus
Aglio Database Solutions
San Francisco


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #10  
Old   
CoL
 
Posts: n/a

Default Re: [BUGS] 8.0: Absolute path required for INITDB? - 08-10-2004 , 03:34 PM



hi,

Josh Berkus wrote, On 8/9/2004 21:20:

Quote:
Tom,

Well, that does deserve investigation. But I've been initdb'ing
frequently and not noticed any problems. What configure switches
did you use exactly? Did you try to move the installation tree
after configure?

Here's the issue: if you start initdb from a directory other than PGBASE, you
can run into trouble:

postgres@mole:/usr/local/pg80b/bin> ./initdb -D ../data
initdb: file "/usr/local/pg80b/bin/share/postgresql/postgres.bki" does not
exist
This means you have a corrupted installation or identified
the wrong directory with the invocation option -L.
postgres@mole:/usr/local/pg80b/bin
same problem here, but I did a trick, changed the $libdir in
share/conversion_create.sql to full path to lib dir, and I did a symlink
in bin to share.

C.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.