pgsql: Blind attempt at a Cygwin fix

Started by Alvaro Herreraover 10 years ago8 messageshackers
Jump to latest
#1Alvaro Herrera
alvherre@2ndquadrant.com

Blind attempt at a Cygwin fix

Further portability fix for a967613911f7. Mingw- and MSVC-based builds
appear to be working fine, but Cygwin needs an extra tweak whereby the
new win32security.c file is explicitely added to the list of files to
build in pgport, per Cygwin members brolga and lorikeet.

Author: Michael Paquier

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e9282e953205a2f3125fc8d1052bc01cb77cd2a3

Modified Files
--------------
configure | 6 ++++++
configure.in | 1 +
2 files changed, 7 insertions(+)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#1)
Re: pgsql: Blind attempt at a Cygwin fix

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

Blind attempt at a Cygwin fix

According to
http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=brolga&amp;dt=2016-01-08%2014%3A51%3A27

brolga now tries to compile win32security.c, which it evidently was not
doing before, but the compile blows up; looks like it is missing #include
calls (which must exist in other places where this code lives ...)

regards, tom lane

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Tom Lane (#2)
Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix

Tom Lane wrote:

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

Blind attempt at a Cygwin fix

According to
http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=brolga&amp;dt=2016-01-08%2014%3A51%3A27

brolga now tries to compile win32security.c, which it evidently was not
doing before, but the compile blows up; looks like it is missing #include
calls (which must exist in other places where this code lives ...)

Obviously this wasn't the best idea ever. Andrew suggests on IM to
revert this on Cygwin to just do the "isatty" check as originally.

I'm CC'ing Marco Atzeri, who has done Cygwin work lately. Maybe he can
spend some time getting this port fixed.

--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Alvaro Herrera (#3)
Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix

Alvaro Herrera wrote:

Tom Lane wrote:

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

Blind attempt at a Cygwin fix

According to
http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=brolga&amp;dt=2016-01-08%2014%3A51%3A27

brolga now tries to compile win32security.c, which it evidently was not
doing before, but the compile blows up; looks like it is missing #include
calls (which must exist in other places where this code lives ...)

Obviously this wasn't the best idea ever. Andrew suggests on IM to
revert this on Cygwin to just do the "isatty" check as originally.

Here's a proposed patch. Thoughts?

--
�lvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

Revert-Blind-attempt-at-a-Cygwin-fix.patchtext/x-diff; charset=us-asciiDownload+9-8
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#4)
Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix

Alvaro Herrera <alvherre@2ndquadrant.com> writes:

Alvaro Herrera wrote:

Obviously this wasn't the best idea ever. Andrew suggests on IM to
revert this on Cygwin to just do the "isatty" check as originally.

Here's a proposed patch. Thoughts?

Ugly, but it will hold the fort until someone can debug the service
code for Cygwin.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#5)
Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix

On 01/08/2016 11:17 AM, Tom Lane wrote:

Alvaro Herrera <alvherre@2ndquadrant.com> writes:

Alvaro Herrera wrote:

Obviously this wasn't the best idea ever. Andrew suggests on IM to
revert this on Cygwin to just do the "isatty" check as originally.

Here's a proposed patch. Thoughts?

Ugly, but it will hold the fort until someone can debug the service
code for Cygwin.

I downloaded the official Cygwin packages into a Cygwin instance and
checked how they do things. As I rather expected, they do not use pg_ctl
at all to install or run as a service. Rather, they use the standard
Cygwin service utility cygrunsrv. This is all managed via a SYSV style
init script.

So if anything I'd be inclined to disable all the service-related code
in pg_ctl for Cygwin, and treat it just as we treat Unix.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#7Michael Paquier
michael@paquier.xyz
In reply to: Andrew Dunstan (#6)
Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix

On Sun, Jan 10, 2016 at 2:00 AM, Andrew Dunstan <andrew@dunslane.net> wrote:

I downloaded the official Cygwin packages into a Cygwin instance and checked
how they do things. As I rather expected, they do not use pg_ctl at all to
install or run as a service. Rather, they use the standard Cygwin service
utility cygrunsrv. This is all managed via a SYSV style init script.

Thanks for the investigation!

So if anything I'd be inclined to disable all the service-related code in
pg_ctl for Cygwin, and treat it just as we treat Unix.

We had better do the same for back branches then. Need of a patch?
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#8Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#7)
Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix

On Sun, Jan 10, 2016 at 8:10 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

On Sun, Jan 10, 2016 at 2:00 AM, Andrew Dunstan <andrew@dunslane.net> wrote:

I downloaded the official Cygwin packages into a Cygwin instance and checked
how they do things. As I rather expected, they do not use pg_ctl at all to
install or run as a service. Rather, they use the standard Cygwin service
utility cygrunsrv. This is all managed via a SYSV style init script.

Thanks for the investigation!

So if anything I'd be inclined to disable all the service-related code in
pg_ctl for Cygwin, and treat it just as we treat Unix.

We had better do the same for back branches then. Need of a patch?

OK, here is a patch to disable all the service-related code in pg_ctl
for cygwin. This time it is not a blind shot and this compiles
correctly. Changing the option layer is fine for me if this is
HEAD-only. For back-branches, I would suggest to do nothing, the
service-related code paths are not going to run anyway, any output
going to stderr.
--
Michael

Attachments:

cygwin-removal-service-master.patchtext/x-diff; charset=US-ASCII; name=cygwin-removal-service-master.patchDownload+14-37