@@ -968,180 +968,6 @@ sub check_data_state
968
968
}
969
969
});
970
970
971
- # Try SET LOCAL as first pipeline command. This succeeds and the first
972
- # command is not executed inside an implicit transaction block, causing
973
- # a WARNING.
974
- $node -> pgbench(
975
- ' -t 1 -n -M extended' ,
976
- 0,
977
- [],
978
- [qr { WARNING: SET LOCAL can only be used in transaction blocks} ],
979
- ' SET LOCAL outside implicit transaction block of pipeline' ,
980
- {
981
- ' 001_pgbench_pipeline_set_local_1' => q{
982
- \startpipeline
983
- SET LOCAL statement_timeout='1h';
984
- \endpipeline
985
- }
986
- });
987
-
988
- # Try SET LOCAL as second pipeline command. This succeeds and the second
989
- # command does not cause a WARNING to be generated.
990
- $node -> pgbench(
991
- ' -t 1 -n -M extended' ,
992
- 0,
993
- [],
994
- [qr { ^$} ],
995
- ' SET LOCAL inside implicit transaction block of pipeline' ,
996
- {
997
- ' 001_pgbench_pipeline_set_local_2' => q{
998
- \startpipeline
999
- SELECT 1;
1000
- SET LOCAL statement_timeout='1h';
1001
- \endpipeline
1002
- }
1003
- });
1004
-
1005
- # Try SET LOCAL with \syncpipeline. This succeeds and the command
1006
- # launched after the sync is outside the implicit transaction block
1007
- # of the pipeline, causing a WARNING.
1008
- $node -> pgbench(
1009
- ' -t 1 -n -M extended' ,
1010
- 0,
1011
- [],
1012
- [qr { WARNING: SET LOCAL can only be used in transaction blocks} ],
1013
- ' SET LOCAL and \syncpipeline' ,
1014
- {
1015
- ' 001_pgbench_pipeline_set_local_3' => q{
1016
- \startpipeline
1017
- SELECT 1;
1018
- \syncpipeline
1019
- SET LOCAL statement_timeout='1h';
1020
- \endpipeline
1021
- }
1022
- });
1023
-
1024
- # Try REINDEX CONCURRENTLY as first pipeline command. This succeeds
1025
- # as the first command is outside the implicit transaction block of
1026
- # a pipeline.
1027
- $node -> pgbench(
1028
- ' -t 1 -n -M extended' ,
1029
- 0,
1030
- [],
1031
- [],
1032
- ' REINDEX CONCURRENTLY outside implicit transaction block of pipeline' ,
1033
- {
1034
- ' 001_pgbench_pipeline_reindex_1' => q{
1035
- \startpipeline
1036
- REINDEX TABLE CONCURRENTLY pgbench_accounts;
1037
- SELECT 1;
1038
- \endpipeline
1039
- }
1040
- });
1041
-
1042
- # Try REINDEX CONCURRENTLY as second pipeline command. This fails
1043
- # as the second command is inside an implicit transaction block.
1044
- $node -> pgbench(
1045
- ' -t 1 -n -M extended' ,
1046
- 2,
1047
- [],
1048
- [],
1049
- ' error: REINDEX CONCURRENTLY inside implicit transaction block of pipeline' ,
1050
- {
1051
- ' 001_pgbench_pipeline_reindex_2' => q{
1052
- \startpipeline
1053
- SELECT 1;
1054
- REINDEX TABLE CONCURRENTLY pgbench_accounts;
1055
- \endpipeline
1056
- }
1057
- });
1058
-
1059
- # Try VACUUM as first pipeline command. Like REINDEX CONCURRENTLY, this
1060
- # succeeds as this is outside the implicit transaction block of a pipeline.
1061
- $node -> pgbench(
1062
- ' -t 1 -n -M extended' ,
1063
- 0,
1064
- [],
1065
- [],
1066
- ' VACUUM outside implicit transaction block of pipeline' ,
1067
- {
1068
- ' 001_pgbench_pipeline_vacuum_1' => q{
1069
- \startpipeline
1070
- VACUUM pgbench_accounts;
1071
- \endpipeline
1072
- }
1073
- });
1074
-
1075
- # Try VACUUM as second pipeline command. This fails, as the second command
1076
- # of a pipeline is inside an implicit transaction block.
1077
- $node -> pgbench(
1078
- ' -t 1 -n -M extended' ,
1079
- 2,
1080
- [],
1081
- [],
1082
- ' error: VACUUM inside implicit transaction block of pipeline' ,
1083
- {
1084
- ' 001_pgbench_pipeline_vacuum_2' => q{
1085
- \startpipeline
1086
- SELECT 1;
1087
- VACUUM pgbench_accounts;
1088
- \endpipeline
1089
- }
1090
- });
1091
-
1092
- # Try subtransactions in a pipeline. These are forbidden in implicit
1093
- # transaction blocks.
1094
- $node -> pgbench(
1095
- ' -t 1 -n -M extended' ,
1096
- 2,
1097
- [],
1098
- [],
1099
- ' error: subtransactions not allowed in pipeline' ,
1100
- {
1101
- ' 001_pgbench_pipeline_subtrans' => q{
1102
- \startpipeline
1103
- SAVEPOINT a;
1104
- SELECT 1;
1105
- ROLLBACK TO SAVEPOINT a;
1106
- SELECT 2;
1107
- \endpipeline
1108
- }
1109
- });
1110
-
1111
- # Try LOCK TABLE as first pipeline command. This fails as LOCK is outside
1112
- # an implicit transaction block.
1113
- $node -> pgbench(
1114
- ' -t 1 -n -M extended' ,
1115
- 2,
1116
- [],
1117
- [],
1118
- ' error: LOCK TABLE outside implicit transaction block of pipeline' ,
1119
- {
1120
- ' 001_pgbench_pipeline_lock_1' => q{
1121
- \startpipeline
1122
- LOCK pgbench_accounts;
1123
- SELECT 1;
1124
- \endpipeline
1125
- }
1126
- });
1127
-
1128
- # Try LOCK TABLE as second pipeline command. This succeeds as LOCK is inside
1129
- # an implicit transaction block.
1130
- $node -> pgbench(
1131
- ' -t 1 -n -M extended' ,
1132
- 0,
1133
- [],
1134
- [],
1135
- ' LOCK TABLE inside implicit transaction block of pipeline' ,
1136
- {
1137
- ' 001_pgbench_pipeline_lock_2' => q{
1138
- \startpipeline
1139
- SELECT 1;
1140
- LOCK pgbench_accounts;
1141
- \endpipeline
1142
- }
1143
- });
1144
-
1145
971
# Working \startpipeline in prepared query mode with serializable
1146
972
$node -> pgbench(
1147
973
' -c4 -t 10 -n -M prepared' ,
0 commit comments