This reverts commit
7c1849311e49, due to the fact that more than 60% of
the buildfarm members do not have lz4 installed. As we are in the last
commit fest of the development cycle, and that it could take a couple
of weeks to stabilize things, this change is reverted for now.
This commit will be reworked in a lighter version, as
default_toast_compression's default can be changed to "lz4" without the
switch from --with-lz4 to --without-lz4. This approach will keep the
buildfarm at bay, and still allow builds to take advantage of LZ4 in
TOAST by default, as long as the code is compiled with LZ4 support.
A harder requirement based on LZ4 should be achievable at some point,
but it is going to require some work from the buildfarm owners first.
Perhaps this part could be revisited at the beginning of the next
development cycle.
Discussion: https://postgr.es/m/CAOYmi+meTT0NbLbnVqOJD5OKwCtHL86PQ+RZZTrn6umfmHyWaw@mail.gmail.com
--host=x86_64-w64-mingw32ucrt \
--enable-cassert \
--without-icu \
- --without-lz4 \
CC="ccache x86_64-w64-mingw32ucrt-gcc" \
CXX="ccache x86_64-w64-mingw32ucrt-g++"
make -s -j${BUILD_JOBS} clean
--with-system-tzdata=DIR
use system time zone data in DIR
--without-zlib do not use Zlib
- --without-lz4 build without LZ4 support
+ --with-lz4 build with LZ4 support
--with-zstd build with ZSTD support
--with-ssl=LIB use LIB for SSL/TLS support (openssl)
--with-openssl obsolete spelling of --with-ssl=openssl
esac
else
- with_lz4=yes
-
-$as_echo "#define USE_LZ4 1" >>confdefs.h
+ with_lz4=no
fi
# LZ4
#
AC_MSG_CHECKING([whether to build with LZ4 support])
-PGAC_ARG_BOOL(with, lz4, yes, [build without LZ4 support],
+PGAC_ARG_BOOL(with, lz4, no, [build with LZ4 support],
[AC_DEFINE([USE_LZ4], 1, [Define to 1 to build with LZ4 support. (--with-lz4)])])
AC_MSG_RESULT([$with_lz4])
AC_SUBST(with_lz4)
etc.).
A compressed page image will be decompressed during WAL replay.
The supported methods are <literal>pglz</literal>,
- <literal>lz4</literal> and <literal>zstd</literal> (if
- <productname>PostgreSQL</productname> was compiled with
- <option>--with-zstd</option>).
+ <literal>lz4</literal> (if <productname>PostgreSQL</productname>
+ was compiled with <option>--with-lz4</option>) and
+ <literal>zstd</literal> (if <productname>PostgreSQL</productname>
+ was compiled with <option>--with-zstd</option>).
The default value is <literal>off</literal>.
Only superusers and users with the appropriate <literal>SET</literal>
privilege can change this setting.
<command>CREATE TABLE</command> or
<command>ALTER TABLE</command>.)
The supported compression methods are <literal>pglz</literal> and
- <literal>lz4</literal>.
- The default is <literal>lz4</literal> (if available); otherwise,
- <literal>pglz</literal>.
+ (if <productname>PostgreSQL</productname> was compiled with
+ <option>--with-lz4</option>) <literal>lz4</literal>.
+ The default is <literal>pglz</literal>.
</para>
</listitem>
</varlistentry>
</listitem>
</varlistentry>
+ <varlistentry id="configure-option-with-lz4">
+ <term><option>--with-lz4</option></term>
+ <listitem>
+ <para>
+ Build with <productname>LZ4</productname> compression support.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="configure-option-with-zstd">
<term><option>--with-zstd</option></term>
<listitem>
</listitem>
</varlistentry>
- <varlistentry id="configure-option-without-lz4">
- <term><option>--without-lz4</option></term>
- <listitem>
- <para>
- <indexterm>
- <primary>lz4</primary>
- </indexterm>
- Prevents use of the <application>LZ4</application> library.
- </para>
- </listitem>
- </varlistentry>
-
</variablelist>
</sect3>
its existing compression method, rather than being recompressed with the
compression method of the target column.
The supported compression
- methods are <literal>pglz</literal> and <literal>lz4</literal>. In
+ methods are <literal>pglz</literal> and <literal>lz4</literal>.
+ (<literal>lz4</literal> is available only if <option>--with-lz4</option>
+ was used when building <productname>PostgreSQL</productname>.) In
addition, <replaceable class="parameter">compression_method</replaceable>
can be <literal>default</literal>, which selects the default behavior of
consulting the <xref linkend="guc-default-toast-compression"/> setting
has no direct effect, because such tables have no storage of their own,
but the configured value will be inherited by newly-created partitions.
The supported compression methods are <literal>pglz</literal> and
- <literal>lz4</literal>. In addition,
+ <literal>lz4</literal>. (<literal>lz4</literal> is available only if
+ <option>--with-lz4</option> was used when building
+ <productname>PostgreSQL</productname>.) In addition,
<replaceable class="parameter">compression_method</replaceable>
can be <literal>default</literal> to explicitly specify the default
behavior, which is to consult the
</para>
<para>
The compression method can be set to <literal>gzip</literal>,
- <literal>lz4</literal> or <literal>none</literal> for no compression.
+ <literal>lz4</literal> (if <productname>PostgreSQL</productname>
+ was compiled with <option>--with-lz4</option>) or
+ <literal>none</literal> for no compression.
A compression detail string can optionally be specified. If the
detail string is an integer, it specifies the compression level.
Otherwise, it should be a comma-separated list of items, each of the
#include "varatt.h"
/* GUC */
-int default_toast_compression = DEFAULT_TOAST_COMPRESSION;
+int default_toast_compression = TOAST_PGLZ_COMPRESSION;
#define NO_COMPRESSION_SUPPORT(method) \
ereport(ERROR, \
{ name => 'default_toast_compression', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
short_desc => 'Sets the default compression method for compressible values.',
variable => 'default_toast_compression',
- boot_val => 'DEFAULT_TOAST_COMPRESSION',
+ boot_val => 'TOAST_PGLZ_COMPRESSION',
options => 'default_toast_compression_options',
},
#row_security = on
#default_table_access_method = 'heap'
#default_tablespace = '' # a tablespace name, '' uses the default
-#default_toast_compression = pglz # pglz or lz4
+#default_toast_compression = 'pglz' # 'pglz' or 'lz4'
#temp_tablespaces = '' # a list of tablespace names, '' uses
# only default tablespace
#check_function_bodies = on
"0640", false);
}
-#if USE_LZ4
- conflines = replace_guc_value(conflines, "default_toast_compression",
- "lz4", true);
-#endif
-
/*
* Now replace anything that's overridden via -c switches.
*/
#define CompressionMethodIsValid(cm) ((cm) != InvalidCompressionMethod)
-/*
- * Choose an appropriate default toast compression method. If lz4 is
- * compiled-in, use it, otherwise use pglz.
- */
-#ifdef USE_LZ4
-#define DEFAULT_TOAST_COMPRESSION TOAST_LZ4_COMPRESSION
-#else
-#define DEFAULT_TOAST_COMPRESSION TOAST_PGLZ_COMPRESSION
-#endif
/* pglz compression/decompression routines */
extern varlena *pglz_compress_datum(const varlena *value);