public inbox for [email protected]
help / color / mirror / Atom feed[PATCH 4/8] wal_compression_method: default to zlib..
3+ messages / 2 participants
[nested] [flat]
* [PATCH 4/8] wal_compression_method: default to zlib..
@ 2021-03-11 23:36 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Justin Pryzby @ 2021-03-11 23:36 UTC (permalink / raw)
this is meant to exercise the CIs, and not meant to be merged
---
src/backend/access/transam/xlog.c | 2 +-
src/backend/utils/misc/guc.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 0183589b4d..8bae73b4ec 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -99,7 +99,7 @@ bool EnableHotStandby = false;
bool fullPageWrites = true;
bool wal_log_hints = false;
bool wal_compression = false;
-int wal_compression_method = WAL_COMPRESSION_PGLZ;
+int wal_compression_method = WAL_COMPRESSION_ZLIB;
char *wal_consistency_checking_string = NULL;
bool *wal_consistency_checking = NULL;
bool wal_init_zero = true;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 8084027465..c37a8313d3 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1269,7 +1269,7 @@ static struct config_bool ConfigureNamesBool[] =
NULL
},
&wal_compression,
- false,
+ true,
NULL, NULL, NULL
},
@@ -4728,7 +4728,7 @@ static struct config_enum ConfigureNamesEnum[] =
NULL
},
&wal_compression_method,
- WAL_COMPRESSION_PGLZ, wal_compression_options,
+ WAL_COMPRESSION_ZLIB, wal_compression_options,
NULL, NULL, NULL
},
--
2.17.0
--f0KYrhQ4vYSV2aJu
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0005-re-add-wal_compression_method-lz4.patch"
^ permalink raw reply [nested|flat] 3+ messages in thread
* pg18 bug? SELECT query doesn't work
@ 2026-01-06 15:22 Eric Ridge <[email protected]>
2026-01-06 15:52 ` Re: pg18 bug? SELECT query doesn't work Eric Ridge <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Eric Ridge @ 2026-01-06 15:22 UTC (permalink / raw)
To: pgsql-general <[email protected]>
Hi all!
I ran into a situation where a query that worked just fine on pg15 fails on pg18.1 with an ERROR.
I've compiled pg18.1 from source:
# select version();
version
-------------------------------------------------------------------------------------------------------------------
PostgreSQL 18.1 on aarch64-apple-darwin24.4.0, compiled by Apple clang version 17.0.0 (clang-1700.0.13.5), 64-bit
(1 row)
$ pg_config --configure
'--prefix=/path/to/pg18' '--with-pgport=5418' '--enable-debug' '--enable-cassert' 'CPPFLAGS= -DUSE_ASSERT_CHECKING=1 -DRANDOMIZE_ALLOCATED_MEMORY=1 ' 'PKG_CONFIG_PATH=/opt/homebrew/opt/icu4c/lib/pkgconfig' 'CFLAGS=-O0 -g' 'CXXFLAGS=-I/opt/homebrew/include'
Here's a reduced test case:
drop table if exists wth;
create table wth (id serial8, json_data json);
insert into wth (json_data) values ('[{"animal": "cats"}, {"animal": "dogs"}]');
-- this ERRORs on pg18
select animal
from (select upper(json_array_elements(json_data) ->> 'animal') animal, count(*) from wth group by 1) x
where animal ilike 'c%';
On pg15 I get the expected result of:
animal
--------
CATS
(1 row)
On pg18 I'm presented with:
ERROR: set-valued function called in context that cannot accept a set
LINE 1: select animal from (select upper(json_array_elements(json_da...
With pg18 I messed around with rewriting it and discovered another inconsistency:
# with animals as (
select animal
from (select upper(json_array_elements(json_data) ->> 'animal') animal, count(*) from wth group by 1) x)
select * from animals where animal ilike 'c%';
ERROR: set-valued function called in context that cannot accept a set
LINE 3: from (select upper(json_array_elements(json_data) ->> 'anima...
v/s
# with animals as MATERIALIZED (
select animal
from (select upper(json_array_elements(json_data) ->> 'animal') animal, count(*) from wth group by 1) x)
select * from animals where animal ilike 'c%';
animal
--------
CATS
(1 row)
I'd expect both those queries to return "CATS", in addition to the original query that worked on (at least) pg15.
Just thought I'd bring this to y'alls attention.
Thanks and happy 2026!
eric
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg18 bug? SELECT query doesn't work
2026-01-06 15:22 pg18 bug? SELECT query doesn't work Eric Ridge <[email protected]>
@ 2026-01-06 15:52 ` Eric Ridge <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Eric Ridge @ 2026-01-06 15:52 UTC (permalink / raw)
To: pgsql-general <[email protected]>
> On Jan 6, 2026, at 10:22 AM, Eric Ridge <[email protected]> wrote:
>
> Here's a reduced test case:
Here's an even more reduced test case. No tables or data:
# SELECT * FROM (SELECT upper(unnest(ARRAY['cat', 'dog'])) as animal FROM generate_series(1, 10) GROUP BY 1) x WHERE animal ilike 'c%';
pg15 returns:
animal
--------
CAT
(1 row)
and pg18 says:
# SELECT * FROM (SELECT upper(unnest(ARRAY['cat', 'dog'])) as animal FROM generate_series(1, 10) GROUP BY 1) x WHERE animal ilike 'c%';
ERROR: set-valued function called in context that cannot accept a set
LINE 1: SELECT * FROM (SELECT upper(unnest(ARRAY['cat', 'dog'])) as ...
^
Thanks!
eric
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-01-06 15:52 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 23:36 [PATCH 4/8] wal_compression_method: default to zlib.. Justin Pryzby <[email protected]>
2026-01-06 15:22 pg18 bug? SELECT query doesn't work Eric Ridge <[email protected]>
2026-01-06 15:52 ` Re: pg18 bug? SELECT query doesn't work Eric Ridge <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox