Thread: Updated Cygwin Package: postgresql-7.4.2-1

Updated Cygwin Package: postgresql-7.4.2-1

From
Jason Tishler
Date:
New News:
=== ====
I have updated the version of PostgreSQL to 7.4.2-1.  The tarballs should
be available on a Cygwin mirror near you shortly.

The following are notable changes since the previous release:

    o build against cygserver instead of cygipc
    o upgrade to PostgreSQL 7.4.2

Old News:
=== ====
PostgreSQL is an open-source, Object-Relational DBMS.  If interested,
see the PostgreSQL web site for more details:

    http://www.postgresql.org/

Please read the README file:

    /usr/share/doc/Cygwin/postgresql-7.4.2.README

since it covers requirements, installation, known issues, etc.

To update your installation, click on the "Install Cygwin now" link on
the http://cygwin.com/ web page.  This downloads setup.exe to your
system.  Then, run setup and answer all of the questions.

Note that we have recently stopped downloads from sources.redhat.com
(aka cygwin.com) due to bandwidth limitations.  This means that you will
need to find a mirror which has this update.

In the US,
ftp://mirrors.rcn.net/mirrors/sources.redhat.com/cygwin/
is a reliable high bandwidth connection.

In Germany,
ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/
is usually pretty good.

In the UK,
http://programming.ccp14.ac.uk/ftp-mirror/programming/cygwin/pub/cygwin/
is usually up-to-date within 48 hours.

If one of the above doesn't have the latest version of this package
then you can either wait for the site to be updated or find another
mirror.

The setup.exe program will figure out what needs to be updated on your
system and will install newer packages automatically.

If you have questions or comments, please send them to the Cygwin
mailing list at: cygwin@cygwin.com .  I would appreciate if you would
use this mailing list rather than emailing me directly.  This includes
ideas and comments about the setup utility or Cygwin in general.

If you want to make a point or ask a question, the Cygwin mailing list
is the appropriate place.

              *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain.com@cygwin.com

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: Updated Cygwin Package: postgresql-7.4.2-1

From
"David P. Lurie"
Date:
"Jason Tishler" <jason@tishler.net> wrote in message
news:20040611151956.GA1960@tishler.net...
> New News:
> === ====
> I have updated the version of PostgreSQL to 7.4.2-1.  The tarballs should
> be available on a Cygwin mirror near you shortly.
>
> The following are notable changes since the previous release:
>
>     o build against cygserver instead of cygipc
>     o upgrade to PostgreSQL 7.4.2
>

I was able to get both cygserver and postmaster to install as services under
XP Pro, but only cygserver will successfully run as a service.

postmaster fails to run as a service, either from the command line or the
control panel services applet. C:\cygwin\bin is in the system path.

Here is the error when run from a bash shell prompt:

$ cygrunsrv -S postmaster
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

The Windows event viewer lists the following errors:

postmaster : PID 3388 : starting service `r' failed: redirect_fd: open (1,
/var/log/postmaster.log): 13, Permission denied.



postmaster : PID 2716 : starting service `postmaster' failed: execv: 1,
Operation not permitted.




postmaster seems to load normally from a command line with pg_ctl.

I tried installing it as a service to be run by the postgres user (with
privileges to run as a service) per the README, and then by my logon when
that failed.

Thanks,

David P. Lurie



Re: Updated Cygwin Package: postgresql-7.4.2-1

From
Jason Tishler
Date:
David,

On Sat, Jun 12, 2004 at 10:57:25PM -0400, David P. Lurie wrote:
> I was able to get both cygserver and postmaster to install as services
> under XP Pro, but only cygserver will successfully run as a service.
>
> postmaster fails to run as a service, either from the command line or
> the control panel services applet. C:\cygwin\bin is in the system
> path.
>
> [snip]
>
> postmaster : PID 3388 : starting service `r' failed: redirect_fd: open
> (1, /var/log/postmaster.log): 13, Permission denied.

Does the following from the README help?

    3. Cygwin PostgreSQL can fail to start or not function properly if
    certain files and directories have incorrect permissions.  The
    following usually solves these kinds of problems:

        $ chmod a+rwx /tmp
        $ chmod a+rx /usr/bin /usr/bin/*
        $ chmod a+rw /var/log # could adversely affect other daemons

In particular, note the third chmod above.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: Updated Cygwin Package: postgresql-7.4.2-1

From
"David P. Lurie"
Date:
Jason -

>     3. Cygwin PostgreSQL can fail to start or not function properly if
>     certain files and directories have incorrect permissions.  The
>     following usually solves these kinds of problems:
>
>         $ chmod a+rwx /tmp
>         $ chmod a+rx /usr/bin /usr/bin/*
>         $ chmod a+rw /var/log # could adversely affect other daemons
>
> In particular, note the third chmod above.
>

I tried all three, without any success.

There was another problem with postgresql configuration that I hadn't
mentioned. initdb failed when run as the user "postgres", but completed
successfully under my usual login.

These permission changes now allow initdb to run from the "postgres"
account. postmaster still successfully installs as a service, but fails to
run, whether installed to run under my usual login or "postgres" (after
initdb has been run under the appropriate account).

David



Re: Updated Cygwin Package: postgresql-7.4.2-1

From
"David P. Lurie"
Date:
I tried again, changing the logon account for postmaster from within the
windows Services snap-in, and can now get postmaster to load as a service
using my normal logon account.

However, reconfiguring to run from the postgres account from the Services
snap-in still fails with the same error. The postgres account does have
"logon as a service" enabled under local security policy, per the README.

David P. Lurie




Re: Updated Cygwin Package: postgresql-7.4.2-1

From
Jason Tishler
Date:
David,

On Mon, Jun 14, 2004 at 05:38:49PM -0400, David P. Lurie wrote:
> However, reconfiguring to run from the postgres account from the Services
> snap-in still fails with the same error.

Is it still failing on the following:

> postmaster : PID 3388 : starting service `r' failed: redirect_fd: open
> (1, /var/log/postmaster.log): 13, Permission denied.

If so, what does the following indicate?

$ ls -ld /var/log /var/log/postmaster.log
drwxrwxrwt+   4 jt       None         4096 Jun 13 11:39 /var/log
-rw-r--r--    1 postgres None       644805 Jun 13 11:40 /var/log/postmaster.log

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: Updated Cygwin Package: postgresql-7.4.2-1

From
"David P. Lurie"
Date:
Jason -

"Jason Tishler" <jason@tishler.net> wrote > Is it still failing on the
following:
>
> > postmaster : PID 3388 : starting service `r' failed: redirect_fd: open
> > (1, /var/log/postmaster.log): 13, Permission denied.
>
> If so, what does the following indicate?
>
> $ ls -ld /var/log /var/log/postmaster.log
> drwxrwxrwt+   4 jt       None         4096 Jun 13 11:39 /var/log
> -rw-r--r--    1 postgres None       644805 Jun 13 11:40
/var/log/postmaster.log
>
$ ls -ls
total 1371
   0 -rw-r--r--    1 SYSTEM   root            0 Jun 14 13:58 cygserver.log
   4 -rw-r--r--    1 David P. None         3865 Jun 15 11:41 postmaster.log
  30 -rwxr-x---+   1 David P. Users       30043 Jun 13 18:07 setup.log
1337 -rwxr-x---+   1 David P. Users     1368129 Jun 13 18:07 setup.log.full

I think that the leftover postmaster.log from when I set up postgresql from
my normal logon caused the problem via permissions.

I moved that log to a different name, retried starting the postmaster
service (as user postgres), with success.

Thanks a lot for your assistance.

David



Re: Updated Cygwin Package: postgresql-7.4.2-1

From
Jason Tishler
Date:
David,

On Tue, Jun 15, 2004 at 03:45:26PM -0400, David P. Lurie wrote:
> $ ls -ls
> total 1371
>    0 -rw-r--r--    1 SYSTEM   root            0 Jun 14 13:58 cygserver.log
>    4 -rw-r--r--    1 David P. None         3865 Jun 15 11:41 postmaster.log
>   30 -rwxr-x---+   1 David P. Users       30043 Jun 13 18:07 setup.log
> 1337 -rwxr-x---+   1 David P. Users     1368129 Jun 13 18:07 setup.log.full
>
> I think that the leftover postmaster.log from when I set up postgresql
> from my normal logon caused the problem via permissions.

Bingo!

> I moved that log to a different name, retried starting the postmaster
> service (as user postgres), with success.

I'm glad you are up and running.

> Thanks a lot for your assistance.

You are quite welcome.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6