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

Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore

From: Reini Urban <rurban(at)x-ray(dot)at>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore
Date: 2004-10-07 12:48:33
Message-ID: 41653B21.2080302@x-ray.at (view raw or flat)
Thread:
Lists: pgsql-cygwinpgsql-hackerspgsql-hackers-win32
Reini Urban schrieb:
> Tom Lane schrieb:
>> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>>
>>> I am confused.  CVS has in port.h:
>>> so you should already be calling the junction code on Cygwin.
> 
> true. didn't thought of that. very strange.
> 
>> Yeah, I'm sure he is, but it looks from the regression results like it
>> doesn't quite work on Cygwin.  Is that fixable?  
> 
> I'll step that in the debugger.

not yet done.

>> If so, we'd have a choice of whether to rely on junctions or on
>> Cygwin's own emulation of symlinks. I'd be inclined to think the
>> former is a better idea,
>> if only because it'd give you some chance of migrating a data
>> directory between Cygwin and native ports.
> 
> Cygwin can do symlinks for directories via the magic .lnk file.
> But Cygwin can also do junctions via hardlinks in ln.exe.
> I thought link() calls the junction code.
> I'll investigate why the libc link() failed, and if ln.exe does some 
> sifferent magic, similar to pgsymlink.

For the records:

Using cygwin native slow symlinks - see attached patch - works fine.
Quite an overhead via the magic .lnk file.
tablespace tests pass.

Should I investigate what users want?

1. speed:
   * junctions, can only be manipulated via junction.exe
    (sysinternals.com e.g.)
   * only w2k and above,
2. or compatibility:
   * .lnk, can be manipulated with ln.exe
   * all windows version. even win95 when we fix
     our outstanding cygserver issues with cygserver

-----------------
But another problem arose. Doesn't look like a sideeffect caused by my 
symlink switch. I switched to latest CVS in between.

parallel_schedule always fails after finishing create_misc, independent 
of the order. If it's the first 2nd, 3rd, ...
so it's not create_aggregate or any other test there.

This is the tail of postmaster.log:
ERROR:  aggregate nosuchagg(*) does not exist
ERROR:  operator does not exist: integer ######
ERROR:  syntax error at or near ")" at character 45
ERROR:  syntax error at or near "IN" at character 43
ERROR:  new row for relation "check_tbl" violates check constraint 
"check_con"
ERROR:  new row for relation "check_tbl" violates check constraint 
"check_con"
ERROR:  new row for relation "check_tbl" violates check constraint 
"check_con"
ERROR:  new row for relation "check2_tbl" violates check constraint 
"sequence_con"
ERROR:  new row for relation "check2_tbl" violates check constraint 
"sequence_con"
ERROR:  new row for relation "check2_tbl" violates check constraint 
"sequence_con"
ERROR:  new row for relation "check2_tbl" violates check constraint 
"sequence_con"
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Attachment: cygsymlinks.patch
Description: text/plain (353 bytes)

In response to

Responses

pgsql-cygwin by date

Next:From: Bruce MomjianDate: 2004-10-07 19:31:21
Subject: Re: open item: tablespace handing in
Previous:From: Reini UrbanDate: 2004-10-07 00:12:31
Subject: Re: initdb and postgresql 8

pgsql-hackers by date

Next:From: Gavin SherryDate: 2004-10-07 14:07:12
Subject: Re: SQL-Invoked Procedures for 8.1
Previous:From: Marco ColomboDate: 2004-10-07 11:53:17
Subject: Re: database constraints

pgsql-hackers-win32 by date

Next:From: Magnus HaganderDate: 2004-10-07 14:03:38
Subject: Re: postgres win32 in FAT32
Previous:From: Albi RebmannDate: 2004-10-07 08:36:54
Subject: postgres win32 in FAT32

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