Обсуждение: repmgr 3.x releases in Postgres PPA for Ubuntu Trusty

Поиск
Список
Период
Сортировка

repmgr 3.x releases in Postgres PPA for Ubuntu Trusty

От
Jonathan Heard
Дата:
Hi Folks,

   We use Puppet in our environments to be able to quickly roll out 
identical Postgres clusters with repmgr - we've not built one for a 
while but had a business need to do so on Friday and the build failed. 
The root cause of this is because the Postgres PPA has completely 
removed repmgr 3.3.2  for Ubuntu 'Trusty' (14.04) and replaced it with 
repmgr 4.x which is a major release update with breaking changes to both 
its configuration files and its schema requirements.

Is it intentional that the older version has been completely removed? 
Version 2.x is still present so it seems to me like it's an oversight 
that a 3.x package isn't there.

This is unfortunately a major headache for me because I cannot simply 
upgrade to version 4.0 without updating our Puppet automation and 
significant testing. For a consistent environment I'd also need to 
upgrade all live databases in order to build just one new one :-(

I can't even find an old copy for the 3.3.2 package at the moment so I'm 
faced with the prospect of building it from source which could easily 
result in a slightly different binary unless I can replicate build 
environment and configure options used for the original package.

Is anyone able to resurrect the 3.x release in the Postgres PPA please? 
I suspect I'm not the only person who's going to be bitten by this :-/

Any help would be very much appreciated

Regards

Jonathan Heard



Re: repmgr 3.x releases in Postgres PPA for Ubuntu Trusty

От
Marco Nenciarini
Дата:
Il 04/12/17 11:19, Jonathan Heard ha scritto:
> Hi Folks,
>
>   We use Puppet in our environments to be able to quickly roll out
> identical Postgres clusters with repmgr - we've not built one for a
> while but had a business need to do so on Friday and the build failed.
> The root cause of this is because the Postgres PPA has completely
> removed repmgr 3.3.2  for Ubuntu 'Trusty' (14.04) and replaced it with
> repmgr 4.x which is a major release update with breaking changes to both
> its configuration files and its schema requirements.
>
> Is it intentional that the older version has been completely removed?
> Version 2.x is still present so it seems to me like it's an oversight
> that a 3.x package isn't there.
>
> This is unfortunately a major headache for me because I cannot simply
> upgrade to version 4.0 without updating our Puppet automation and
> significant testing. For a consistent environment I'd also need to
> upgrade all live databases in order to build just one new one :-(
>
> I can't even find an old copy for the 3.3.2 package at the moment so I'm
> faced with the prospect of building it from source which could easily
> result in a slightly different binary unless I can replicate build
> environment and configure options used for the original package.
>
> Is anyone able to resurrect the 3.x release in the Postgres PPA please?
> I suspect I'm not the only person who's going to be bitten by this :-/
>
> Any help would be very much appreciated
>

Hi Jonathan,

you can find the old repmgr packages in http://atalia.postgresql.org/morgue/

For convenience 2ndQuadrant has created a repository using the rempgr
3.3.2 packages from the morgue.

Beware that these packages will not be updated, and are there only to
facilitate the migration to repmgr4.

Instructions follows:

apt-key adv --fetch-keys
http://packages.2ndquadrant.com/repmgr3/apt/0xD3FA41F6.asc

echo deb http://packages.2ndquadrant.com/repmgr3/apt/ $(lsb_release
-cs)-2ndquadrant main > /etc/apt/sources.list.d/repmgr3.list

Regards,
Marco

--
Marco Nenciarini - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it


Вложения

Re: repmgr 3.x releases in Postgres PPA for Ubuntu Trusty

От
Jonathan Heard
Дата:
Hi Marco,

Fantastic! Thank you for such a quick response. It's great news that the 
package still exists.

It's a pity that this is moved to a whole new repo though as I'll need 
to either mirror the whole repo into our secure (i.e. not internet 
connected) environments or extract the dependency tree to our general 
purpose internal repo. I'll have to deal with this, however...

I strongly feel that it's a really bad practice for the major version of 
repmgr to have been silently upgraded against a existing minor release 
of Postgres. In our case we're using 9.5 and have not upgraded - 
generally breaking changes should only occur in major release updates 
therefore Postgres 9.5 (and really, all 9.x releases) should be bound to 
repmgr 3.x by default.

Notwithstanding I'm very grateful for the time any effort that you and 
the community put into creating and maintaining these packages.

Many Thanks, and best regards

Jonathan



On 04/12/17 10:38, Marco Nenciarini wrote:
> Il 04/12/17 11:19, Jonathan Heard ha scritto:
>> Hi Folks,
>>
>>    We use Puppet in our environments to be able to quickly roll out
>> identical Postgres clusters with repmgr - we've not built one for a
>> while but had a business need to do so on Friday and the build failed.
>> The root cause of this is because the Postgres PPA has completely
>> removed repmgr 3.3.2  for Ubuntu 'Trusty' (14.04) and replaced it with
>> repmgr 4.x which is a major release update with breaking changes to both
>> its configuration files and its schema requirements.
>>
>> Is it intentional that the older version has been completely removed?
>> Version 2.x is still present so it seems to me like it's an oversight
>> that a 3.x package isn't there.
>>
>> This is unfortunately a major headache for me because I cannot simply
>> upgrade to version 4.0 without updating our Puppet automation and
>> significant testing. For a consistent environment I'd also need to
>> upgrade all live databases in order to build just one new one :-(
>>
>> I can't even find an old copy for the 3.3.2 package at the moment so I'm
>> faced with the prospect of building it from source which could easily
>> result in a slightly different binary unless I can replicate build
>> environment and configure options used for the original package.
>>
>> Is anyone able to resurrect the 3.x release in the Postgres PPA please?
>> I suspect I'm not the only person who's going to be bitten by this :-/
>>
>> Any help would be very much appreciated
>>
> Hi Jonathan,
>
> you can find the old repmgr packages in http://atalia.postgresql.org/morgue/
>
> For convenience 2ndQuadrant has created a repository using the rempgr
> 3.3.2 packages from the morgue.
>
> Beware that these packages will not be updated, and are there only to
> facilitate the migration to repmgr4.
>
> Instructions follows:
>
> apt-key adv --fetch-keys
> http://packages.2ndquadrant.com/repmgr3/apt/0xD3FA41F6.asc
>
> echo deb http://packages.2ndquadrant.com/repmgr3/apt/ $(lsb_release
> -cs)-2ndquadrant main > /etc/apt/sources.list.d/repmgr3.list
>
> Regards,
> Marco
>



Re: repmgr 3.x releases in Postgres PPA for Ubuntu Trusty

От
Jonathan Heard
Дата:
Hi Marco,

    We've taken the decision to upgrade to repmgr 4.x because sticking 
with the old version is complex and leaves us 'frozen in time' without 
any updates etc..

Unfortunately, I've hit a show-stopped bug in version 4 :-(   The repo 
gives us 4.0.0-2.pgdg14.04+2 but the SQL query for 'repmgr cluster show' 
is broken. We don't use the 'repmgr' user and have fallen foul of the 
oversight which is fixed the following commit:

| * commit 3e4a5e6ff5f386391c06aa639fbd8ff6299e1db6
| | Author: Martín Marqués <martin.marques@2ndquadrant.com>
| | Date:   Wed Nov 22 17:13:58 2017 -0300
| |
| |     Fix missing FQN for the nodes table.
| |
| |     This bug was not detected before because most users work with 
the repmgr
| |     user. For that reason, the repmgr schema is already in the 
search_path
| |     by default.
| |
| |     Add the repmgr schema to the nodes table in the LEFT JOIN used for
| |     cluster show (and in other places)

The above commit is is rolled up into v4.0.1 so do you know when this 
will be released to the PPA please?

Thanks
Jonathan

On 04/12/17 10:38, Marco Nenciarini wrote:
> Il 04/12/17 11:19, Jonathan Heard ha scritto:
>> Hi Folks,
>>
>>    We use Puppet in our environments to be able to quickly roll out
>> identical Postgres clusters with repmgr - we've not built one for a
>> while but had a business need to do so on Friday and the build failed.
>> The root cause of this is because the Postgres PPA has completely
>> removed repmgr 3.3.2  for Ubuntu 'Trusty' (14.04) and replaced it with
>> repmgr 4.x which is a major release update with breaking changes to both
>> its configuration files and its schema requirements.
>>
>> Is it intentional that the older version has been completely removed?
>> Version 2.x is still present so it seems to me like it's an oversight
>> that a 3.x package isn't there.
>>
>> This is unfortunately a major headache for me because I cannot simply
>> upgrade to version 4.0 without updating our Puppet automation and
>> significant testing. For a consistent environment I'd also need to
>> upgrade all live databases in order to build just one new one :-(
>>
>> I can't even find an old copy for the 3.3.2 package at the moment so I'm
>> faced with the prospect of building it from source which could easily
>> result in a slightly different binary unless I can replicate build
>> environment and configure options used for the original package.
>>
>> Is anyone able to resurrect the 3.x release in the Postgres PPA please?
>> I suspect I'm not the only person who's going to be bitten by this :-/
>>
>> Any help would be very much appreciated
>>
> Hi Jonathan,
>
> you can find the old repmgr packages in http://atalia.postgresql.org/morgue/
>
> For convenience 2ndQuadrant has created a repository using the rempgr
> 3.3.2 packages from the morgue.
>
> Beware that these packages will not be updated, and are there only to
> facilitate the migration to repmgr4.
>
> Instructions follows:
>
> apt-key adv --fetch-keys
> http://packages.2ndquadrant.com/repmgr3/apt/0xD3FA41F6.asc
>
> echo deb http://packages.2ndquadrant.com/repmgr3/apt/ $(lsb_release
> -cs)-2ndquadrant main > /etc/apt/sources.list.d/repmgr3.list
>
> Regards,
> Marco
>



Re: repmgr 3.x releases in Postgres PPA for Ubuntu Trusty

От
Marco Nenciarini
Дата:
Il 05/12/17 16:30, Jonathan Heard ha scritto:
> Hi Marco,
>
>    We've taken the decision to upgrade to repmgr 4.x because sticking
> with the old version is complex and leaves us 'frozen in time' without
> any updates etc..
>
> Unfortunately, I've hit a show-stopped bug in version 4 :-(   The repo
> gives us 4.0.0-2.pgdg14.04+2 but the SQL query for 'repmgr cluster show'
> is broken. We don't use the 'repmgr' user and have fallen foul of the
> oversight which is fixed the following commit:
>
> | * commit 3e4a5e6ff5f386391c06aa639fbd8ff6299e1db6
> | | Author: Martín Marqués <martin.marques@2ndquadrant.com>
> | | Date:   Wed Nov 22 17:13:58 2017 -0300
> | |
> | |     Fix missing FQN for the nodes table.
> | |
> | |     This bug was not detected before because most users work with
> the repmgr
> | |     user. For that reason, the repmgr schema is already in the
> search_path
> | |     by default.
> | |
> | |     Add the repmgr schema to the nodes table in the LEFT JOIN used for
> | |     cluster show (and in other places)
>
> The above commit is is rolled up into v4.0.1 so do you know when this
> will be released to the PPA please?
>

AFAIK the 4.0.1 release is scheduled for the next week.

Regards,
Marco

--
Marco Nenciarini - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it


Вложения

Re: repmgr 3.x releases in Postgres PPA for Ubuntu Trusty

От
Jonathan Heard
Дата:
Hi Marco,

   Just FYI there appears to be a bug in the package's scripts as per 
the below output. If I manually delete the dead symlink at 
'/etc/rc2.d/S20repmgrd' then it upgrades from 4.0.0 to 4.0.1 without any 
errors.

Thanks

Jonathan

# apt-get install postgresql-9.5-repmgr
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql-9.5-repmgr is already the newest version.
The following packages will be upgraded:
   repmgr-common
1 upgraded, 0 newly installed, 0 to remove and 69 not upgraded.
2 not fully installed or removed.
Need to get 0 B/87.1 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
(Reading database ... 40843 files and directories currently installed.)
Preparing to unpack .../repmgr-common_4.0.1-1.pgdg14.04+1_all.deb ...
invoke-rc.d: dangling symlink: /etc/rc2.d/S20repmgrd
dpkg: warning: subprocess old pre-removal script returned error exit 
status 102
dpkg: trying script from the new package instead ...
invoke-rc.d: dangling symlink: /etc/rc2.d/S20repmgrd
dpkg: error processing archive 
/var/cache/apt/archives/repmgr-common_4.0.1-1.pgdg14.04+1_all.deb 
(--unpack):
  subprocess new pre-removal script returned error exit status 102
invoke-rc.d: dangling symlink: /etc/rc2.d/S20repmgrd
dpkg: error while cleaning up:
  subprocess installed post-installation script returned error exit 
status 102
Errors were encountered while processing:
  /var/cache/apt/archives/repmgr-common_4.0.1-1.pgdg14.04+1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


On 05/12/17 15:46, Marco Nenciarini wrote:
> Il 05/12/17 16:30, Jonathan Heard ha scritto:
>> Hi Marco,
>>
>>     We've taken the decision to upgrade to repmgr 4.x because sticking
>> with the old version is complex and leaves us 'frozen in time' without
>> any updates etc..
>>
>> Unfortunately, I've hit a show-stopped bug in version 4 :-(   The repo
>> gives us 4.0.0-2.pgdg14.04+2 but the SQL query for 'repmgr cluster show'
>> is broken. We don't use the 'repmgr' user and have fallen foul of the
>> oversight which is fixed the following commit:
>>
>> | * commit 3e4a5e6ff5f386391c06aa639fbd8ff6299e1db6
>> | | Author: Martín Marqués <martin.marques@2ndquadrant.com>
>> | | Date:   Wed Nov 22 17:13:58 2017 -0300
>> | |
>> | |     Fix missing FQN for the nodes table.
>> | |
>> | |     This bug was not detected before because most users work with
>> the repmgr
>> | |     user. For that reason, the repmgr schema is already in the
>> search_path
>> | |     by default.
>> | |
>> | |     Add the repmgr schema to the nodes table in the LEFT JOIN used for
>> | |     cluster show (and in other places)
>>
>> The above commit is is rolled up into v4.0.1 so do you know when this
>> will be released to the PPA please?
>>
> AFAIK the 4.0.1 release is scheduled for the next week.
>
> Regards,
> Marco
>