Re: [HACKERS] Cannot initdb in cvs tip

2004-07-28 Thread Bruce Momjian
Andrew Dunstan wrote: > >I wanted to keep a solution that was as native to the OS as possible, > >but because we can't do that on Win32 and few people like the unix > >system call to 'rm', it is time to clean it up. > > > >One question --- why is there a sleep loop needed for unlink in your > >patc

Re: [HACKERS] Cannot initdb in cvs tip

2004-07-28 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > The small wrinkle here is that rmtree needs to make a copy of the file > names before it starts removing things. In the backend case that means > calling palloc() and friends - am I correct in assuming it is reasonable > to do this in whatever context

Re: [HACKERS] Cannot initdb in cvs tip

2004-07-28 Thread Andrew Dunstan
Bruce Momjian wrote: Dave, now that we are nearing beta, I think we need to correct the initdb problem with removing the directory on Win32. Would you code this up as something that sits in /port/dirmod.c and have both initdb and DROP DATABASE call the C routine rather than call rm -r/rmdir? (I

Re: [HACKERS] Cannot initdb in cvs tip

2004-07-28 Thread Andrew Dunstan
Dave Page wrote: -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: 28 July 2004 09:29 To: Dave Page Cc: Tom Lane; PostgreSQL-development; [EMAIL PROTECTED] Subject: Re: [HACKERS] Cannot initdb in cvs tip Dave, now that we are nearing beta, I think we need to

Re: [HACKERS] Cannot initdb in cvs tip

2004-07-28 Thread Dave Page
> -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED] > Sent: 28 July 2004 09:29 > To: Dave Page > Cc: Tom Lane; PostgreSQL-development; [EMAIL PROTECTED] > Subject: Re: [HACKERS] Cannot initdb in cvs tip > > > Dave, now that we are neari

Re: [HACKERS] Cannot initdb in cvs tip

2004-07-28 Thread Bruce Momjian
k in your patch? --- Dave Page wrote: > > > > -Original Message- > > From: Tom Lane [mailto:[EMAIL PROTECTED] > > Sent: 19 June 2004 00:22 > > To: Dave Page > > Cc: PostgreSQL-developm

Re: [HACKERS] Cannot initdb in cvs tip

2004-07-20 Thread Bruce Momjian
Seems it might be time to address this and get it fixed. Win32 doesn't clean up the directory structure under /data and leave /data unchanged, and there is no way to do this with a system() command on Win32. I resisted adding a C version of rmtree during Win32 development because I was concerned

Re: [HACKERS] Cannot initdb in cvs tip

2004-06-20 Thread Dave Page
-Original Message- From: John Hansen [mailto:[EMAIL PROTECTED] Sent: Sun 6/20/2004 2:27 AM To: Dave Page Cc: Tom Lane; PostgreSQL-development; [EMAIL PROTECTED] Subject: Re: [HACKERS] Cannot initdb in cvs tip > you could of course rmdir /s /q $PGDATA && mkdir $PGDATA if

Re: [HACKERS] Cannot initdb in cvs tip

2004-06-20 Thread Andrew Dunstan
John Hansen said: > On Sun, 2004-06-20 at 08:04, Dave Page wrote: >> > > although it says it's clearing the contents of the directory, in >> > > actual fact it leaves the directory structure in place, thus a >> > > subsequent initdb will not run without a manual clearup. >> > >> > Hm. The rmtree()

Re: [HACKERS] Cannot initdb in cvs tip

2004-06-19 Thread John Hansen
On Sun, 2004-06-20 at 08:04, Dave Page wrote: > > > -Original Message- > > From: Tom Lane [mailto:[EMAIL PROTECTED] > > Sent: 19 June 2004 00:22 > > To: Dave Page > > Cc: PostgreSQL-development > > Subject: Re: [HACKERS] Cannot initdb in cvs tip

Re: [HACKERS] Cannot initdb in cvs tip

2004-06-19 Thread Dave Page
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 19 June 2004 00:22 > To: Dave Page > Cc: PostgreSQL-development > Subject: Re: [HACKERS] Cannot initdb in cvs tip > > "Dave Page" <[EMAIL PROTECTED]> writes: > >

Re: [HACKERS] Cannot initdb in cvs tip

2004-06-19 Thread Dave Page
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: Sat 6/19/2004 12:21 AM > To: Dave Page > Cc: PostgreSQL-development > Subject: Re: [HACKERS] Cannot initdb in cvs tip > The target block number is obviously broken :-(. But maybe you have

Re: [HACKERS] Cannot initdb in cvs tip

2004-06-18 Thread Andrew Dunstan
Tom Lane said: > "Dave Page" <[EMAIL PROTECTED]> writes: >> I'm getting the following error when trying to initdb with CVS tip. > >> creating template1 database in C:/msys/1.0/local/pgsql/data/base/1 ... >> ERROR: could not open segment 1 of relation 1663/1/1255 (target block >> 26189776): No such

Re: [HACKERS] Cannot initdb in cvs tip

2004-06-18 Thread Tom Lane
"Dave Page" <[EMAIL PROTECTED]> writes: > I'm getting the following error when trying to initdb with CVS tip. > creating template1 database in C:/msys/1.0/local/pgsql/data/base/1 ... > ERROR: could not open segment 1 of relation 1663/1/1255 (target block > 26189776): No such file or directory Th

[HACKERS] Cannot initdb in cvs tip

2004-06-18 Thread Dave Page
I'm getting the following error when trying to initdb with CVS tip. This is on win XP, though I don't know if it's win32 specific. Also of note, although it says it's clearing the contents of the directory, in actual fact it leaves the directory structure in place, thus a subsequent initdb will not