2018-10-04 02:00:33 +02:00
|
|
|
# Test for SKIP_LOCKED option of VACUUM and ANALYZE commands.
|
|
|
|
#
|
|
|
|
# This also verifies that log messages are not emitted for skipped relations
|
|
|
|
# that were not specified in the VACUUM or ANALYZE command.
|
|
|
|
|
|
|
|
setup
|
|
|
|
{
|
|
|
|
CREATE TABLE parted (a INT) PARTITION BY LIST (a);
|
|
|
|
CREATE TABLE part1 PARTITION OF parted FOR VALUES IN (1);
|
2019-11-16 07:23:12 +01:00
|
|
|
ALTER TABLE part1 SET (autovacuum_enabled = false);
|
2018-10-04 02:00:33 +02:00
|
|
|
CREATE TABLE part2 PARTITION OF parted FOR VALUES IN (2);
|
2019-11-16 07:23:12 +01:00
|
|
|
ALTER TABLE part2 SET (autovacuum_enabled = false);
|
2018-10-04 02:00:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
teardown
|
|
|
|
{
|
|
|
|
DROP TABLE IF EXISTS parted;
|
|
|
|
}
|
|
|
|
|
Allow non-quoted identifiers as isolation test session/step names.
For no obvious reason, isolationtester has always insisted that
session and step names be written with double quotes. This is
fairly tedious and does little for test readability, especially
since the names that people actually choose almost always look
like normal identifiers. Hence, let's tweak the lexer to allow
SQL-like identifiers not only double-quoted strings.
(They're SQL-like, not exactly SQL, because I didn't add any
case-folding logic. Also there's no provision for U&"..." names,
not that anyone's likely to care.)
There is one incompatibility introduced by this change: if you write
"foo""bar" with no space, that used to be taken as two identifiers,
but now it's just one identifier with an embedded quote mark.
I converted all the src/test/isolation/ specfiles to remove
unnecessary double quotes, but stopped there because my
eyes were glazing over already.
Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.
Discussion: https://postgr.es/m/759113.1623861959@sss.pgh.pa.us
2021-06-24 00:41:39 +02:00
|
|
|
session s1
|
|
|
|
step lock_share
|
2018-10-04 02:00:33 +02:00
|
|
|
{
|
|
|
|
BEGIN;
|
|
|
|
LOCK part1 IN SHARE MODE;
|
|
|
|
}
|
Allow non-quoted identifiers as isolation test session/step names.
For no obvious reason, isolationtester has always insisted that
session and step names be written with double quotes. This is
fairly tedious and does little for test readability, especially
since the names that people actually choose almost always look
like normal identifiers. Hence, let's tweak the lexer to allow
SQL-like identifiers not only double-quoted strings.
(They're SQL-like, not exactly SQL, because I didn't add any
case-folding logic. Also there's no provision for U&"..." names,
not that anyone's likely to care.)
There is one incompatibility introduced by this change: if you write
"foo""bar" with no space, that used to be taken as two identifiers,
but now it's just one identifier with an embedded quote mark.
I converted all the src/test/isolation/ specfiles to remove
unnecessary double quotes, but stopped there because my
eyes were glazing over already.
Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.
Discussion: https://postgr.es/m/759113.1623861959@sss.pgh.pa.us
2021-06-24 00:41:39 +02:00
|
|
|
step lock_access_exclusive
|
2018-10-04 02:00:33 +02:00
|
|
|
{
|
|
|
|
BEGIN;
|
|
|
|
LOCK part1 IN ACCESS EXCLUSIVE MODE;
|
|
|
|
}
|
Allow non-quoted identifiers as isolation test session/step names.
For no obvious reason, isolationtester has always insisted that
session and step names be written with double quotes. This is
fairly tedious and does little for test readability, especially
since the names that people actually choose almost always look
like normal identifiers. Hence, let's tweak the lexer to allow
SQL-like identifiers not only double-quoted strings.
(They're SQL-like, not exactly SQL, because I didn't add any
case-folding logic. Also there's no provision for U&"..." names,
not that anyone's likely to care.)
There is one incompatibility introduced by this change: if you write
"foo""bar" with no space, that used to be taken as two identifiers,
but now it's just one identifier with an embedded quote mark.
I converted all the src/test/isolation/ specfiles to remove
unnecessary double quotes, but stopped there because my
eyes were glazing over already.
Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.
Discussion: https://postgr.es/m/759113.1623861959@sss.pgh.pa.us
2021-06-24 00:41:39 +02:00
|
|
|
step commit
|
2018-10-04 02:00:33 +02:00
|
|
|
{
|
|
|
|
COMMIT;
|
|
|
|
}
|
|
|
|
|
Allow non-quoted identifiers as isolation test session/step names.
For no obvious reason, isolationtester has always insisted that
session and step names be written with double quotes. This is
fairly tedious and does little for test readability, especially
since the names that people actually choose almost always look
like normal identifiers. Hence, let's tweak the lexer to allow
SQL-like identifiers not only double-quoted strings.
(They're SQL-like, not exactly SQL, because I didn't add any
case-folding logic. Also there's no provision for U&"..." names,
not that anyone's likely to care.)
There is one incompatibility introduced by this change: if you write
"foo""bar" with no space, that used to be taken as two identifiers,
but now it's just one identifier with an embedded quote mark.
I converted all the src/test/isolation/ specfiles to remove
unnecessary double quotes, but stopped there because my
eyes were glazing over already.
Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.
Discussion: https://postgr.es/m/759113.1623861959@sss.pgh.pa.us
2021-06-24 00:41:39 +02:00
|
|
|
session s2
|
|
|
|
step vac_specified { VACUUM (SKIP_LOCKED) part1, part2; }
|
|
|
|
step vac_all_parts { VACUUM (SKIP_LOCKED) parted; }
|
|
|
|
step analyze_specified { ANALYZE (SKIP_LOCKED) part1, part2; }
|
|
|
|
step analyze_all_parts { ANALYZE (SKIP_LOCKED) parted; }
|
|
|
|
step vac_analyze_specified { VACUUM (ANALYZE, SKIP_LOCKED) part1, part2; }
|
|
|
|
step vac_analyze_all_parts { VACUUM (ANALYZE, SKIP_LOCKED) parted; }
|
|
|
|
step vac_full_specified { VACUUM (SKIP_LOCKED, FULL) part1, part2; }
|
|
|
|
step vac_full_all_parts { VACUUM (SKIP_LOCKED, FULL) parted; }
|
2018-10-04 02:00:33 +02:00
|
|
|
|
Allow non-quoted identifiers as isolation test session/step names.
For no obvious reason, isolationtester has always insisted that
session and step names be written with double quotes. This is
fairly tedious and does little for test readability, especially
since the names that people actually choose almost always look
like normal identifiers. Hence, let's tweak the lexer to allow
SQL-like identifiers not only double-quoted strings.
(They're SQL-like, not exactly SQL, because I didn't add any
case-folding logic. Also there's no provision for U&"..." names,
not that anyone's likely to care.)
There is one incompatibility introduced by this change: if you write
"foo""bar" with no space, that used to be taken as two identifiers,
but now it's just one identifier with an embedded quote mark.
I converted all the src/test/isolation/ specfiles to remove
unnecessary double quotes, but stopped there because my
eyes were glazing over already.
Like 741d7f104, back-patch to all supported branches, so that this
isn't a stumbling block for back-patching isolation test changes.
Discussion: https://postgr.es/m/759113.1623861959@sss.pgh.pa.us
2021-06-24 00:41:39 +02:00
|
|
|
permutation lock_share vac_specified commit
|
|
|
|
permutation lock_share vac_all_parts commit
|
|
|
|
permutation lock_share analyze_specified commit
|
|
|
|
permutation lock_share analyze_all_parts commit
|
|
|
|
permutation lock_share vac_analyze_specified commit
|
|
|
|
permutation lock_share vac_analyze_all_parts commit
|
|
|
|
permutation lock_share vac_full_specified commit
|
|
|
|
permutation lock_share vac_full_all_parts commit
|
|
|
|
permutation lock_access_exclusive vac_specified commit
|
|
|
|
permutation lock_access_exclusive vac_all_parts commit
|
|
|
|
permutation lock_access_exclusive analyze_specified commit
|
|
|
|
permutation lock_access_exclusive analyze_all_parts commit
|
|
|
|
permutation lock_access_exclusive vac_analyze_specified commit
|
|
|
|
permutation lock_access_exclusive vac_analyze_all_parts commit
|
|
|
|
permutation lock_access_exclusive vac_full_specified commit
|
|
|
|
permutation lock_access_exclusive vac_full_all_parts commit
|