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

Commit2d7ead8

Browse files
committed
pg_stat_statements: Fix test that assumes wal_records = rows.
It's not very robust to assume that each inserted row will produceexactly one WAL record and that no other WAL records will be generatedin the process, because for example a particular transaction couldalways be the one that has to extend clog.Because these tests are not run by 'make installcheck' but only by'make check', it may be that in our current testing infrastructurethis can't be hit, but it doesn't seem like a good idea to rely onthat, since unrelated changes to the regression tests or the waywrite-ahead logging is done could easily cause it to start happening,and debugging such failures is a pain.Adjust the regression test to be less sensitive.Anton Melnikov, reviewed by Julien RouhaudDiscussion:http://postgr.es/m/1ccd00d9-1723-6b68-ae56-655aab00d406@inbox.ru
1 parent7b64e4b commit2d7ead8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎contrib/pg_stat_statements/expected/pg_stat_statements.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,18 +259,18 @@ SET pg_stat_statements.track_utility = FALSE;
259259
SELECT query, calls, rows,
260260
wal_bytes > 0 as wal_bytes_generated,
261261
wal_records > 0 as wal_records_generated,
262-
wal_records = rows aswal_records_as_rows
262+
wal_records>= rows aswal_records_ge_rows
263263
FROM pg_stat_statements ORDER BY query COLLATE "C";
264-
query | calls | rows | wal_bytes_generated | wal_records_generated |wal_records_as_rows
264+
query | calls | rows | wal_bytes_generated | wal_records_generated |wal_records_ge_rows
265265
-----------------------------------------------------------+-------+------+---------------------+-----------------------+---------------------
266266
DELETE FROM pgss_test WHERE a > $1 | 1 | 1 | t | t | t
267-
DROP TABLE pgss_test | 1 | 0 | t | t |f
267+
DROP TABLE pgss_test | 1 | 0 | t | t |t
268268
INSERT INTO pgss_test VALUES(generate_series($1, $2), $3) | 1 | 10 | t | t | t
269269
SELECT pg_stat_statements_reset() | 1 | 1 | f | f | f
270270
SELECT query, calls, rows, +| 0 | 0 | f | f | t
271271
wal_bytes > $1 as wal_bytes_generated, +| | | | |
272272
wal_records > $2 as wal_records_generated, +| | | | |
273-
wal_records = rows aswal_records_as_rows +| | | | |
273+
wal_records>= rows aswal_records_ge_rows +| | | | |
274274
FROM pg_stat_statements ORDER BY query COLLATE "C" | | | | |
275275
SET pg_stat_statements.track_utility = FALSE | 1 | 0 | f | f | t
276276
UPDATE pgss_test SET b = $1 WHERE a > $2 | 1 | 3 | t | t | t

‎contrib/pg_stat_statements/sql/pg_stat_statements.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ SET pg_stat_statements.track_utility = FALSE;
122122
SELECT query, calls, rows,
123123
wal_bytes>0as wal_bytes_generated,
124124
wal_records>0as wal_records_generated,
125-
wal_records= rowsaswal_records_as_rows
125+
wal_records>= rowsaswal_records_ge_rows
126126
FROM pg_stat_statementsORDER BY query COLLATE"C";
127127

128128
--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp