1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

Improve largeobject regression test to show size of object read from file.

The idea here is to provide a more easily diagnosable failure diff when
the problem is that tenk.data has been DOS-ified, as I believe to be
happening currently on buildfarm member hamerkop.  Per suggestion from
Magnus Hagander.

Also, sync output/largeobject_1.source with current regression test.
Failure to do that in commit 3a0e4d36eb
turns out to be the real reason that hamerkop has been complaining.
This commit is contained in:
Tom Lane
2012-09-14 18:24:53 -04:00
parent b8fbbcf37f
commit bd9b4f1689
3 changed files with 37 additions and 0 deletions

View File

@@ -136,6 +136,9 @@ INSERT INTO lotest_stash_values (loid) SELECT lo_import('@abs_srcdir@/data/tenk.
BEGIN;
UPDATE lotest_stash_values SET fd=lo_open(loid, CAST(x'20000' | x'40000' AS integer));
-- verify length of large object
SELECT lo_lseek(fd, 0, 2) FROM lotest_stash_values;
-- with the default BLKSZ, LOBLKSZ = 2048, so this positions us for a block
-- edge case
SELECT lo_lseek(fd, 2030, 0) FROM lotest_stash_values;