Thread: postgresql-10.3 on unbuntu-17.10 - how??

postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
I recently installed Ubuntu-17.10 and then discovered that
Postgresql from the Pgdg repos is only supported on Ubuntu LTS
releases (eg 16.04).  However info on the internet said pg-10
could be installed from Pgdg zesty repo, which with some package
version conflicts, I was able to do so and have a functional
pg-10.1 install.

However I need to upgrade to 10.3 and the normal "apt update;
apt upgrade" does not offer 10.3.  Also, doing a fresh install
still installs 10.1.

Is Pgdg 10.3 even available for ubuntu 17.10?  How the heck does
one upgrade to it?



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Adrian Klaver
Date:
On 03/20/2018 08:23 AM, Stuart McGraw wrote:
> I recently installed Ubuntu-17.10 and then discovered that
> Postgresql from the Pgdg repos is only supported on Ubuntu LTS
> releases (eg 16.04).  However info on the internet said pg-10
> could be installed from Pgdg zesty repo, which with some package
> version conflicts, I was able to do so and have a functional
> pg-10.1 install.
> 
> However I need to upgrade to 10.3 and the normal "apt update;
> apt upgrade" does not offer 10.3.  Also, doing a fresh install
> still installs 10.1.

https://wiki.postgresql.org/wiki/Apt
"2018-01-17: Ubuntu zesty (17.04) is unsupported now, Ubuntu removed it 
from their mirrors "

> 
> Is Pgdg 10.3 even available for ubuntu 17.10?  How the heck does
> one upgrade to it?

18.04 LTS (Bionic Beaver)?:

http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/

> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Christoph Berg
Date:
Re: Adrian Klaver 2018-03-20 <4c40e7c5-efa7-00d7-b891-acc9c1ec75b0@aklaver.com>
> > However I need to upgrade to 10.3 and the normal "apt update;
> > apt upgrade" does not offer 10.3.  Also, doing a fresh install
> > still installs 10.1.
> 
> https://wiki.postgresql.org/wiki/Apt
> "2018-01-17: Ubuntu zesty (17.04) is unsupported now, Ubuntu removed it from
> their mirrors "
> 
> > 
> > Is Pgdg 10.3 even available for ubuntu 17.10?  How the heck does
> > one upgrade to it?
> 
> 18.04 LTS (Bionic Beaver)?:
> 
> http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/

Ack. We skipped 17.10 and went straight to supporting the upcoming
18.04 (you can already install it). Sorry, there's only 24h a day :(

Christoph


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/20/2018 02:19 PM, Christoph Berg wrote:
 > Re: Adrian Klaver 2018-03-20 <4c40e7c5-efa7-00d7-b891-acc9c1ec75b0@aklaver.com>
 >>> However I need to upgrade to 10.3 and the normal "apt update;
 >>> apt upgrade" does not offer 10.3.  Also, doing a fresh install
 >>> still installs 10.1.
 >>
 >> https://wiki.postgresql.org/wiki/Apt
 >> "2018-01-17: Ubuntu zesty (17.04) is unsupported now, Ubuntu removed it from
 >> their mirrors "
 >>
 >>> Is Pgdg 10.3 even available for ubuntu 17.10?  How the heck does
 >>> one upgrade to it?
 >>
 >> 18.04 LTS (Bionic Beaver)?:
 >>
 >> http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/
 >
 > Ack. We skipped 17.10 and went straight to supporting the upcoming
 > 18.04 (you can already install it). Sorry, there's only 24h a day :(
 >
 > Christoph

Thank you Christoph and Adrian.
I changed the apt source to
   deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main

Then (transcripts edited for brevity)...
   # apt-get dist-update
   ...
   # apt-get dist-upgrade
   The following packages will be REMOVED:
     pgadmin3
   The following packages will be upgraded:
     pgadmin3-data postgresql postgresql-client postgresql-client-common
     postgresql-common postgresql-contrib postgresql-doc postgresql-doc-10
     postgresql-server-dev-10
   9 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.

after completing the update and rebooting:

   $ psql --version
   psql (PostgreSQL) 10.1
   $ psql -c 'select version()'
   PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406, 64-bit

Likely I am missing something obvious due to my newness with Ubuntu,
but isn't the above supposed to work?  10.3 is a minor upgrade, yes?


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Adrian Klaver
Date:
On 03/20/2018 02:25 PM, Stuart McGraw wrote:
> On 03/20/2018 02:19 PM, Christoph Berg wrote:
>  > Re: Adrian Klaver 2018-03-20 
> <4c40e7c5-efa7-00d7-b891-acc9c1ec75b0@aklaver.com>
>  >>> However I need to upgrade to 10.3 and the normal "apt update;
>  >>> apt upgrade" does not offer 10.3.  Also, doing a fresh install
>  >>> still installs 10.1.
>  >>
>  >> https://wiki.postgresql.org/wiki/Apt
>  >> "2018-01-17: Ubuntu zesty (17.04) is unsupported now, Ubuntu removed 
> it from
>  >> their mirrors "
>  >>
>  >>> Is Pgdg 10.3 even available for ubuntu 17.10?  How the heck does
>  >>> one upgrade to it?
>  >>
>  >> 18.04 LTS (Bionic Beaver)?:
>  >>
>  >> http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/
>  >
>  > Ack. We skipped 17.10 and went straight to supporting the upcoming
>  > 18.04 (you can already install it). Sorry, there's only 24h a day :(
>  >
>  > Christoph
> 
> Thank you Christoph and Adrian.
> I changed the apt source to
>    deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
> 
> Then (transcripts edited for brevity)...
>    # apt-get dist-update

I am going  to say that was apt-get update. More below.

>    ...
>    # apt-get dist-upgrade
>    The following packages will be REMOVED:
>      pgadmin3
>    The following packages will be upgraded:
>      pgadmin3-data postgresql postgresql-client postgresql-client-common
>      postgresql-common postgresql-contrib postgresql-doc postgresql-doc-10
>      postgresql-server-dev-10
>    9 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
> 
> after completing the update and rebooting:
> 
>    $ psql --version
>    psql (PostgreSQL) 10.1
>    $ psql -c 'select version()'
>    PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 
> 6.3.0-12ubuntu2) 6.3.0 20170406, 64-bit

I suspect the above is coming from the Ubuntu repo, not the PGDG one. As 
an example from an Ubuntu machine that is using the PGDG repo:

psql --version 
 

psql (PostgreSQL) 10.3 (Ubuntu 10.3-1.pgdg16.04+1) 
 

 
 

postgres=# select version();
 
version 


--------------------------------------------------------------------------------------------------------------------------------------------


  PostgreSQL 10.3 (Ubuntu 10.3-1.pgdg16.04+1) on x86_64-pc-linux-gnu, 
compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609, 64-bit 

(1 row) 



> 
> Likely I am missing something obvious due to my newness with Ubuntu,
> but isn't the above supposed to work?  10.3 is a minor upgrade, yes?

Yes it is a minor upgrade.

What does pg_lsclusters show?


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/20/2018 05:34 PM, Adrian Klaver wrote:
> On 03/20/2018 02:25 PM, Stuart McGraw wrote:
>> On 03/20/2018 02:19 PM, Christoph Berg wrote:
>>  > Re: Adrian Klaver 2018-03-20 <4c40e7c5-efa7-00d7-b891-acc9c1ec75b0@aklaver.com>
>>  >>> However I need to upgrade to 10.3 and the normal "apt update;
>>  >>> apt upgrade" does not offer 10.3.  Also, doing a fresh install
>>  >>> still installs 10.1.
 >> [...]
>> Thank you Christoph and Adrian.
>> I changed the apt source to
>>    deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
>>
>> Then (transcripts edited for brevity)...
>>    # apt-get dist-update
> 
> I am going  to say that was apt-get update. More below.
> 
>>    ...
>>    # apt-get dist-upgrade
>>    The following packages will be REMOVED:
>>      pgadmin3
>>    The following packages will be upgraded:
>>      pgadmin3-data postgresql postgresql-client postgresql-client-common
>>      postgresql-common postgresql-contrib postgresql-doc postgresql-doc-10
>>      postgresql-server-dev-10
>>    9 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
>>
>> after completing the update and rebooting:
>>
>>    $ psql --version
>>    psql (PostgreSQL) 10.1
>>    $ psql -c 'select version()'
>>    PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406, 64-bit
> 
> I suspect the above is coming from the Ubuntu repo, not the PGDG one.

I had also tried 'apt-get upgrade' but that looked less promising
   # apt-get upgrade
   The following packages have been kept back:
     libdbd-pg-perl libpq-dev libpq5 pgadmin3 pgadmin3-data postgresql-10
     postgresql-client-10
   The following packages will be upgraded:
     postgresql postgresql-client postgresql-client-common postgresql-common
     postgresql-contrib postgresql-doc postgresql-doc-10 postgresql-server-dev-10
   8 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
The results turned out the same: postgresql-10.1, not 10.3.

I took this to suggest using dist-upgrade:

   https://wiki.postgresql.org/wiki/Apt/FAQ#How_do_I_dist-upgrade.3F

and that it should "just work".

> As an example from an Ubuntu machine that is using the PGDG repo:
> 
> psql --version
> psql (PostgreSQL) 10.3 (Ubuntu 10.3-1.pgdg16.04+1)
> postgres=# select version();
>   PostgreSQL 10.3 (Ubuntu 10.3-1.pgdg16.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9)
5.4.020160609, 64-bit
 
> 
>> Likely I am missing something obvious due to my newness with Ubuntu,
>> but isn't the above supposed to work?  10.3 is a minor upgrade, yes?
> 
> Yes it is a minor upgrade.
> 
> What does pg_lsclusters show?

# pg_lsclusters
Ver Cluster Port Status Owner    Data directory              Log file
10  main    5432 online postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/20/2018 06:42 PM, Stuart McGraw wrote:
> On 03/20/2018 05:34 PM, Adrian Klaver wrote:
>> On 03/20/2018 02:25 PM, Stuart McGraw wrote:
>>> On 03/20/2018 02:19 PM, Christoph Berg wrote:
>[...]
>>>    # apt-get dist-upgrade
>>>    The following packages will be REMOVED:
>>>      pgadmin3
>>>    The following packages will be upgraded:
>>>      pgadmin3-data postgresql postgresql-client postgresql-client-common
>>>      postgresql-common postgresql-contrib postgresql-doc postgresql-doc-10
>>>      postgresql-server-dev-10
>>>    9 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
>[...]
>>> Likely I am missing something obvious due to my newness with Ubuntu,
>>> but isn't the above supposed to work?  10.3 is a minor upgrade, yes?
>>
>> Yes it is a minor upgrade.
>>
>> What does pg_lsclusters show?
> 
> # pg_lsclusters
> Ver Cluster Port Status Owner    Data directory              Log file
> 10  main    5432 online postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log

An additional bit of information.  Picking one of the installed packages
to look at:

~# apt-cache  policy postgresql-client
postgresql-client:
   Installed: 10+190.pgdg18.04+1
   Candidate: 10+190.pgdg18.04+1
   Version table:
  *** 10+190.pgdg18.04+1 500
         500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 Packages
         500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main i386 Packages
         100 /var/lib/dpkg/status
      9.6+184ubuntu1.1 500
         500 cdrom://Ubuntu-Server 17.10 _Artful Aardvark_ - Release amd64 (20180108.1) artful/main amd64 Packages
         500 http://us.archive.ubuntu.com/ubuntu artful-security/main amd64 Packages
         500 http://us.archive.ubuntu.com/ubuntu artful-security/main i386 Packages
         500 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages
         500 http://us.archive.ubuntu.com/ubuntu artful-updates/main i386 Packages
      9.6+184ubuntu1 500
         500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
         500 http://us.archive.ubuntu.com/ubuntu artful/main i386 Packages

I *think* the above is saying that the package was (or should be?) installed
from the pgdg repository.  So why isn't is getting the 10.3 versions?
(Thanks for the help so far!)


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Adrian Klaver
Date:
On 03/20/2018 06:27 PM, Stuart McGraw wrote:
> On 03/20/2018 06:42 PM, Stuart McGraw wrote:
>> On 03/20/2018 05:34 PM, Adrian Klaver wrote:
>>> On 03/20/2018 02:25 PM, Stuart McGraw wrote:
>>>> On 03/20/2018 02:19 PM, Christoph Berg wrote:
>> [...]
>>>>    # apt-get dist-upgrade
>>>>    The following packages will be REMOVED:
>>>>      pgadmin3
>>>>    The following packages will be upgraded:
>>>>      pgadmin3-data postgresql postgresql-client 
>>>> postgresql-client-common
>>>>      postgresql-common postgresql-contrib postgresql-doc 
>>>> postgresql-doc-10
>>>>      postgresql-server-dev-10
>>>>    9 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
>> [...]
>>>> Likely I am missing something obvious due to my newness with Ubuntu,
>>>> but isn't the above supposed to work?  10.3 is a minor upgrade, yes?
>>>
>>> Yes it is a minor upgrade.
>>>
>>> What does pg_lsclusters show?
>>
>> # pg_lsclusters
>> Ver Cluster Port Status Owner    Data directory              Log file
>> 10  main    5432 online postgres /var/lib/postgresql/10/main 
>> /var/log/postgresql/postgresql-10-main.log
> 
> An additional bit of information.  Picking one of the installed packages
> to look at:
> 
> ~# apt-cache  policy postgresql-client
> postgresql-client:
>    Installed: 10+190.pgdg18.04+1
>    Candidate: 10+190.pgdg18.04+1
>    Version table:
>   *** 10+190.pgdg18.04+1 500
>          500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main 
> amd64 Packages
>          500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main 
> i386 Packages
>          100 /var/lib/dpkg/status
>       9.6+184ubuntu1.1 500
>          500 cdrom://Ubuntu-Server 17.10 _Artful Aardvark_ - Release 
> amd64 (20180108.1) artful/main amd64 Packages
>          500 http://us.archive.ubuntu.com/ubuntu artful-security/main 
> amd64 Packages
>          500 http://us.archive.ubuntu.com/ubuntu artful-security/main 
> i386 Packages
>          500 http://us.archive.ubuntu.com/ubuntu artful-updates/main 
> amd64 Packages
>          500 http://us.archive.ubuntu.com/ubuntu artful-updates/main 
> i386 Packages
>       9.6+184ubuntu1 500
>          500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
>          500 http://us.archive.ubuntu.com/ubuntu artful/main i386 Packages
> 
> I *think* the above is saying that the package was (or should be?) 
> installed
> from the pgdg repository.  So why isn't is getting the 10.3 versions?
> (Thanks for the help so far!)

I think it is installed.

What does pg_lsclusters show?

What does ps ax | grep postgres show?

At this point do you have a running instance of Postgres and is it in use?

If so I would take a pg_dump for safety's sake, before going any further.


> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/20/2018 10:07 PM, Adrian Klaver wrote:
> On 03/20/2018 06:27 PM, Stuart McGraw wrote:
>> On 03/20/2018 06:42 PM, Stuart McGraw wrote:
>>> On 03/20/2018 05:34 PM, Adrian Klaver wrote:
>>>> On 03/20/2018 02:25 PM, Stuart McGraw wrote:
>>>>> On 03/20/2018 02:19 PM, Christoph Berg wrote:
>>> [...]
>>>>>    # apt-get dist-upgrade
>>>>>    The following packages will be REMOVED:
>>>>>      pgadmin3
>>>>>    The following packages will be upgraded:
>>>>>      pgadmin3-data postgresql postgresql-client postgresql-client-common
>>>>>      postgresql-common postgresql-contrib postgresql-doc postgresql-doc-10
>>>>>      postgresql-server-dev-10
>>>>>    9 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
>>> [...]
>>>>> Likely I am missing something obvious due to my newness with Ubuntu,
>>>>> but isn't the above supposed to work?  10.3 is a minor upgrade, yes?
>>>>
>>>> Yes it is a minor upgrade.
>>>>
>>>> What does pg_lsclusters show?
>>>
>>> # pg_lsclusters
>>> Ver Cluster Port Status Owner    Data directory              Log file
>>> 10  main    5432 online postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
>>
>> An additional bit of information.  Picking one of the installed packages
>> to look at:
>>
>> ~# apt-cache  policy postgresql-client
>> postgresql-client:
>>    Installed: 10+190.pgdg18.04+1
>>    Candidate: 10+190.pgdg18.04+1
>>    Version table:
>>   *** 10+190.pgdg18.04+1 500
>>          500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 Packages
>>          500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main i386 Packages
>>          100 /var/lib/dpkg/status
>>       9.6+184ubuntu1.1 500
>>          500 cdrom://Ubuntu-Server 17.10 _Artful Aardvark_ - Release amd64 (20180108.1) artful/main amd64 Packages
>>          500 http://us.archive.ubuntu.com/ubuntu artful-security/main amd64 Packages
>>          500 http://us.archive.ubuntu.com/ubuntu artful-security/main i386 Packages
>>          500 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages
>>          500 http://us.archive.ubuntu.com/ubuntu artful-updates/main i386 Packages
>>       9.6+184ubuntu1 500
>>          500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
>>          500 http://us.archive.ubuntu.com/ubuntu artful/main i386 Packages
>>
>> I *think* the above is saying that the package was (or should be?) installed
>> from the pgdg repository.  So why isn't is getting the 10.3 versions?
>> (Thanks for the help so far!)
> 
> I think it is installed.
> 
> What does pg_lsclusters show?

I included it above but here it is again:
 >>> # pg_lsclusters
 >>> Ver Cluster Port Status Owner    Data directory              Log file
 >>> 10  main    5432 online postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log

> What does ps ax | grep postgres show?
> At this point do you have a running instance of Postgres and is it in use?
> If so I would take a pg_dump for safety's sake, before going any further.

Not functional at the moment, I was experimenting with trying to
remove and reinstall various packages.  But I am doing this on a VM,
not my development machine where the real database to be upgraded
is.

Whether it was fully functional after the upgrade I can't say for sure
but the server restarted ok with no unusual messages and I could connect
to it with pgsql.  But both continued to report their versions as 10.1.

After removing the main postgresql packages and reinstalling I got
some version conflicts which led to my to trying doing a clean install
of Ubuntu-17.10 followed by an install of postgresql-10 from the pgdg
bionic (rather than zesty) repo.  It failed as described in a separate
post.



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/20/2018 09:46 AM, Adrian Klaver wrote:
> On 03/20/2018 08:23 AM, Stuart McGraw wrote:
>> I recently installed Ubuntu-17.10 and then discovered that
>> Postgresql from the Pgdg repos is only supported on Ubuntu LTS
>> releases (eg 16.04).  However info on the internet said pg-10
>> could be installed from Pgdg zesty repo, which with some package
>> version conflicts, I was able to do so and have a functional
>> pg-10.1 install.
>>
>> However I need to upgrade to 10.3 and the normal "apt update;
>> apt upgrade" does not offer 10.3.  Also, doing a fresh install
>> still installs 10.1.
> 
> https://wiki.postgresql.org/wiki/Apt
> "2018-01-17: Ubuntu zesty (17.04) is unsupported now, Ubuntu removed it from their mirrors "
> 
>>
>> Is Pgdg 10.3 even available for ubuntu 17.10?  How the heck does
>> one upgrade to it?
> 
> 18.04 LTS (Bionic Beaver)?:
> 
> http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/

I tried doing a full reinstall of Ubuntu-17.10 followed by a postgresql
install from the bionic repo (instead of installing 10.1 per above and
trying to upgrade)

   # apt-get -qy install postgresql postgresql-client postgresql-contrib \
       postgresql-doc pgadmin3 postgresql-server-dev-10 libpq-dev
   Reading package lists...
   Building dependency tree...
   Reading state information...
    Some packages could not be installed. This may mean that you have
   requested an impossible situation or if you are using the unstable
   distribution that some required packages have not yet been created
   or been moved out of Incoming.
   The following information may help to resolve the situation:

   The following packages have unmet dependencies:
    libpq-dev : Depends: libpq5 (= 10.3-1.pgdg18.04+1) but it is not going to be installed
    pgadmin3 : Depends: libgcrypt20 (>= 1.8.0) but 1.7.8-2ubuntu1 is to be installed
               Depends: libpq5 (>= 8.4~) but it is not going to be installed
               Recommends: pgagent but it is not going to be installed
    postgresql : Depends: postgresql-10 but it is not going to be installed
    postgresql-client : Depends: postgresql-client-10
    postgresql-contrib : Depends: postgresql-contrib-10
   E: Unable to correct problems, you have held broken packages.

Is there any reason now not to conclude that the 10.3 bionic version is
simply incompatible with Ubuntu-17.10 (at least without a lot more package
wrangling chops than I have)?

One can install postgresql-10.1 but one cannot upgrade it to get security
fixes or to be able to load data dumped from another 10.3 database.

Given that Ubuntu-18.04 will be out soon I guess this is pretty much moot
except for a few unfortunates like me who absolutely need 10.3 but have no
option to upgrade.  I guess the lesson is that running the Pgdg versions
of Postgresql on any but the LTS versions of Ubuntu is pretty risky.
Live and learn.  Maybe this will help someone else.



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Adrian Klaver
Date:
On 03/20/2018 10:52 PM, Stuart McGraw wrote:
Looks like these posts are coming through a news group to me.
I am Ccing list to get response back there.

>>>
>>> Is Pgdg 10.3 even available for ubuntu 17.10?  How the heck does
>>> one upgrade to it?
>>
>> 18.04 LTS (Bionic Beaver)?:
>>
>> http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/
> 
> I tried doing a full reinstall of Ubuntu-17.10 followed by a postgresql
> install from the bionic repo (instead of installing 10.1 per above and
> trying to upgrade)
> 
>    # apt-get -qy install postgresql postgresql-client postgresql-contrib \
>        postgresql-doc pgadmin3 postgresql-server-dev-10 libpq-dev
>    Reading package lists...
>    Building dependency tree...
>    Reading state information...
>     Some packages could not be installed. This may mean that you have
>    requested an impossible situation or if you are using the unstable
>    distribution that some required packages have not yet been created
>    or been moved out of Incoming.
>    The following information may help to resolve the situation:
> 
>    The following packages have unmet dependencies:
>     libpq-dev : Depends: libpq5 (= 10.3-1.pgdg18.04+1) but it is not 
> going to be installed
>     pgadmin3 : Depends: libgcrypt20 (>= 1.8.0) but 1.7.8-2ubuntu1 is to 
> be installed
>                Depends: libpq5 (>= 8.4~) but it is not going to be 
> installed
>                Recommends: pgagent but it is not going to be installed
>     postgresql : Depends: postgresql-10 but it is not going to be installed
>     postgresql-client : Depends: postgresql-client-10
>     postgresql-contrib : Depends: postgresql-contrib-10
>    E: Unable to correct problems, you have held broken packages.

If it where me I would simplify the above for the moment to :

apt-get install postgresql-10

> 
> Is there any reason now not to conclude that the 10.3 bionic version is
> simply incompatible with Ubuntu-17.10 (at least without a lot more package
> wrangling chops than I have)?
> 
> One can install postgresql-10.1 but one cannot upgrade it to get security
> fixes or to be able to load data dumped from another 10.3 database.
> 
> Given that Ubuntu-18.04 will be out soon I guess this is pretty much moot
> except for a few unfortunates like me who absolutely need 10.3 but have no
> option to upgrade.  I guess the lesson is that running the Pgdg versions
> of Postgresql on any but the LTS versions of Ubuntu is pretty risky.
> Live and learn.  Maybe this will help someone else.


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Vincenzo Romano
Date:
2018-03-21 14:02 GMT+01:00 Adrian Klaver <adrian.klaver@aklaver.com>:
> On 03/20/2018 10:52 PM, Stuart McGraw wrote:
> Looks like these posts are coming through a news group to me.
> I am Ccing list to get response back there.
>
>
>>>>
>>>> Is Pgdg 10.3 even available for ubuntu 17.10?  How the heck does
>>>> one upgrade to it?
>>>
>>>
>>> 18.04 LTS (Bionic Beaver)?:
>>>
>>> http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/
>>
>>
>> I tried doing a full reinstall of Ubuntu-17.10 followed by a postgresql
>> install from the bionic repo (instead of installing 10.1 per above and
>> trying to upgrade)
>>
>>    # apt-get -qy install postgresql postgresql-client postgresql-contrib \
>>        postgresql-doc pgadmin3 postgresql-server-dev-10 libpq-dev
>>    Reading package lists...
>>    Building dependency tree...
>>    Reading state information...
>>     Some packages could not be installed. This may mean that you have
>>    requested an impossible situation or if you are using the unstable
>>    distribution that some required packages have not yet been created
>>    or been moved out of Incoming.
>>    The following information may help to resolve the situation:
>>
>>    The following packages have unmet dependencies:
>>     libpq-dev : Depends: libpq5 (= 10.3-1.pgdg18.04+1) but it is not going
>> to be installed
>>     pgadmin3 : Depends: libgcrypt20 (>= 1.8.0) but 1.7.8-2ubuntu1 is to be
>> installed
>>                Depends: libpq5 (>= 8.4~) but it is not going to be
>> installed
>>                Recommends: pgagent but it is not going to be installed
>>     postgresql : Depends: postgresql-10 but it is not going to be
>> installed
>>     postgresql-client : Depends: postgresql-client-10
>>     postgresql-contrib : Depends: postgresql-contrib-10
>>    E: Unable to correct problems, you have held broken packages.
>
>
> If it where me I would simplify the above for the moment to :
>
> apt-get install postgresql-10
>
>
>>
>> Is there any reason now not to conclude that the 10.3 bionic version is
>> simply incompatible with Ubuntu-17.10 (at least without a lot more package
>> wrangling chops than I have)?
>>
>> One can install postgresql-10.1 but one cannot upgrade it to get security
>> fixes or to be able to load data dumped from another 10.3 database.
>>
>> Given that Ubuntu-18.04 will be out soon I guess this is pretty much moot
>> except for a few unfortunates like me who absolutely need 10.3 but have no
>> option to upgrade.  I guess the lesson is that running the Pgdg versions
>> of Postgresql on any but the LTS versions of Ubuntu is pretty risky.
>> Live and learn.  Maybe this will help someone else.

I have followed more than once the exact directions from the download page:

https://www.postgresql.org/download/linux/ubuntu/

Just pretend you are running 17.10 instead of 17.04.

It simply works.


-- 
Vincenzo Romano - NotOrAnd.IT
Information Technologies
--
NON QVIETIS MARIBVS NAVTA PERITVS


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/21/2018 07:02 AM, Adrian Klaver wrote:
> On 03/20/2018 10:52 PM, Stuart McGraw wrote:
> Looks like these posts are coming through a news group to me.
> I am Ccing list to get response back there.

Is this something I am doing wrong?  I am posting through the gmane newsgroup
which in turn is bi-directionally gatewayed to the list AIUI.

 >>[...]
>>    # apt-get -qy install postgresql postgresql-client postgresql-contrib \
>>        postgresql-doc pgadmin3 postgresql-server-dev-10 libpq-dev
>[...]
>>    The following packages have unmet dependencies:
>>     libpq-dev : Depends: libpq5 (= 10.3-1.pgdg18.04+1) but it is not going to be installed
>>     pgadmin3 : Depends: libgcrypt20 (>= 1.8.0) but 1.7.8-2ubuntu1 is to be installed
>>                Depends: libpq5 (>= 8.4~) but it is not going to be installed
>>                Recommends: pgagent but it is not going to be installed
>>[...]
> 
> If it where me I would simplify the above for the moment to :
> 
> apt-get install postgresql-10

Tried on a fresh Ubuntu-17.10 install (with no postgresql at all installed)
but similar problem persists with the postgresql from the pgdg bionic repo:

   # apt-get install postgresql-10
   ...
   The following packages have unmet dependencies:
    postgresql-10 : Depends: postgresql-client-10
                    Depends: libicu60 (>= 60.1-1~) but it is not installable
                    Depends: libpq5 (>= 9.3~) but it is not going to be installed
                    Depends: libssl1.1 (>= 1.1.0) but it is not installable
                    Recommends: sysstat but it is not going to be installed
   E: Unable to correct problems, you have held broken packages.

>> Is there any reason now not to conclude that the 10.3 bionic version is
>> simply incompatible with Ubuntu-17.10 (at least without a lot more package
>> wrangling chops than I have)?
>>
>> One can install postgresql-10.1 but one cannot upgrade it to get security
>> fixes or to be able to load data dumped from another 10.3 database.
>>
>> Given that Ubuntu-18.04 will be out soon I guess this is pretty much moot
>> except for a few unfortunates like me who absolutely need 10.3 but have no
>> option to upgrade.  I guess the lesson is that running the Pgdg versions
>> of Postgresql on any but the LTS versions of Ubuntu is pretty risky.
>> Live and learn.  Maybe this will help someone else.



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Adrian Klaver
Date:
On 03/21/2018 10:59 AM, Stuart McGraw wrote:
> On 03/21/2018 07:02 AM, Adrian Klaver wrote:
>> On 03/20/2018 10:52 PM, Stuart McGraw wrote:
>> Looks like these posts are coming through a news group to me.
>> I am Ccing list to get response back there.
> 
> Is this something I am doing wrong?  I am posting through the gmane 
> newsgroup
> which in turn is bi-directionally gatewayed to the list AIUI.

Probably more on my side. I use Reply All and that tells me it will not 
post back to a newsgroup address, so unless the -general address is the 
From: or Cc: it is just going back to you directly From: me only. I just 
CCed the list back in to get the thread back in front of more eyes.

> 

>> If it where me I would simplify the above for the moment to :
>>
>> apt-get install postgresql-10
> 
> Tried on a fresh Ubuntu-17.10 install (with no postgresql at all installed)
> but similar problem persists with the postgresql from the pgdg bionic repo:
> 
>    # apt-get install postgresql-10
>    ...
>    The following packages have unmet dependencies:
>     postgresql-10 : Depends: postgresql-client-10
>                     Depends: libicu60 (>= 60.1-1~) but it is not 
> installable
>                     Depends: libpq5 (>= 9.3~) but it is not going to be 
> installed
>                     Depends: libssl1.1 (>= 1.1.0) but it is not installable
>                     Recommends: sysstat but it is not going to be installed
>    E: Unable to correct problems, you have held broken packages.
> 

Looks like forward compatibility issues, your 17.10 does not have the 
newer versions of files needed by the 18.04 Postgres packages and it 
will not install them as they probably would break other programs in 
17.10.  If it does not work going forward maybe it will work going 
backward, see if you have any better luck using the 16.04(Xenial) repo.


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/21/2018 11:12 AM, Vincenzo Romano wrote:
>> On 03/20/2018 10:52 PM, Stuart McGraw wrote:
>[...]
>>> Is there any reason now not to conclude that the 10.3 bionic version is
>>> simply incompatible with Ubuntu-17.10 (at least without a lot more package
>>> wrangling chops than I have)?
>>>
>>> One can install postgresql-10.1 but one cannot upgrade it to get security
>>> fixes or to be able to load data dumped from another 10.3 database.
>>>
>>> Given that Ubuntu-18.04 will be out soon I guess this is pretty much moot
>>> except for a few unfortunates like me who absolutely need 10.3 but have no
>>> option to upgrade.  I guess the lesson is that running the Pgdg versions
>>> of Postgresql on any but the LTS versions of Ubuntu is pretty risky.
>>> Live and learn.  Maybe this will help someone else.
> 
> I have followed more than once the exact directions from the download page:
> 
> https://www.postgresql.org/download/linux/ubuntu/
> 
> Just pretend you are running 17.10 instead of 17.04.
> 
> It simply works.

Thanks Vincenzo.  You meant "pretend you are running 17.04 instead of
17.10", yes?

I followed those directions exactly too but the results for me are that
postgresql-10.1 gets installed, not 10.3 which is what I need.

Also, just for the record, I had a version problem with postgresql-10.1
too: the libdbd-pg-perl installed with postgresql-10 and with Ubuntu
conflicted.  After a couple days of research I was able to force the
install of a compatible version which worked with both, but it definitely
wasn't "simply worked" for me.



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/21/2018 12:14 PM, Adrian Klaver wrote:
> On 03/21/2018 10:59 AM, Stuart McGraw wrote:
>> On 03/21/2018 07:02 AM, Adrian Klaver wrote:
>>> On 03/20/2018 10:52 PM, Stuart McGraw wrote:
>[...]
>>> If it where me I would simplify the above for the moment to :
>>> apt-get install postgresql-10
>>
>> Tried on a fresh Ubuntu-17.10 install (with no postgresql at all installed)
>> but similar problem persists with the postgresql from the pgdg bionic repo:
>>
>>    # apt-get install postgresql-10
>>    ...
>>    The following packages have unmet dependencies:
>>     postgresql-10 : Depends: postgresql-client-10
>>                     Depends: libicu60 (>= 60.1-1~) but it is not installable
>>                     Depends: libpq5 (>= 9.3~) but it is not going to be installed
>>                     Depends: libssl1.1 (>= 1.1.0) but it is not installable
>>                     Recommends: sysstat but it is not going to be installed
>>    E: Unable to correct problems, you have held broken packages.
>
> Looks like forward compatibility issues, your 17.10 does not have the
> newer versions of files needed by the 18.04 Postgres packages and it
> will not install them as they probably would break other programs in
> 17.10.  If it does not work going forward maybe it will work going
> backward, see if you have any better luck using the 16.04(Xenial)
> repo.

Thanks, I forgot that the older repos also received the pg-10 update.
Unfortunately but no luck with Xenial either, slightly different
but similar conflicts.

My main motivation for updating to 10.3 was to be able to load data
dumped from a 10.3 database.  pg_restore complained about "unsupported
version (1.13) in file header".  However I just discovered I can load
a plain sql dump from that database so panic mode is over :-) and I
can wait until I can upgrade my machine to ubuntu-18.04.

It still seems to me that the best advice for using Postgresql on
Ubuntu is to use the Ubuntu version of Postgresql if you don't need
the latest version; if you do need latest version, use the Pgdg
version but only with a LTS version of Ubuntu.

If you need the latest version of both Ubuntu and Postgresql, you
may be out of luck.



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Rob Sargent
Date:
> Thanks, I forgot that the older repos also received the pg-10 update.
> Unfortunately but no luck with Xenial either, slightly different
> but similar conflicts.
>
> My main motivation for updating to 10.3 was to be able to load data
> dumped from a 10.3 database.  pg_restore complained about "unsupported
> version (1.13) in file header".  However I just discovered I can load
> a plain sql dump from that database so panic mode is over :-) and I
> can wait until I can upgrade my machine to ubuntu-18.04.
>
> It still seems to me that the best advice for using Postgresql on
> Ubuntu is to use the Ubuntu version of Postgresql if you don't need
> the latest version; if you do need latest version, use the Pgdg
> version but only with a LTS version of Ubuntu.
>
> If you need the latest version of both Ubuntu and Postgresql, you
> may be out of luck.
>
>
Or you compile it?


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Adrian Klaver
Date:
On 03/21/2018 01:31 PM, Stuart McGraw wrote:
> On 03/21/2018 12:14 PM, Adrian Klaver wrote:
>> On 03/21/2018 10:59 AM, Stuart McGraw wrote:
>>> On 03/21/2018 07:02 AM, Adrian Klaver wrote:
>>>> On 03/20/2018 10:52 PM, Stuart McGraw wrote:
>> [...]
>>>> If it where me I would simplify the above for the moment to :
>>>> apt-get install postgresql-10
>>>
>>> Tried on a fresh Ubuntu-17.10 install (with no postgresql at all 
>>> installed)
>>> but similar problem persists with the postgresql from the pgdg bionic 
>>> repo:
>>>
>>>    # apt-get install postgresql-10
>>>    ...
>>>    The following packages have unmet dependencies:
>>>     postgresql-10 : Depends: postgresql-client-10
>>>                     Depends: libicu60 (>= 60.1-1~) but it is not 
>>> installable
>>>                     Depends: libpq5 (>= 9.3~) but it is not going to 
>>> be installed
>>>                     Depends: libssl1.1 (>= 1.1.0) but it is not 
>>> installable
>>>                     Recommends: sysstat but it is not going to be 
>>> installed
>>>    E: Unable to correct problems, you have held broken packages.
>>
>> Looks like forward compatibility issues, your 17.10 does not have the
>> newer versions of files needed by the 18.04 Postgres packages and it
>> will not install them as they probably would break other programs in
>> 17.10.  If it does not work going forward maybe it will work going
>> backward, see if you have any better luck using the 16.04(Xenial)
>> repo.
> 
> Thanks, I forgot that the older repos also received the pg-10 update.
> Unfortunately but no luck with Xenial either, slightly different
> but similar conflicts.
> 
> My main motivation for updating to 10.3 was to be able to load data
> dumped from a 10.3 database.  pg_restore complained about "unsupported
> version (1.13) in file header".  However I just discovered I can load
> a plain sql dump from that database so panic mode is over :-) and I
> can wait until I can upgrade my machine to ubuntu-18.04.

Yeah, pg_restore from 10.x < 10.3 will not restore a custom format dump 
from 10.3. Pretty sure it has to do with this:

https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path

> 
> It still seems to me that the best advice for using Postgresql on
> Ubuntu is to use the Ubuntu version of Postgresql if you don't need
> the latest version; if you do need latest version, use the Pgdg
> version but only with a LTS version of Ubuntu.
> 
> If you need the latest version of both Ubuntu and Postgresql, you
> may be out of luck.

I stick to LTS releases of Ubuntu as the in between releases tend to be 
too experimental for my taste:) Also the upgrades come to close together.


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/21/2018 02:37 PM, Rob Sargent wrote:
>> Thanks, I forgot that the older repos also received the pg-10 update.
>> Unfortunately but no luck with Xenial either, slightly different
>> but similar conflicts.
>>
>> My main motivation for updating to 10.3 was to be able to load data
>> dumped from a 10.3 database.  pg_restore complained about "unsupported
>> version (1.13) in file header".  However I just discovered I can load
>> a plain sql dump from that database so panic mode is over :-) and I
>> can wait until I can upgrade my machine to ubuntu-18.04.
>>
>> It still seems to me that the best advice for using Postgresql on
>> Ubuntu is to use the Ubuntu version of Postgresql if you don't need
>> the latest version; if you do need latest version, use the Pgdg
>> version but only with a LTS version of Ubuntu.
>>
>> If you need the latest version of both Ubuntu and Postgresql, you
>> may be out of luck.
>>
> Or you compile it?

That was going to be my next step.  But I don't think a simple compile
from source would do because Ubuntu's package manager wouldn't be aware
that Postgresql was now available to satisfy other packages' dependencies.
So I would need to rebuild the Ubuntu source package.  I have done that
on Fedora several times where it has been, in my limited experience,
usually simple and problem free.  But I have read that building packages
on Ubuntu is much more arcane so I wasn't looking forward to it.





Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/21/2018 02:38 PM, Adrian Klaver wrote:
> On 03/21/2018 01:31 PM, Stuart McGraw wrote:
>> On 03/21/2018 12:14 PM, Adrian Klaver wrote:
>[...]
>> It still seems to me that the best advice for using Postgresql on
>> Ubuntu is to use the Ubuntu version of Postgresql if you don't need
>> the latest version; if you do need latest version, use the Pgdg
>> version but only with a LTS version of Ubuntu.
>>
>> If you need the latest version of both Ubuntu and Postgresql, you
>> may be out of luck.
> 
> I stick to LTS releases of Ubuntu as the in between releases tend to be too experimental for my taste:) Also the
upgradescome to close together.
 

Well, I'm coming to Ubuntu from Fedora so I'm kind of use to that. :-)
But I think I will stay with 18.04 LTS after it is released.



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Adrian Klaver
Date:
On 03/21/2018 01:59 PM, Stuart McGraw wrote:
> On 03/21/2018 02:37 PM, Rob Sargent wrote:
>>> Thanks, I forgot that the older repos also received the pg-10 update.
>>> Unfortunately but no luck with Xenial either, slightly different
>>> but similar conflicts.
>>>
>>> My main motivation for updating to 10.3 was to be able to load data
>>> dumped from a 10.3 database.  pg_restore complained about "unsupported
>>> version (1.13) in file header".  However I just discovered I can load
>>> a plain sql dump from that database so panic mode is over :-) and I
>>> can wait until I can upgrade my machine to ubuntu-18.04.
>>>
>>> It still seems to me that the best advice for using Postgresql on
>>> Ubuntu is to use the Ubuntu version of Postgresql if you don't need
>>> the latest version; if you do need latest version, use the Pgdg
>>> version but only with a LTS version of Ubuntu.
>>>
>>> If you need the latest version of both Ubuntu and Postgresql, you
>>> may be out of luck.
>>>
>> Or you compile it?
> 
> That was going to be my next step.  But I don't think a simple compile
> from source would do because Ubuntu's package manager wouldn't be aware
> that Postgresql was now available to satisfy other packages' dependencies.
> So I would need to rebuild the Ubuntu source package.  I have done that
> on Fedora several times where it has been, in my limited experience,
> usually simple and problem free.  But I have read that building packages
> on Ubuntu is much more arcane so I wasn't looking forward to it.

That is pretty much the case when you build from source, it will live 
outside the OS packaging universe. I have built from source on Ubuntu it 
is not any more difficult then other distros, just remember to install 
build-essential. As far a dependencies basically the only things that 
will have a Postgres dependency will be other Postgres software e.g. 
psycopg2, etc. That means you will need to build them from source also, 
though that is helped along by pg_config which will find your source 
install and build the other software to match. It also means 
uninstalling the Ubuntu Postgres packages so you don't cross contaminate.


> 
> 
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Rob Sargent
Date:
Or you compile it?
>>
>> That was going to be my next step.  But I don't think a simple compile
>> from source would do because Ubuntu's package manager wouldn't be aware
>> that Postgresql was now available to satisfy other packages' 
>> dependencies.
>> So I would need to rebuild the Ubuntu source package.  I have done that
>> on Fedora several times where it has been, in my limited experience,
>> usually simple and problem free.  But I have read that building packages
>> on Ubuntu is much more arcane so I wasn't looking forward to it.
>
> That is pretty much the case when you build from source, it will live 
> outside the OS packaging universe. I have built from source on Ubuntu 
> it is not any more difficult then other distros, just remember to 
> install build-essential. As far a dependencies basically the only 
> things that will have a Postgres dependency will be other Postgres 
> software e.g. psycopg2, etc. That means you will need to build them 
> from source also, though that is helped along by pg_config which will 
> find your source install and build the other software to match. It 
> also means uninstalling the Ubuntu Postgres packages so you don't 
> cross contaminate.
>
>
And I would have expected to need to get a current library or two and 
thence a custom load path.  That said, it might not have taken as long 
as the packaged based efforts.  Nothing near as quick as realizing one 
can just load the sql though!
>>
>>
>>
>>
>>
>
>



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Stuart McGraw
Date:
On 03/21/2018 03:08 PM, Adrian Klaver wrote:
> On 03/21/2018 01:59 PM, Stuart McGraw wrote:
>> On 03/21/2018 02:37 PM, Rob Sargent wrote:
>>>> Thanks, I forgot that the older repos also received the pg-10 update.
>>>> Unfortunately but no luck with Xenial either, slightly different
>>>> but similar conflicts.
>>>>
>>>> My main motivation for updating to 10.3 was to be able to load data
>>>> dumped from a 10.3 database.  pg_restore complained about "unsupported
>>>> version (1.13) in file header".  However I just discovered I can load
>>>> a plain sql dump from that database so panic mode is over :-) and I
>>>> can wait until I can upgrade my machine to ubuntu-18.04.
>>>>
>>>> It still seems to me that the best advice for using Postgresql on
>>>> Ubuntu is to use the Ubuntu version of Postgresql if you don't need
>>>> the latest version; if you do need latest version, use the Pgdg
>>>> version but only with a LTS version of Ubuntu.
>>>>
>>>> If you need the latest version of both Ubuntu and Postgresql, you
>>>> may be out of luck.
>>>>
>>> Or you compile it?
>>
>> That was going to be my next step.  But I don't think a simple compile
>> from source would do because Ubuntu's package manager wouldn't be aware
>> that Postgresql was now available to satisfy other packages' dependencies.
>> So I would need to rebuild the Ubuntu source package.  I have done that
>> on Fedora several times where it has been, in my limited experience,
>> usually simple and problem free.  But I have read that building packages
>> on Ubuntu is much more arcane so I wasn't looking forward to it.
> 
> That is pretty much the case when you build from source, it will live outside the OS packaging universe. I have built
fromsource on Ubuntu it is not any more difficult then other distros, just remember to install build-essential. As far
adependencies basically the only things that will have a Postgres dependency will be other Postgres software e.g.
psycopg2,etc. That means you will need to build them from source also, though that is helped along by pg_config which
willfind your source install and build the other software to match. It also means uninstalling the Ubuntu Postgres
packagesso you don't cross contaminate.
 

I wasn't thinking of building Postgresql from the postgresql.org
tarball -- I think that's what you are suggesting?  I agree that
in and of itself is not a problem.  The problem for me is (or
would have been), as you say, the corequisite rebuilding from
source of other packages.  Besides python's psycopg2 I have
critical tools that use libdbd-pg-perl or libpq directly like
the Bacula backup system.

So what I was thinking of was rebuilding the Pgdg Ubuntu source
package (I'm assuming one is available somewhere).  I have had
good results on Fedora backporting current versions of Postgresql
from later fedora's to my invariably outdated version of Fedora
by rebuilding the later version's Fedora postgresql source rpm.
This produces an installable binary package that will satisfy
the dependencies of all those other programs eliminating the
need to rebuild them.  I was guessing I could do something
similar in the Ubuntu world.  But, moot now fortunately :-)



Re: postgresql-10.3 on unbuntu-17.10 - how??

From
Christoph Berg
Date:
Re: Stuart McGraw 2018-03-23 <b6b63791-71bc-b005-8d12-8f823e985673@mtneva.com>
> So what I was thinking of was rebuilding the Pgdg Ubuntu source
> package (I'm assuming one is available somewhere).  I have had
> good results on Fedora backporting current versions of Postgresql
> from later fedora's to my invariably outdated version of Fedora
> by rebuilding the later version's Fedora postgresql source rpm.
> This produces an installable binary package that will satisfy
> the dependencies of all those other programs eliminating the
> need to rebuild them.  I was guessing I could do something
> similar in the Ubuntu world.  But, moot now fortunately :-)

Fwiw, all the packages on apt.postgresql.org are built from the same
source package for all distributions (with only the version number
changed to reflect the build target), so simply rebuilding the source
package for your OS would definitely work.

"apt-get source postgresql-10" will download it.

(Fine print: there's a few tweaks [1] applied to cater for older
distributions that lack newer features, e.g. the postgresql-10
(source) package in Debian wheezy and Ubuntu trusty disables the
systemd support, but that's rare exceptions, and really only applies
to the "old" distributions still supported.)

Re the original "where is artful" question, we try to support the
non-LTS releases, but it didn't work out this time. We'll add 18.10
if it becomes clear that the 18.04 LTS packages are incompatible with
it.

Christoph

[1] https://git.postgresql.org/gitweb/?p=pgapt.git;a=blob;f=jenkins/generate-pgdg-source;hb=HEAD#l181