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

Commit47169c2

Browse files
committed
Avoid possible regression test instability in timestamp.sql.
Concurrent autovacuum could result in a change in the order of thelive rows in timestamp_tbl. While this would not happen with thedefault autovacuum parameters, it's fairly easy to hit ifautovacuum_vacuum_threshold is made small enough to allow autovacto decide to process this table. That's a stumbling block for tryingto exercise autovacuum aggressively using the core regression tests.To fix, replace an unqualified DELETE with a TRUNCATE. There's asimilar DELETE just above (and no order-sensitive queries between),so this doesn't lose any test coverage and might indeed be arguedto improve it.Discussion:https://postgr.es/m/17428.1555348950@sss.pgh.pa.us
1 parent1e87198 commit47169c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ SELECT count(*) AS two FROM TIMESTAMP_TBL WHERE d1 = timestamp(2) without time z
7474
(1 row)
7575

7676
COMMIT;
77-
DELETE FROM TIMESTAMP_TBL;
77+
TRUNCATE TIMESTAMP_TBL;
7878
-- Special values
7979
INSERT INTO TIMESTAMP_TBL VALUES ('-infinity');
8080
INSERT INTO TIMESTAMP_TBL VALUES ('infinity');

‎src/test/regress/sql/timestamp.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SELECT pg_sleep(0.1);
4444
SELECTcount(*)AS twoFROM TIMESTAMP_TBLWHERE d1=timestamp(2) without time zone'now';
4545
COMMIT;
4646

47-
DELETEFROM TIMESTAMP_TBL;
47+
TRUNCATE TIMESTAMP_TBL;
4848

4949
-- Special values
5050
INSERT INTO TIMESTAMP_TBLVALUES ('-infinity');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp