Re: rename() vs. link(); building from source - Mailing list pgsql-cygwin

From Barry Pederson
Subject Re: rename() vs. link(); building from source
Date
Msg-id 3CDE8C27.6080303@barryp.org
Whole thread Raw
In response to rename() vs. link(); building from source  ("David P. Caldwell" <inonit@inonit.com>)
Responses Re: rename() vs. link(); building from source
List pgsql-cygwin
Jason Tishler wrote:
> Barry,
>
> Did you use the (exact) patch at the end of:
>
>     http://archives.postgresql.org/pgsql-cygwin/2002-04/msg00057.php
>
> If so, then please confirm this fact and I will submit this patch to
> pgsql-patches for consideration.  If not, then please try again with
> this (exact) patch.  If you are still successful, then I will submit it.


I've been using my own equivalent patch, but in the interest of getting this
thing hopefully fixed, I've used your patch and it still works.

Below is a blow-by-blow account of exactly what I did to test this:

===================================================
Edited CYGWIN-PATCHES/build.sh to remove

    --with-python --with-perl --with-java

from the configure args.

-------------------
Ran the commands:

  cd /usr/src/postgresql-7.2.1-1
  CYGWIN-PATCHES/build.sh 7.2.1 1

which created a file named: postgresql-7.2.1-1.tar.bz2
in the current directory

  bzip2 -d postgresql-7.2.1-1.tar.bz2
  cd /
  tar xvf /usr/src/postgresql-7.2.1-1/postgresql-7.2.1-1.tar

decompressed and installed what I had built

  initdb -D /d/pgtest
  postmaster -D /d/pgtest

Created a new database cluster, and started the server using that
cluster.  Then in another window with a dump of a roughly 100mb large object:

   createdb test
   pg_restore -d test -v -Ft biglo.pgdump.tar
   dropdb test
   createdb test
   pg_restore -d test -v -Ft biglo.pgdump.tar

and the backend stopped, complaining about Permission denied on link.
(maybe if my dump of a large object was bigger, I wouldn't have to do it
twice to cause the crash).

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

So, having confirmed that my stock build would crash, applied Jason's
*exact* patch from

    http://archives.postgresql.org/pgsql-cygwin/2002-04/msg00057.php

removed the old postgresql-7.2.1-1.tar file from the original build and the
old database cluster

re-ran the exact same commands from above, starting with:

    cd /usr/src/postgresql-7.2.1-1
    CYGWIN-PATCHES/build.sh 7.2.1 1

uncompressed, untarred, initialized a new cluster, started the server
created a db, restored the same dump, dropped the db.

Repeat the create/restore/drop sequence 6 times, no crash :)

===============================

    Barry


pgsql-cygwin by date:

Previous
From: Barry Pederson
Date:
Subject: Re: plpgsql.dll path
Next
From: Jason Tishler
Date:
Subject: Re: plpgsql.dll path