Subject: please build packages --with-lz4

From: Justin Pryzby <[email-masked]>
Date: Sun, 21 Mar 2021 21:03:59 -0500

Would you plan to build packages --with-lz4 ?

See commit bbe0a81db69bd10bd166907c3701492a29aca294
    Allow configurable LZ4 TOAST compression.

Also, a reminder about this old thread.
The devel packages should be built with a versions like (I think)
0.1.14.0-alpha*

postgresql14.x86_64                                                                               14-alpha_20210322_PGDG.rhel7                                                                               pgdg14-updates-testing

On Thu, Apr 09, 2020 at 11:56:01AM -0500, Justin Pryzby wrote:
> On Thu, 2019-05-23 at 09:55 -0500, Justin Pryzby wrote:
> > > I'm wondering how versioning on PGDG RPMs is intended to work.
> > > Yum seems to thinks that the "nightly builds" are of higher version number
> > > than beta.
> > > [pryzbyj@dev ~]$ yum list --enablerepo='pgdg12-updates-testing' --showdu postgresql12
> > > Installed Packages postgresql12.x86_64             12.0-1devel_20190502_1PGDG.rhel7                  @pgdg12-updates-testing
> > > Available Packages postgresql12.x86_64             12beta1-1PGDG.rhel7                               pgdg12-updates-testing 
> 
> On Thu, Jun 06, 2019 at 11:15:58AM +0100, Devrim Gündüz wrote:
> > Oops, I did it again :-( Let's review this once we start releasing 13 devel
> > RPMs after summer.
> 
> On Thu, Apr 09, 2020 at 12:24:29AM +0100, Devrim Gündüz wrote:
> > On Wed, 2020-04-08 at 10:47 -0500, Justin Pryzby wrote:
> > > A reminder about this.
> > > The versions should sort like:
> > > 
> > > nightly build < beta < rc < released
> > 
> > Can you please send a patch?
> 
> I'm sorry, but I don't know anything about building RPMs.
> 
> When I mentioned last year, it looked like:
> > > postgresql12.x86_64             12.0-1devel_20190502_1PGDG.rhel7                  @pgdg12-updates-testing
> > > postgresql12.x86_64             12beta1-1PGDG.rhel7                               pgdg12-updates-testing 
> 
> That's an issue since "12" sorts lower than "12beta1", which means that the
> devel => beta upgrade didn't work correctly (I don't remember, but that maybe
> also broke the beta/rc => 13.0 release upgrade).
> 
> The curent package looks like:
> postgresql13.x86_64                 13.0-20200407_devel_1PGDG.rhel7   @pgdg13-updates-testing
> 
> I think that will be an issue again when you release beta1, unless you name it
> something weird like 20200601beta1.
> 
> I found:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
> |Prerelease versions
> |In the Version: tag, use the version that upstream has determined the next release will be. For the field of the Release: tag, use a number of the form "0.N" where N is an integer beginning with 1 and increasing for each revision of the package. Prerelease versions MUST use a Release: tag strictly less than 1, as this is the sole indicator that a prerelease has been packaged.
> 
> So I *think* the devel release should be called something like this with a
> leading "0.0":
> 
> postgresql13-13.0.0.20200407git[...]
> 
> And then beta1 can use a leading "0.1" or (according to that doc) "~":
> postgresql13-13.0.1.beta1 
> postgresql13-13.0~beta1
> 
> "r" follows "b" so "rc" will work right using the same convention.
> postgresql13-13.0.1.rc1 
> postgresql13-13.0~rc1
> 
> And then I think it's finally released as:
> postgresql13-13.0 (here, the "release tag" is 1):
> 
> -- 
> Justin

-- 
Justin Pryzby
System Administrator
Telsasoft
+1-952-707-8581

---

From: Stephen Frost <[email-masked]>
Date: Mon, 22 Mar 2021 10:45:08 -0400

Greetings,

> The devel packages should be built with a versions like (I think)

I have to wonder why we aren't just automatically checking if lz4 is
available and enabling it when it is...

Thanks,

Stephen

---

From: Justin Pryzby <[email-masked]>
Date: Mon, 22 Mar 2021 10:20:34 -0500

> available and enabling it when it is...

I assume you mean at compile time, regarding autoconf macros ?

This probably doesn't apply to PGDG, but as I recall at least within debian,
there's a preference to build either --with-... or --without-.., so that a
library which happens to be installed doesn't create a package with an
unintentional dependency, or a library which is not installed or something
broken/incompatible doesn't result in a package without the intended
dependency.

-- 
Justin

---

From: Stephen Frost <[email-masked]>
Date: Mon, 22 Mar 2021 11:58:13 -0400

Greetings,

> I assume you mean at compile time, regarding autoconf macros ?

Yes, talking about picking things up at compile time.

> broken/incompatible doesn't result in a package without the intended

I'm just voicing my annoyence that we don't just automatically pick
things up when they're available- sure, packagers might want to go
through and add --without-whatever in situations where they don't want
something, but making everyone have to go add --with-whatever whenever
we add new dependencies doesn't strike me as useful.

Thanks,

Stephen

---

From: Devrim Gündüz <[email-masked]>
Date: Mon, 22 Mar 2021 16:03:43 +0000

Hi Justin,

> Would you plan to build packages --with-lz4 ?

Already done, about 1h before you sent the email :) Latest snapshot
RPMs are built with lz4 compression support.

Regards,
-- 
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

---

From: Devrim Gündüz <[email-masked]>
Date: Mon, 22 Mar 2021 16:05:08 +0000

Hi,

> available and enabling it when it is...

We also need to dependencies, maybe some new files to the spec file. It
is not just adding --with-foobar:

https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blobdiff;f=rpm/redhat/master/non-common/postgresql-14/main/postgresql-14.spec;h=3a39c1402c9a871211a8434419a7d460615c3ede;hp=81ff7bcc4faeab7f0da05a3a25d453773488fca3;hb=0d02a409cef99818eb537759be84d693b077b1b1;hpb=99fc6554190344dd22b96961adaea5bd4292e146

Regards,

---

From: Stephen Frost <[email-masked]>
Date: Mon, 22 Mar 2021 12:06:22 -0400

Greetings,

> is not just adding --with-foobar:

Sure, of course, not saying that you wouldn't need to do those other
things, just seems unnecessary for PG itself to require the --with bit,
but I suppose that's just how it is.  Just annoying imv.

Thanks,

Stephen

---

From: Christoph Berg <[email-masked]>
Date: Tue, 23 Mar 2021 12:59:09 +0100

Re: Justin Pryzby
> broken/incompatible doesn't result in a package without the intended

There is some value in making explicit statements in configure flags,
but if the package declares "Build-Depends: liblz4-dev" and then
configure picks that up automatically, there is not that much room for
unwanted surprises.

If we chose to deliberately go without lz4 support I'd in fact put a
--without-lz4 into the list of options.

The deeper question here is I guess, if lz4 is better than pglz, and
besides why isn't --with-lz4 the default, why isn't it the default for
all columns but needs some obsure GUC set?

Christoph