Thread: Re: postgresql problem

Re: postgresql problem

From
Jason Tishler
Date:
Jane,

On Mon, Mar 05, 2001 at 05:05:47PM +1300, Jane G wrote:
>    I was following the directions by Kevin for Porting PostgreSQL to
>    Windows 2000
>    http://people.freebsd.org/~kevlo/postgres/portNT.html ) .
>
>    When I got to step 7, and tried to run './configure',  I get the
>    error.
>
>    $ configure
>    loading cache ./config.cache
>    checking host system type... i686-pc-cygwin
>    checking echo setting...
>    checking setting template to... cygwin32
>    configure: warning: *** Include directory /usr/local/include does not exist.

Did you install cygipc 1.09?

>    checking whether to support locale... disabled
>    checking whether to support cyrillic recode... disabled
>    checking whether to support multibyte... disabled
>    checking setting DEF_PGPORT... 5432
>    checking setting DEF_MAXBACKENDS... 32
>    checking setting USE_TCL... disabled
>    checking setting USE_PERL... disabled
>    checking setting USE_ODBC... disabled
>    checking setproctitle... disabled
>    checking setting ASSERT CHECKING... disabled
>    checking for gcc... gcc
>    checking whether the C compiler (gcc -O2 ) works... no
>    configure: error: installation or configuration problem: C compiler
>    cannot create executables.

Did you install gcc and/or binutils?  Check out the end of config.log,
it will help you debug the problem.

I strongly recommend installing *all* of the Cygwin packages unless you
are very experienced with Cygwin.

BTW, please post to pgsql-ports@postgresql.org instead of emailing me
directly so others can benefit too.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: postgresql problem

From
Jason Tishler
Date:
Jane,

On Tue, Mar 06, 2001 at 10:27:57AM +1300, Jane G wrote:
> But when i got to step 14 and run 'postmaster -i &',  i have another new
> problem.  It shows:
> "C:\cygwin\usr\local\pgsql\bin\postgres.exe: ***
> recreate_mmaps_after_fork_failed
> Startup failed  -  abort"
> Could anyone give me any idea?

The above is a known problem that has already been fixed.  See the
following for details:

    http://www.postgresql.org/mhonarc/pgsql-ports/2001-02/msg00012.html
    http://www.postgresql.org/mhonarc/pgsql-ports/2001-02/msg00014.html

A third alternative to solve this problem is to use Cygwin 1.1.8-2 with
cygwin1.dll replaced by one from a recent Cygwin snapshot.  In retrospect,
this is probably the best solution until Cygwin 1.3.0 is released.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: postgresql problem

From
Jason Tishler
Date:
Jane,

On Tue, Mar 06, 2001 at 01:19:38PM +1300, Jane G wrote:
> Sorry i have to bother you again.  I followed your advise to use Cygwin
> 1.1.8-2  with cygwin1.dll(written in 20010216) from the snapshot list. Then
> i can start my postmaster.  But when i tried to run 'psql -h localhost
> template1',  it stucked.  The error message is:
> "psql: connectDBStart() -- connect() failed: No such file
>     Is the postmaster running at 'localhost'
>     and accepting connections on Unix socket '5432'?"
> I checked my socket number and it was 5432.
> Could you give me another advise?

Kevin's howto is a "little" dated.  You no longer need to use TCP/IP
sockets to connect to postmaster under Cygwin, you can now use the
default Unix domain sockets (as on other Unix platforms).  Hence,
the solution to the problem above is to start psql *without* the "-h
localhost" option.  Otherwise, you need to start postmaster with the
"-i" option which instructs it to listen on TCP/IP sockets too.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Re: postgresql problem

From
Jason Tishler
Date:
Jane,

On Mon, Mar 05, 2001 at 07:34:41PM -0500, Jason Tishler wrote:
> On Tue, Mar 06, 2001 at 01:19:38PM +1300, Jane G wrote:
> > Sorry i have to bother you again.  I followed your advise to use Cygwin
> > 1.1.8-2  with cygwin1.dll(written in 20010216) from the snapshot list. Then
> > i can start my postmaster.  But when i tried to run 'psql -h localhost
> > template1',  it stucked.  The error message is:
> > "psql: connectDBStart() -- connect() failed: No such file
> >     Is the postmaster running at 'localhost'
> >     and accepting connections on Unix socket '5432'?"
> > I checked my socket number and it was 5432.
> > Could you give me another advise?
>
> Kevin's howto is a "little" dated.  You no longer need to use TCP/IP
> sockets to connect to postmaster under Cygwin, you can now use the
> default Unix domain sockets (as on other Unix platforms).  Hence,
> the solution to the problem above is to start psql *without* the "-h
> localhost" option.  Otherwise, you need to start postmaster with the
> "-i" option which instructs it to listen on TCP/IP sockets too.

What version of PostgreSQL are you using?  The above assumes that you
are using a recent version such as 7.1beta5.  If you are using 7.0.3
with my patches, then you must start postmaster with the "-i" option
under Cygwin.

Sorry for the misinformation.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Re: postgresql problem

From
Jason Tishler
Date:
Jane,

On Tue, Mar 06, 2001 at 03:54:37PM +1300, Jane G wrote:
> Thanks for your reply. I am struggling to fix the connect() fail problem.
> But i have no any progress now.  I am using PostgreSQL 7.0.3 version,
> cygipc1.0.9-2 and cygwin-1.1.18-2 with
> cygwin1.dll(written in 20010216) from the snapshot list.  When i run
> 'postmaster' without option '-i',  the system can't find the program running
> on port 5432.  Now i run 'postmaster -i',
> and 'psql' without option,  the connect() failed again.

With PostgreSQL 7.0.3 under Cygwin, you have no choice but to run with
"postmaster -i" and "psql -h host" (where host could be localhost, etc.).

> I guess i have to try the PostgreSQL 7.1beta5 version.

You don't have to, but I would strongly recommend it since it builds
OOTB (i.e., no patches are necessary) under Cygwin and for many other
compelling reasons too.

> Could you tell me the web address to download it?

You can find it at:

    ftp://ftp.postgresql.org/pub/dev/postgresql-7.1beta5.tar.gz

or another PostgreSQL mirror.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Re: postgresql problem

From
Jason Tishler
Date:
Jane,

On Tue, Mar 06, 2001 at 06:10:04PM +1300, Jane G wrote:
> hi Jason,
> I am still using the PostgreSQL 7.0.3 with your patch. And I can connect to
> the database now. :0))

I'm glad that Cygwin PostgreSQL 7.0.3 is working for you now.  I would
still recommend that you use 7.1beta5 or later because there are issues
with 7.0.3 that have been solved in 7.1.  For example, multiple
concurrent connections will cause postmaster to abort.  See the
following for details:

    http://www.postgresql.org/mhonarc/pgsql-ports/2000-12/msg00046.html
    http://www.postgresql.org/mhonarc/pgsql-ports/2000-12/msg00048.html

> Thanks a lot for your help,

Your welcome.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: postgresql problem

From
"Jane G"
Date:
hi Jason,
I don't know why cygipc1.09 fixed the make problem.  But this time i install
the cygipc 1.0.9 in the /usr/local  instead of under /home/usr/local. But
when i got to step 14 and run 'postmaster -i &',  i have another new
problem.  It shows:
"C:\cygwin\usr\local\pgsql\bin\postgres.exe: ***
recreate_mmaps_after_fork_failed
Startup failed  -  abort"
Could anyone give me any idea?

Thanks a lot,
jane


----- Original Message -----
From: "Jason Tishler" <Jason.Tishler@dothill.com>
To: "Jane G" <jane.gu@jungledrum.co.nz>
Sent: Tuesday, March 06, 2001 10:21 AM
Subject: Re: postgresql problem


> Jane,
>
> On Tue, Mar 06, 2001 at 09:16:31AM +1300, Jane G wrote:
> > Thanks for your advise. I download the version cygipc1.09 and the make
fail
> > problem is gone. :0))
>
> I'm glad that the above "solved" your problem.
>
> > > On Mon, Mar 05, 2001 at 05:05:47PM +1300, Jane G wrote:
> > > >    checking for gcc... gcc
> > > >    checking whether the C compiler (gcc -O2 ) works... no
> > > >    configure: error: installation or configuration problem: C
compiler
> > > >    cannot create executables.
>
> However, I don't see how installing cygipc 1.09 would solve the above
> problem.
>
> Jason
>
> --
> Jason Tishler
> Director, Software Engineering       Phone: +1 (732) 264-8770 x235
> Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
> 82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
> Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com
>



Re: 7.1beta5 install problem

From
Jason Tishler
Date:
Jane,

On Wed, Mar 07, 2001 at 11:22:19AM +1300, Jane G wrote:
> I have some problem to use version 7.1beta5.  When i got to step 5 'cp
> endian.h /usr/include' in Kevin's list,  I can't find the file 'endian.h'.
> Do i still need the file 'endian.h'?

IIRC, step 5 is no longer needed for 7.1beta5.  Remember that Kevin's howto
is for 7.0.3 not 7.1.  Hence, it is a tad out of date at this point.

> The initdb is not completed, it show:
> "initdb: The directory /usr/local/pgsql/data exists but is not empty.
> If you want to create a new database system, either remove or empty
> the directory /usr/local/pgsql/data or run initdb with
> an argument other than /usr/local/pgsql/data."
> Then postmaster failed with error: postmaster does not find the database
> system.
> Did i miss some steps?

Your /usr/local/pgsql/data is left over from your 7.0.3 installation.
What I did was just rename data to data-7.0.3:

    mv /usr/local/pgsql/data /usr/local/pgsql/data-7.0.3

After completing the above, retry the initdb -- it should work this time.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: new beep problem

From
Jason Tishler
Date:
Jane,

On Wed, Mar 07, 2001 at 06:12:04PM +1300, Jane G wrote:
> Sorry i have another problem here.  Could you tell me what the command is to
> stop the postmaster and ipc-daemon safely and fastly.  Whenever i try to
> stop it,  i type 'exit or logout',
> the postmaster is stuck.  So i have to kill the process.  Any better way to
> stop the database server  and ipc-daemon?

Yes.  Use "pg_ctl stop" to shutdown PostgreSQL and use "net stop
ipc-daemon" to stop ipc-daemon (assuming that you installed it as an NT
service).

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: 7.1beta5 install problem

From
Jason Tishler
Date:
Jane,

On Fri, Mar 09, 2001 at 12:33:15PM +1300, Jane G wrote:
> I have some problem to install the version 7.1beta5.  When i got to step
> 'initdb',  it shows messages: ">This database system will be initialized
> with username "administrator".
> >This user will own all the data files and must also own the server process.
> >Fixing permissions on existing directory /usr/local/pgsql/data
> >Creating directory /usr/local/pgsql/data/base
> >Creating directory /usr/local/pgsql/data/global
> >Creating directory /usr/local/pgsql/data/pg_xlog
> >Creating template1 database in /usr/local/pgsql/data/base/1"
> Then, it crashed there.   I have removed all the version7.0.3 stuff.  And  I
> use the cygipc-1.09-2 and the cygwin1.dll(040301) from snapshot list.  Any
> ideas?

I just tried it myself and it works.  The only difference that I can see
between your setup and mine is:

    1. I'm logging in as jt not administrator (but actually jt is in the
       administrators group)
    2. I'm using a cygwin1.dll that I built myself from Cygwin on Feb 13
       09:39 2001.

The only idea that I have is try the list.  BTW, when initdb crashes, is
their any output?

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: 7.1beta5 problem

From
Jason Tishler
Date:
Jane,

On Fri, Mar 09, 2001 at 12:39:33PM +1300, Jane G wrote:
> I also tried to use the the cygwin1.dll packed in the version,  but it still
> crashed when i run 'initdb'.

What do you mean by "cygwin1.dll packed in the version?"

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: new beep problem

From
"Jane G"
Date:
hi all,
Does anyone have the same beep problem as me?

jane


----- Original Message -----
From: "Jason Tishler" <Jason.Tishler@dothill.com>
To: "Jane G" <jane.gu@jungledrum.co.nz>
Sent: Wednesday, March 07, 2001 3:57 PM
Subject: Re: new beep problem


> Jane,
>
> On Wed, Mar 07, 2001 at 10:18:50AM +1300, Jane G wrote:
> > Now i am happy to use postgresql program. But another annoying problem
is
> > the loud beep from the cygwin unix interface.  Especially when i run
'psql
> > dbname < inputfile'  to import the tables in access database, the beep
sound
> > is out of control. :0((    Any idea to get rid of the noise?
>
> Instead of the normal bash window, I use a Cygwin rxvt port that does
> *not* require an X-server.  Besides never getting any beeps, IMO it is
> *much* better than using bash or cmd.  You can find a pre-built rxvt at:
>
>     http://www.io.com/~bub/rxvt.html
>
> BTW, you may want to post this problem to the pgsql-ports@postgresql.org
> list.  I would be curious if others are experiencing this problem and if
> so, what is their solution.
>
> Jason
>
> --
> Jason Tishler
> Director, Software Engineering       Phone: +1 (732) 264-8770 x235
> Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
> 82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
> Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com
>
>