Thread: MSVC installs too much stuff?

MSVC installs too much stuff?

From
Andrew Dunstan
Date:
When I was working on the test_json stuff yesterday, I noticed that
there are some unexpected (by me at least) things installed when we do
an MSVC build:

$ ls -l bin| egrep 'regress|isolation'
-rwxr-xr-x 1 pgrunner None   72192 Jan 30 07:51 isolationtester.exe
-rwxr-xr-x 1 pgrunner None  112640 Jan 30 07:51 pg_isolation_regress.exe
-rwxr-xr-x 1 pgrunner None  112128 Jan 30 07:51 pg_regress.exe
-rwxr-xr-x 1 pgrunner None  112640 Jan 30 07:51 pg_regress_ecpg.exe

This is made all the more obscure by the fact that the install script
doesn't tell you exactly what it's installing, unlike the "make"
driven install.  There could well be other things that are installed
that shouldn't be.

So I think we need to do several things:

. make the install script more verbose
. work out how to ensure the things above (and test_json when we add
it) are not installed.
. check that nothing else is installed that shouldn't be.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: MSVC installs too much stuff?

From
Michael Paquier
Date:
On Fri, Jan 31, 2020 at 12:47:29PM +1030, Andrew Dunstan wrote:
> When I was working on the test_json stuff yesterday, I noticed that
> there are some unexpected (by me at least) things installed when we do
> an MSVC build:
>
> $ ls -l bin| egrep 'regress|isolation'
> -rwxr-xr-x 1 pgrunner None   72192 Jan 30 07:51 isolationtester.exe
> -rwxr-xr-x 1 pgrunner None  112640 Jan 30 07:51 pg_isolation_regress.exe
> -rwxr-xr-x 1 pgrunner None  112128 Jan 30 07:51 pg_regress.exe
> -rwxr-xr-x 1 pgrunner None  112640 Jan 30 07:51 pg_regress_ecpg.exe
>
> This is made all the more obscure by the fact that the install script
> doesn't tell you exactly what it's installing, unlike the "make"
> driven install.  There could well be other things that are installed
> that shouldn't be.

+1.  Looking at vcregress.pl, all four are always invoked from the
root of the build folder.

> So I think we need to do several things:
>
> . make the install script more verbose
> . work out how to ensure the things above (and test_json when we add
> it) are not installed.
> . check that nothing else is installed that shouldn't be.

Hmm.  It seems to me that an exclusion list with patterns to match
should be enough in Install.pm.  Having only one code path for the
filtering would be nice, which means merging CopyFiles and
CopySetOfFiles.
--
Michael

Attachment

Re: MSVC installs too much stuff?

From
Craig Ringer
Date:
On Fri, 31 Jan 2020 at 13:27, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Fri, Jan 31, 2020 at 12:47:29PM +1030, Andrew Dunstan wrote:
> > When I was working on the test_json stuff yesterday, I noticed that
> > there are some unexpected (by me at least) things installed when we do
> > an MSVC build:
> >
> > $ ls -l bin| egrep 'regress|isolation'
> > -rwxr-xr-x 1 pgrunner None   72192 Jan 30 07:51 isolationtester.exe
> > -rwxr-xr-x 1 pgrunner None  112640 Jan 30 07:51 pg_isolation_regress.exe
> > -rwxr-xr-x 1 pgrunner None  112128 Jan 30 07:51 pg_regress.exe
> > -rwxr-xr-x 1 pgrunner None  112640 Jan 30 07:51 pg_regress_ecpg.exe

These tools should be installed. They are useful, important in fact,
for testing extensions.

In *nix builds we install them to
$PREFIX/lib/postgresql/pgxs/src/test/regress/pg_regress etc.

On Windows we don't have PGXS. It probably doesn't make sense to
install them to the pgxs dir. So putting them in bin is pretty
reasonable.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 2ndQuadrant - PostgreSQL Solutions for the Enterprise



Re: MSVC installs too much stuff?

From
Andrew Dunstan
Date:
On Fri, Jan 31, 2020 at 4:35 PM Craig Ringer <craig@2ndquadrant.com> wrote:
>
> On Fri, 31 Jan 2020 at 13:27, Michael Paquier <michael@paquier.xyz> wrote:
> >
> > On Fri, Jan 31, 2020 at 12:47:29PM +1030, Andrew Dunstan wrote:
> > > When I was working on the test_json stuff yesterday, I noticed that
> > > there are some unexpected (by me at least) things installed when we do
> > > an MSVC build:
> > >
> > > $ ls -l bin| egrep 'regress|isolation'
> > > -rwxr-xr-x 1 pgrunner None   72192 Jan 30 07:51 isolationtester.exe
> > > -rwxr-xr-x 1 pgrunner None  112640 Jan 30 07:51 pg_isolation_regress.exe
> > > -rwxr-xr-x 1 pgrunner None  112128 Jan 30 07:51 pg_regress.exe
> > > -rwxr-xr-x 1 pgrunner None  112640 Jan 30 07:51 pg_regress_ecpg.exe
>
> These tools should be installed. They are useful, important in fact,
> for testing extensions.
>
> In *nix builds we install them to
> $PREFIX/lib/postgresql/pgxs/src/test/regress/pg_regress etc.
>
> On Windows we don't have PGXS. It probably doesn't make sense to
> install them to the pgxs dir. So putting them in bin is pretty
> reasonable.

Oh, Ha! Forget I spoke.

cheers

andrew


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services