Subject: Re: head fails to build on SLES 12 (wal_compression=zstd)

From: Robert Haas <[email-masked]>
Date: Thu, 31 Mar 2022 20:39:28 -0400

On Thu, Mar 31, 2022 at 7:38 PM Tom Lane <[email-masked]> wrote:
> Indeed.  I tried building against 1.3.6 (mainly because it was laying
> around) and the error reported by Devrim is just the tip of the iceberg.
> With "make -k", I see unknown-symbol failures on
>
> ZSTD_CCtx_setParameter
> ZSTD_c_compressionLevel
> ZSTD_c_nbWorkers
> ZSTD_CCtx_reset
> ZSTD_reset_session_only
> ZSTD_compressStream2
> ZSTD_e_continue
> ZSTD_e_end
>
> I wonder whether Robert's ambition to be compatible with old versions
> extends that far.

It definitely doesn't, and the fact that there's that much difference
in the APIs between 2018 and the present frankly makes my heart sink.

It looks like this stuff may be what libzstd calls the "advanced API"
which was considered unstable until 1.4.0 according to
https://github.com/facebook/zstd/releases -- so maybe we ought to
declare anything pre-1.4.0. to be unsupported. I really hope they're
serious about keeping the advanced API stable, though. I'm excited
about the potential of using libzstd, but I don't want to have to keep
adjusting our code to work with new library versions.

-- 
Robert Haas
EDB: http://www.enterprisedb.com

---

From: Tom Lane <[email-masked]>
Date: Thu, 31 Mar 2022 21:10:00 -0400

Robert Haas <[email-masked]> writes:
>> ...

> in the APIs between 2018 and the present frankly makes my heart sink.

AFAICS it's just additions; this stuff is not evidence that they
broke anything.

> declare anything pre-1.4.0. to be unsupported.

That seems like the appropriate answer to me.  I verified that we
build cleanly and pass check-world against 1.4.0, and later I'm
going to set up BF member longfin to use that.  So that will give
us an anchor that we support zstd that far back.  Had we written
this code earlier, maybe we'd have confined ourselves to 1.3.x
features ... but we didn't, and I don't see much value in doing
so now.

In short, I think we should push Justin's version-check patch,
and also fix the SGML docs to say that we require zstd >= 1.4.0.

			regards, tom lane

---

From: Michael Paquier <[email-masked]>
Date: Fri, 1 Apr 2022 13:35:47 +0900

> and also fix the SGML docs to say that we require zstd >= 1.4.0.

1.4.0 was released in April 2019, just 3 years ago.  It does not sound
that bad to me to make this version number a requirement for 15~ if
one wants to use zstd.
--
Michael

---

From: Tom Lane <[email-masked]>
Date: Fri, 01 Apr 2022 11:06:53 -0400

I wrote:
> going to set up BF member longfin to use that.

Done ...

> and also fix the SGML docs to say that we require zstd >= 1.4.0.

... and done.

			regards, tom lane