Subject: PostgreSQL Minor Release Retention Policy

From: Jason Petersen <[email-masked]>
Date: Thu, 6 Oct 2016 14:04:27 -0600

In a blog post, Devrim wrote: "This means, when there is new release available, we will delete n-3th one. This is a policy to keep the repo clean. This does not apply for PostgreSQL major releases”

I take it this actually means release and not version, right? For instance, last I checked we had 9.5.3-2, 9.5.4-1, and 9.5.4-2 in there. So if I know I’m on 9.5.4, I’m not automatically safe until 9.5.7… my package may disappear as soon as 9.5.5 if there is enough RPM release churn?

This makes it pretty unsafe to hardcode a full version specifier in e.g. a Dockerfile or other system meant to produce repeatable results, but I suppose people can just run their own package mirrors if they desire a different retention policy.

Just wanting some clarity on my interpretation, though. Thanks!

--
Jason Petersen
Software Engineer | Citus Data
303.736.9255
[email-masked]

---

From: Devrim Gündüz <[email-masked]>
Date: Fri, 07 Oct 2016 00:31:24 +0300

Hi Jason,

On Thu, 2016-10-06 at 14:04 -0600, Jason Petersen wrote:
> In a blog post, Devrim wrote: "This means, when there is new release
> available, we will delete n-3th one. This is a policy to keep the repo clean.
> This does not apply for PostgreSQL major releases”
> 
> I take it this actually means release and not version, right? For instance,
> last I checked we had 9.5.3-2, 9.5.4-1, and 9.5.4-2 in there. So if I know
> I’m on 9.5.4, I’m not automatically safe until 9.5.7… my package may
> disappear as soon as 9.5.5 if there is enough RPM release churn?

repomanage script, ( part of yum-utils and dnf) that we use for cleaning up old
packages, has this option:

  -k KEEP, --keep=KEEP  newest N packages to keep - defaults to 1

So, I set -k 3 in our sync scripts.

What does it mean? Under normal circumstances, if we don't make any packaging
mistakes, when we release 9.5.5, then 9.5.2 will be removed, so we'll keep the
latest 3 versions.

However, there is a minor potential problem in here: If we release 9.5.5-2,
then 9.5.3 will be removed, so practically we'll have only 2 versions (?).

> This makes it pretty unsafe to hardcode a full version specifier in e.g. a
> Dockerfile or other system meant to produce repeatable results, but I suppose
> people can just run their own package mirrors if they desire a different
> retention policy.

Right. 

Why do you hardcode postgresql RPMs in Dockerfile, btw? 

Regards,
-- 
Devrim GÜNDÜZ
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR