1

I am trying to install PostgreSQL 10 beta from source code by following their documentation. Is it normal that make and make install take more than 12 hours to complete? Would using extra CPU cores and memory speed things up? Is there a binary available for Debian 8?

Thank you!

7
  • No! I have done it on a 7 year old laptop with 2GB of RAM and it takes between 1 and 2 hours to run make. ./configure and install (I always split the steps) take approx 1 - 1.5 mins! You don't have a permissions issue or free space issue? Check your df -h and your OS stats during the compile (open another console tab). Jul 8 '17 at 13:56
  • When you compiled did you use make -j 7 where 7 is the number of concurrent compiles?
    – cybernard
    Jul 8 '17 at 14:41
  • 1
    no I did not do concurrent -j 7
    – geeko
    Jul 8 '17 at 14:43
  • @geeko there is your problem. Set -j = <total cores> and try again. Jul 8 '17 at 16:01
  • 1
    @geeko There's something seriously wrong there. Is it taking ages to compile each object file? What's it spending time on - look at top ? There's no way it should take hours even if your Debian 8 system is on some ten-year-old CPU. I'm wondering if you're on a cloud/virtual host of some kind and the underlying host system is overloaded or defective. Jul 8 '17 at 16:11
4

How long it takes to compile will depend on a big number of factors, mostly the hardware (or resources of your virtual machine) on which you're compiling, plus your OS and environment settings, plus what else is your computer doing while you compile.

To have a reference of times, you can check PostgreSQL BuildFarm.

For instance, for a certain system called gull, which runs Debian 8.3, the gull PostgreSQL BuildFarm for date 2017-07-06 shows a Total run time 01:05:48.

Your system might actually be an order of magnitude slower and take 12 hours. It seems a bit "overkill", but possible. Although I don't know the specifics of compiling PostgreSQL for Debian (specially, how parallel it can be made), I'm sure that more memory and more (and faster) cores will decrease compilation time. It is also very likely that, at this phase of development, some settings to ease debugging might be different from releases on production, and (maybe) take longer to compile.

As for packages already compiled, check

2
1

Is there a binary available for Debian 8?

Yes, and you should be using the binary. For Debian 8 (Jessie) you'll find

Just use apt-get to install the version you need,

apt-get install postgresql-9.4

When it comes to compilation the biggest thing is the -j flag which compiles in parallel. As @cybernard suggested in the comments.

If you want to compile PostgreSQL and not all of the dependencies, you can use apt-get to install the source that Debian compiles their versions with

apt-get source postgresql-9.4
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.