Thread: Install from Source On Windows - University of Sydney Research

Install from Source On Windows - University of Sydney Research

From
Kushal Vaghani
Date:
Hello,
 
I have downloaded and built the 8.2.4 postgreSQL from source. This was done by running the build.bat file under src\tools\msvc. I do get a few errors with some contrib projects, but I do not care about them.
 
When i do install(install.pl), there is a destination directory created. Now my question is how do i run postgreSQL from within here. Is there a command line script etc. for this ? Or how can i connect it to pgADMin i.e. the new exe as well as bki file.
 
Thanks
Kushal

Re: Install from Source On Windows - University of Sydney Research

From
Craig Ringer
Date:
On Mon, 2009-08-24 at 15:25 +1000, Kushal Vaghani wrote:
> Hello,
>
> I have downloaded and built the 8.2.4 postgreSQL from source. This was
> done by running the build.bat file under src\tools\msvc. I do get a
> few errors with some contrib projects, but I do not care about them.

Why such an ancient version? Rapid improvements have been made in
PostgreSQL's Windows support, and you'll have much better results with
8.4 or even 8.3 .

> When i do install(install.pl), there is a destination directory
> created. Now my question is how do i run postgreSQL from within here.
> Is there a command line script etc. for this ?

Typically you'll want to create a service account for PostgreSQL, then
add a service that runs the postmaster via pg_ctl.exe under the new
service account.

If you're not comfortable doing that, perhaps you should be using the
binary installer for a recent version?

--
Craig Ringer


Re: Install from Source On Windows - University of Sydney Research

From
Scott Marlowe
Date:
On Mon, Aug 24, 2009 at 12:07 AM, Craig
Ringer<craig@postnewspapers.com.au> wrote:
> On Mon, 2009-08-24 at 15:25 +1000, Kushal Vaghani wrote:
>> Hello,
>>
>> I have downloaded and built the 8.2.4 postgreSQL from source. This was
>> done by running the build.bat file under src\tools\msvc. I do get a
>> few errors with some contrib projects, but I do not care about them.
>
> Why such an ancient version? Rapid improvements have been made in
> PostgreSQL's Windows support, and you'll have much better results with
> 8.4 or even 8.3 .

At the very least the most up to date version of 8.2, which is WAY
higher than .4

Re: Install from Source On Windows - University of Sydney Research

From
Kushal Vaghani
Date:
Hey Craig
 
I am doing a research project on a particular branch of postgreSQL and we have already had some code written on top of 8.2.4 base release few years back. I am doing some extensions to it. So thats the reason of not using the latest releases. There would be lot of extra patching etc.
 
I mean when i run src\tools\msvc\install.pl DESTINATION DIRECTORY, I do get 3 folder with 3 exe's in the bin directory.
 
So is there a script on wondows I can run to fireoff postmaster then load the new DB and connect via pgADMIN ?
 
Many thanks.

 
On Mon, Aug 24, 2009 at 4:11 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
On Mon, Aug 24, 2009 at 12:07 AM, Craig
Ringer<craig@postnewspapers.com.au> wrote:
> On Mon, 2009-08-24 at 15:25 +1000, Kushal Vaghani wrote:
>> Hello,
>>
>> I have downloaded and built the 8.2.4 postgreSQL from source. This was
>> done by running the build.bat file under src\tools\msvc. I do get a
>> few errors with some contrib projects, but I do not care about them.
>
> Why such an ancient version? Rapid improvements have been made in
> PostgreSQL's Windows support, and you'll have much better results with
> 8.4 or even 8.3 .

At the very least the most up to date version of 8.2, which is WAY
higher than .4

Re: Install from Source On Windows - University of Sydney Research

From
Scott Marlowe
Date:
On Mon, Aug 24, 2009 at 12:22 AM, Kushal Vaghani<kushalvaghani@gmail.com> wrote:
> Hey Craig
>
> I am doing a research project on a particular branch of postgreSQL and we
> have already had some code written on top of 8.2.4 base release few years
> back. I am doing some extensions to it. So thats the reason of not using the
> latest releases. There would be lot of extra patching etc.

No, there wouldn't.  Going from 8.2.4 to 8.2.latest should be
painless, or nearly so.  It's when the first two numbers change that
behaviour changes.  Generally speaking a point release is just
security patches and bug fixes. On some very rare occasions there is
some behavioural change, but that's very rare and prominantly listed
in the release notes.

Re: Install from Source On Windows - University of Sydney Research

From
Scott Marlowe
Date:
On Mon, Aug 24, 2009 at 12:40 AM, Scott Marlowe<scott.marlowe@gmail.com> wrote:
> On Mon, Aug 24, 2009 at 12:22 AM, Kushal Vaghani<kushalvaghani@gmail.com> wrote:
>> Hey Craig
>>
>> I am doing a research project on a particular branch of postgreSQL and we
>> have already had some code written on top of 8.2.4 base release few years
>> back. I am doing some extensions to it. So thats the reason of not using the
>> latest releases. There would be lot of extra patching etc.
>
> No, there wouldn't.  Going from 8.2.4 to 8.2.latest should be
> painless, or nearly so.  It's when the first two numbers change that
> behaviour changes.  Generally speaking a point release is just
> security patches and bug fixes. On some very rare occasions there is
> some behavioural change, but that's very rare and prominantly listed
> in the release notes.

P.s. you're far more likely to be bitten by some obscure bug in an old
release (8.2.4) versus the latest 8.2 release.

Re: Install from Source On Windows - University of Sydney Research

From
Scott Marlowe
Date:
On Mon, Aug 24, 2009 at 12:48 AM, Kushal Vaghani<kushalvaghani@gmail.com> wrote:
> okay guys I will get 8.2.13, so would running the install.pl would be
> different.
>
> I will try and see if I can compile and run as mentioned from the docs. But
> would there be any script after install.pl to run the postmaster, initDB

On Unix the program to start things up is pg_ctl...  Is there a
program by that name in the windows build?

Re: Install from Source On Windows - University of Sydney Research

From
Craig Ringer
Date:
On Mon, 2009-08-24 at 16:48 +1000, Kushal Vaghani wrote:
> okay guys I will get 8.2.13, so would running the install.pl would be
> different.
>
> I will try and see if I can compile and run as mentioned from the
> docs. But would there be any script after install.pl to run the
> postmaster, initDB

You'll probably want to initdb, edit the postgresql.conf created by
initdb as desired, then start the postmaster manually using pg_ctl
(making sure to point pg_ctl at the data directory you created). It's
not hard.

If you want to automate it, just write a batch file. Remember to use
".cmd" not ".bat" so you run under the win32 cmd.exe script processor
not the ancient dos emulation monster command.com .

--
Craig Ringer


Re: Install from Source On Windows - University of Sydney Research

From
Thomas Kellerer
Date:
Craig Ringer, 24.08.2009 08:51:
> You'll probably want to initdb, edit the postgresql.conf created by
> initdb as desired, then start the postmaster manually using pg_ctl
> (making sure to point pg_ctl at the data directory you created). It's
> not hard.

Yep, I have done that as well (to quickly set up development databases). The command would be:

pg_ctl -s -D "\Path\To\Datadir" start

> If you want to automate it, just write a batch file. Remember to use
> ".cmd" not ".bat" so you run under the win32 cmd.exe script processor
> not the ancient dos emulation monster command.com .

I don't think there is any difference between .cmd and .bat in any of the NT based Windows versions.

At least on my WinXP (and earlier with W2K) double-clicking a .bat file always starts cmd.exe *not* command.com

Regards
Thomas

Re: Install from Source On Windows - University of Sydney Research

From
Kushal Vaghani
Date:
Thanks Scott and Craig, I will give this a go today evening. Will let you know if it worked.
 
Kushal

On Mon, Aug 24, 2009 at 4:51 PM, Craig Ringer <craig@postnewspapers.com.au> wrote:
On Mon, 2009-08-24 at 16:48 +1000, Kushal Vaghani wrote:
> okay guys I will get 8.2.13, so would running the install.pl would be
> different.
>
> I will try and see if I can compile and run as mentioned from the
> docs. But would there be any script after install.pl to run the
> postmaster, initDB

You'll probably want to initdb, edit the postgresql.conf created by
initdb as desired, then start the postmaster manually using pg_ctl
(making sure to point pg_ctl at the data directory you created). It's
not hard.

If you want to automate it, just write a batch file. Remember to use
".cmd" not ".bat" so you run under the win32 cmd.exe script processor
not the ancient dos emulation monster command.com .

--
Craig Ringer


Re: Install from Source On Windows - University of Sydney Research

From
Kushal Vaghani
Date:
okay guys I will get 8.2.13, so would running the install.pl would be different.
 
I will try and see if I can compile and run as mentioned from the docs. But would there be any script after install.pl to run the postmaster, initDB
 
Thanks.

On Mon, Aug 24, 2009 at 4:40 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
On Mon, Aug 24, 2009 at 12:22 AM, Kushal Vaghani<kushalvaghani@gmail.com> wrote:
> Hey Craig
>
> I am doing a research project on a particular branch of postgreSQL and we
> have already had some code written on top of 8.2.4 base release few years
> back. I am doing some extensions to it. So thats the reason of not using the
> latest releases. There would be lot of extra patching etc.

No, there wouldn't.  Going from 8.2.4 to 8.2.latest should be
painless, or nearly so.  It's when the first two numbers change that
behaviour changes.  Generally speaking a point release is just
security patches and bug fixes. On some very rare occasions there is
some behavioural change, but that's very rare and prominantly listed
in the release notes.