Thread: Compiling PostgreSQL under Windows (for use with R package).

Compiling PostgreSQL under Windows (for use with R package).

From
Paul Linehan
Date:
Hi all,


I'm a (mature) student and I'm interested in exploring the use
of PostgreSQL with the R statistical programming package.

I'm particularly interested in performance for different statistical
problems (I/O intensive/CPU intensive/RAM intensive) with
different compiler options and/or flags.

I'm also interested in benchmarking with "ordinary" hardware - i.e.
John/Joan Doe's laptop, rather than the normal 512GB RAM/SAN
array systems we nomally read about in benchmarks.

I've just compiled PostgreSQL under "pure" Cygwin and also using
mingw-64. Now, under both of these systems I have been able to
perform basic tests - create database/create table/insert into...
and that's worked fine.

I know that up till (is it a decade now?) recently, PostgreSQL wasn't
the most windows-friendly - Cygwin was mandatory (possibly the
reason why (only for the moment hopefully!) MySQL is the
most popular Open Source database.

Anyway, I'm just wondering am I wasting my time working with
Mingw-64 and and/or Cygwin for PostgreSQL. Should I would just
be better off with the "native" Windows system.

By "native", I mean one compiled using Microsoft Visual C++,
which I understand is the system used for the offcial builds
(http://www.postgresql.org/docs/9.4/static/install-windows.html).

I would be interested in hearing opinions - particularly those with
any references (student dissertation - want something concrete),
so, anyone who wants to weigh in with references, URLs - anything.

Should anyone require any further information, please don't hesitate
to ask.


TIA and rgs,


Paul...


Re: Compiling PostgreSQL under Windows (for use with R package).

From
Joe Conway
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/27/2015 03:03 PM, Paul Linehan wrote:
> Anyway, I'm just wondering am I wasting my time working with
> Mingw-64 and and/or Cygwin for PostgreSQL. Should I would just be
> better off with the "native" Windows system.

I would not compile Postgres using Cygwin -- just use the native
Windows version, or better yet switch to Linux.

If you need PL/R dll for Windows you can find pre-compiled binaries
here: http://www.joeconway.com/plr/


- --
Joe Conway
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJVtq4wAAoJEDfy90M199hlvFQQAI3KmKJMKKVtw+kJiZ7tlf2h
Glqt/gF8KO/utnjx38TC7bjZ7Q6kn+/gevvj6bk86zH39UakSQ8MPECQlf73tIOR
8aF8krAifYzNYkk/dG1k4Mf5lmBre5A1/MiBXyEQSdQWqmKhx0gpUeTYXsQe/kcc
gFD31L1r8RV1nIqBPYgPGsYYwzEaWwLBvydkoGT6pgDSG2ortpq+HydauMKDaGqM
zcx7DkP9utIXBJ17XLhsO/1AVl0sgnSSQat5J1x3Qlq3+fSrFsnN8ILPwT8w6ZXj
nyEBKw7f3Z769kH3jgStbLMv0Rj6xGfLbNAjCHfz2no+T6kd+sMmzb0CS3rRj7/5
Mb7ovtjT3PPRdBIYXLsWUHHHMdpcLjWddZjGu3S8pgH7WZXXFdY5rrsWZ+pgeLhR
7BBziA+XDSiq9qP/3x+TzEAx2ruk8jxUsxK+IDIqmsPLOoTFlx3yK4jiR87g5XM5
WCOAjeDoHfqpY50UuRmH7Hgu/3Vow2yZlHd4JSVjP9MbsLdqm4IU7NGHAhZEhEHr
glt4Tl1m+tBqXsbRtNMypyLH5/LJFwChdaeVyulhkaYVCN5qrWZncuJsXt9aRds+
euVuuzfiXjqoKRym7GRvjXcZjPSOVgMwzixAhOXgJ2eEYDIGm4EFtIWSK1m1Gj86
aqvqST6i/EiAbxOroqM4
=Qps5
-----END PGP SIGNATURE-----


Re: Compiling PostgreSQL under Windows (for use with R package).

From
Paul Linehan
Date:
Hi Joe, and thanks for the quick reply.


>> Anyway, I'm just wondering am I wasting my time working with
>> Mingw-64 and and/or Cygwin for PostgreSQL. Should I would just be
>> better off with the "native" Windows system.


> I would not compile Postgres using Cygwin -- just use the native
> Windows version, or better yet switch to Linux.


Oh, I'm planning on using Linux (and *BSD and OpenSolaris...) :-)

Unfortunately though, there appears to be a distinct bias at the institution
where I currently study (**not this email's one**) in favour of a certain
OS from the North Western United States...

I would ideally like to present a project showing that I'd covered all the bases
and then be able to say, well, "for this problem, operating system X,
compiled with Y is your only man"

> If you need PL/R dll for Windows you can find pre-compiled binaries
> here: http://www.joeconway.com/plr/

One of my fundamental beliefs as a scientist is that we (of
all people) should be using Open Source. I'll be grabbing your
source at some point.

Scientists, by definition, should be pushing the boundaries. Commercial
software, by definition, doesn't cover edge conditions (Pareto's law &c.)
which results in a "conflict of interest".

Tomorrow, I'll take a more detailled look at your site - I believe that
I've seen it before :-).

Thanks again, rgs,


Paul...


> Joe Conway


Re: Compiling PostgreSQL under Windows (for use with R package).

From
Paul Linehan
Date:
Hi again, just a few extra words.


> I would not compile Postgres using Cygwin -- just use the native
> Windows version, or better yet switch to Linux.


Compiling and running under Linux is child's play. I mean, at least
for me, now, with several years' experience. I would like to make
that the case for everyone who wishes to use Linux - it can be
(ahem...) difficult at the beginning.


What I'm trying to establish is performance given the OS, the
compilation method and the problem (CPU/I-O/RAM- intensive).

How do the different combinations respond under these differing
circumstances given the problem?

To be honest, I'm not expecting huge differences between my different
planned tests - i.e. Linux/*BSD won't hugely outperform other
systems. Hell, maybe Windows will perform great? But, that's not the
issue for me.

Even if Windows performed better, it would be irrelevant for me. What
I'm **hoping** is that I can persuade my elders and betters that using
Open Source **may** (or may not - hopefully) cost a bit in performance,
but that it brings other, intangible, yet greater advantages.

As mentioned, I believe that scientists should be using Open Source,
so maybe I can encourage its use - and learn interesting things along
the way (with your help :-) )

I'm no Richard Stallman - I just believe that Open Source is right for
scientists - maybe not for people running small businesses or
banks? I certainly don't regard it as a breach of my human rights (as
Stallman would see it) to be using a Google (closed source)
mail programme to email you.

The key point would be, the email isn't the goal of my research.


Anyway, thanks again for your reply, rgs,


Paul...


> Joe Conway