Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit68a6d8a

Browse files
committed
Fix portability issue in test indirect_toast
When run on a server using default_toast_compression set to LZ4, thistest would fail because of a consistency issue with the order of thetuples treated. LZ4 causes one tuple to be stored inline instead ofgetting externalized. As the goal of this test is to check after datastored externally, stick to pglz as the compression algorithm used, soas all data of this test is stored the way it should.Analyzed-by: Dilip KumarDiscussion:https://postgr.es/m/YLrDWxJgM8WWMoCg@paquier.xyz
1 parentbe57f21 commit68a6d8a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

‎src/test/regress/expected/indirect_toast.out

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
--
2+
-- Tests for external toast datums
3+
--
4+
-- Other compression algorithms may cause the compressed data to be stored
5+
-- inline. pglz guarantees that the data is externalized, so stick to it.
6+
SET default_toast_compression = 'pglz';
17
CREATE TABLE indtoasttest(descr text, cnt int DEFAULT 0, f1 text, f2 text);
28
INSERT INTO indtoasttest(descr, f1, f2) VALUES('two-compressed', repeat('1234567890',1000), repeat('1234567890',1000));
39
INSERT INTO indtoasttest(descr, f1, f2) VALUES('two-toasted', repeat('1234567890',30000), repeat('1234567890',50000));
@@ -149,3 +155,4 @@ SELECT substring(indtoasttest::text, 1, 200) FROM indtoasttest;
149155

150156
DROP TABLE indtoasttest;
151157
DROP FUNCTION update_using_indirect();
158+
RESET default_toast_compression;

‎src/test/regress/sql/indirect_toast.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
--
2+
-- Tests for external toast datums
3+
--
4+
5+
-- Other compression algorithms may cause the compressed data to be stored
6+
-- inline. pglz guarantees that the data is externalized, so stick to it.
7+
SET default_toast_compression='pglz';
8+
19
CREATETABLEindtoasttest(descrtext, cntint DEFAULT0, f1text, f2text);
210

311
INSERT INTO indtoasttest(descr, f1, f2)VALUES('two-compressed', repeat('1234567890',1000), repeat('1234567890',1000));
@@ -59,3 +67,5 @@ SELECT substring(indtoasttest::text, 1, 200) FROM indtoasttest;
5967

6068
DROPTABLE indtoasttest;
6169
DROPFUNCTION update_using_indirect();
70+
71+
RESET default_toast_compression;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp