Skip site navigation (1) Skip section navigation (2)

Re: Data directory with trailing [back]slash

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>,PgSql-Win32 <pgsql-hackers-win32(at)postgresql(dot)org>,"Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Data directory with trailing [back]slash
Date: 2004-07-11 13:31:29
Message-ID: 200407111331.i6BDVTW26655@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers-win32pgsql-patches
I think this still is not fixed.  I think we need to add a call to
trim_trailing_separator() in checkDataDir().  Magnus, can you confirm
this will fix it?

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

Bruce Momjian wrote:
> 
> I am now confused about the original report.  I don't see how my fix
> would correct the reported problem.  trim_trailing_separator() would
> have handled d:\pgdata\ and d:\pgdata just fine.  The fix only corrects
> d:\.
> 
> Magnus, does current CVS fix the problem?
> 
> ---------------------------------------------------------------------------
> 
> Andrew Dunstan wrote:
> > 
> > 
> > Tom Lane wrote:
> > 
> > >"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> > >  
> > >
> > >>It's not possible to start the postmaster on win32 with:
> > >>postmaster -D d:\pgdata\
> > >>or
> > >>postmaster -D d:/pgdata/
> > >>    
> > >>
> > >
> > >Sounds like canonicalize_path() needs to be applied a bit sooner than
> > >it is.
> > >
> > >BTW I think canonicalize_path() is a few bricks shy of a load yet:
> > >I'm not sure it works well with Windows drive-letters, and it definitely
> > >will strip significant slashes when given input like '/' or 'C:\'.
> > >Feel free to fix those problems while at it...
> > >  
> > >
> > 
> > Or use the attached patch, which I think does it right.
> > 
> > cheers
> > 
> > andrew
> 
> 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 9: the planner will ignore your desire to choose an index scan if your
> >       joining column's datatypes do not match
> 
> -- 
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman(at)candle(dot)pha(dot)pa(dot)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 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> 

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

In response to

Responses

pgsql-patches by date

Next:From: Ralph CountsDate: 2004-07-11 16:16:26
Subject:
Previous:From: Bruce MomjianDate: 2004-07-11 13:25:20
Subject: Re: Data directory with trailing [back]slash

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2004-07-11 21:33:03
Subject: Re: Data directory with trailing [back]slash
Previous:From: Bruce MomjianDate: 2004-07-11 13:25:20
Subject: Re: Data directory with trailing [back]slash

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group