Parsed test spec with 32 sessions
|
|
starting permutation: create_public duplicate_public incompatible_private
|
step create_public:
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_CP_SHARED_Ж'::varchar2,
|
private => false);
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
step duplicate_public:
|
SELECT dbms_pipe_create_pipe(
|
'dbms_pipe_cp_shared_ж'::varchar2,
|
private => false);
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
step incompatible_private:
|
SELECT dbms_pipe_create_pipe(
|
'dbms_pipe_cp_shared_ж'::varchar2,
|
private => true);
|
|
ERROR: ORA-23322: Privilege error accessing pipe
|
|
starting permutation: pack_a_max pack_b_max pack_a_extra pack_b_extra
|
step pack_a_max:
|
SELECT dbms_pipe_pack_message(repeat('a', 32760)::varchar2);
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
step pack_b_max:
|
SELECT dbms_pipe_pack_message(repeat('b', 32760)::varchar2);
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
step pack_a_extra:
|
SELECT dbms_pipe_pack_message('x'::varchar2);
|
|
ERROR: ORA-06558: buffer in dbms_pipe package is full. No more items allowed
|
step pack_b_extra:
|
SELECT dbms_pipe_pack_message('y'::varchar2);
|
|
ERROR: ORA-06558: buffer in dbms_pipe package is full. No more items allowed
|
|
starting permutation: pack_null
|
step pack_null:
|
SELECT dbms_pipe_pack_message(NULL::varchar2);
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
|
starting permutation: tx_pack tx_pack_32753 tx_pack_extra
|
step tx_pack:
|
BEGIN;
|
SELECT dbms_pipe_pack_message('x'::varchar2);
|
ROLLBACK;
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
step tx_pack_32753:
|
SELECT dbms_pipe_pack_message(repeat('z', 32753)::varchar2);
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
step tx_pack_extra:
|
SELECT dbms_pipe_pack_message('q'::varchar2);
|
|
ERROR: ORA-06558: buffer in dbms_pipe package is full. No more items allowed
|
|
starting permutation: create_remove_public remove_public_other_backend recreate_after_remove
|
step create_remove_public:
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_REMOVE_SHARED_Ж'::varchar2,
|
private => false);
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
step remove_public_other_backend:
|
SELECT dbms_pipe_remove_pipe(
|
'dbms_pipe_remove_shared_ж'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
step recreate_after_remove:
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_REMOVE_SHARED_Ж'::varchar2,
|
private => false);
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
|
starting permutation: fifo_setup fifo_send fifo_recv1 fifo_recv2 fifo_cleanup
|
step fifo_setup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_FIFO_ISO'::varchar2);
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_FIFO_ISO'::varchar2, 1000, false, false, 0);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
step fifo_send:
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message('M1'::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_FIFO_ISO'::varchar2, 0, 1000, false, 0);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message('M2'::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_FIFO_ISO'::varchar2, 0, 1000, false, 0);
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step fifo_recv1:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_FIFO_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
M1
|
(1 row)
|
|
step fifo_recv2:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_FIFO_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
M2
|
(1 row)
|
|
step fifo_cleanup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_FIFO_ISO'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
|
starting permutation: wake_setup wake_wait wake_send wake_value wake_cleanup
|
step wake_setup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_WAKE_ISO'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
step wake_wait:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_WAKE_ISO'::varchar2, 5, NULL::varchar2);
|
<waiting ...>
|
step wake_send:
|
-- Ждём подтверждённого ожидания внутри DBMS_PIPE, чтобы исключить гонку теста с SEND.
|
DO $$
|
DECLARE
|
deadline timestamptz := clock_timestamp() + interval '2 seconds';
|
BEGIN
|
LOOP
|
EXIT WHEN EXISTS (
|
SELECT 1
|
FROM pg_stat_activity
|
WHERE application_name =
|
'isolation/dbms_pipe/wake_receiver'
|
AND wait_event_type = 'Extension');
|
IF clock_timestamp() >= deadline THEN
|
RAISE EXCEPTION 'wake receiver did not enter DBMS_PIPE wait';
|
END IF;
|
PERFORM pg_sleep(0.01);
|
END LOOP;
|
END
|
$$;
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message('WAKE'::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_WAKE_ISO'::varchar2, 0, 1000, false, 0);
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step wake_wait: <... completed>
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
step wake_value:
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
WAKE
|
(1 row)
|
|
step wake_cleanup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_WAKE_ISO'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
|
starting permutation: capacity_setup capacity_wait capacity_drain capacity_cleanup
|
step capacity_setup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_CAP_ISO'::varchar2);
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_CAP_ISO'::varchar2, 100, false, false, 0);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('A' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_CAP_ISO'::varchar2, 0, 100, false, 0);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('B' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_CAP_ISO'::varchar2, 0, 100, false, 0);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step capacity_wait:
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('C' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_CAP_ISO'::varchar2, 5, 100, false, 0);
|
<waiting ...>
|
step capacity_drain:
|
-- Сначала убеждаемся, что отправитель действительно ждёт свободного места, и только потом освобождаем его.
|
DO $$
|
DECLARE
|
deadline timestamptz := clock_timestamp() + interval '2 seconds';
|
BEGIN
|
LOOP
|
EXIT WHEN EXISTS (
|
SELECT 1
|
FROM pg_stat_activity
|
WHERE application_name =
|
'isolation/dbms_pipe/capacity_sender'
|
AND wait_event_type = 'Extension');
|
IF clock_timestamp() >= deadline THEN
|
RAISE EXCEPTION 'capacity sender did not enter DBMS_PIPE wait';
|
END IF;
|
PERFORM pg_sleep(0.01);
|
END LOOP;
|
END
|
$$;
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_CAP_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT left(dbms_pipe_unpack_message_varchar2()::text, 1);
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
left
|
----
|
A
|
(1 row)
|
|
step capacity_wait: <... completed>
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step capacity_cleanup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_CAP_ISO'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
|
starting permutation: remove_receiver_setup remove_receiver_wait remove_receiver_remove
|
step remove_receiver_setup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_REMOVE_WAIT_RECV'::varchar2);
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_REMOVE_WAIT_RECV'::varchar2, 100, false, false, 0);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
step remove_receiver_wait:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_REMOVE_WAIT_RECV'::varchar2, 2, NULL::varchar2);
|
<waiting ...>
|
step remove_receiver_remove:
|
-- Удаляем pipe только после подтверждения, что receiver действительно вошёл в DBMS_PIPE wait.
|
DO $$
|
DECLARE
|
deadline timestamptz := clock_timestamp() + interval '2 seconds';
|
BEGIN
|
LOOP
|
EXIT WHEN EXISTS (
|
SELECT 1
|
FROM pg_stat_activity
|
WHERE application_name =
|
'isolation/dbms_pipe/remove_receiver_waiter'
|
AND wait_event_type = 'Extension');
|
IF clock_timestamp() >= deadline THEN
|
RAISE EXCEPTION 'receiver did not enter DBMS_PIPE wait';
|
END IF;
|
PERFORM pg_sleep(0.01);
|
END LOOP;
|
END
|
$$;
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_REMOVE_WAIT_RECV'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
step remove_receiver_wait: <... completed>
|
dbms_pipe_receive_message
|
-------------------------
|
1
|
(1 row)
|
|
|
starting permutation: remove_sender_setup remove_sender_wait remove_sender_remove
|
step remove_sender_setup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_REMOVE_WAIT_SEND'::varchar2);
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_REMOVE_WAIT_SEND'::varchar2, 100, false, false, 0);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('A' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_REMOVE_WAIT_SEND'::varchar2, 0, 100, false, 0);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('B' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_REMOVE_WAIT_SEND'::varchar2, 0, 100, false, 0);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step remove_sender_wait:
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('C' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_REMOVE_WAIT_SEND'::varchar2, 2, 100, false, 0);
|
<waiting ...>
|
step remove_sender_remove:
|
-- Полный pipe удаляем только после того, как третий sender подтвердил ожидание capacity.
|
DO $$
|
DECLARE
|
deadline timestamptz := clock_timestamp() + interval '2 seconds';
|
BEGIN
|
LOOP
|
EXIT WHEN EXISTS (
|
SELECT 1
|
FROM pg_stat_activity
|
WHERE application_name =
|
'isolation/dbms_pipe/remove_sender_waiter'
|
AND wait_event_type = 'Extension');
|
IF clock_timestamp() >= deadline THEN
|
RAISE EXCEPTION 'sender did not enter DBMS_PIPE wait';
|
END IF;
|
PERFORM pg_sleep(0.01);
|
END LOOP;
|
END
|
$$;
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_REMOVE_WAIT_SEND'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
step remove_sender_wait: <... completed>
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
1
|
(1 row)
|
|
|
starting permutation: purge_setup purge_wait purge_run purge_read purge_cleanup
|
step purge_setup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_PURGE_ISO'::varchar2);
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_PURGE_ISO'::varchar2, 100, false, false, 0);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('A' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_PURGE_ISO'::varchar2, 0, 100, false, 0);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('B' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_PURGE_ISO'::varchar2, 0, 100, false, 0);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step purge_wait:
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(('C' || repeat('x', 40))::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_PURGE_ISO'::varchar2, 5, 100, false, 0);
|
<waiting ...>
|
step purge_run:
|
-- PURGE запускаем только после подтверждения, что отправитель действительно ждёт.
|
DO $$
|
DECLARE
|
deadline timestamptz := clock_timestamp() + interval '2 seconds';
|
BEGIN
|
LOOP
|
EXIT WHEN EXISTS (
|
SELECT 1
|
FROM pg_stat_activity
|
WHERE application_name =
|
'isolation/dbms_pipe/purge_sender'
|
AND wait_event_type = 'Extension');
|
IF clock_timestamp() >= deadline THEN
|
RAISE EXCEPTION 'purge sender did not enter DBMS_PIPE wait';
|
END IF;
|
PERFORM pg_sleep(0.01);
|
END LOOP;
|
END
|
$$;
|
SELECT dbms_pipe_purge('DBMS_PIPE_PURGE_ISO'::varchar2);
|
|
dbms_pipe_purge
|
---------------
|
|
(1 row)
|
|
step purge_wait: <... completed>
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step purge_read:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_PURGE_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT left(dbms_pipe_unpack_message_varchar2()::text, 1);
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_PURGE_ISO'::varchar2, 0, NULL::varchar2);
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
left
|
----
|
C
|
(1 row)
|
|
dbms_pipe_receive_message
|
-------------------------
|
1
|
(1 row)
|
|
step purge_cleanup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_PURGE_ISO'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
|
starting permutation: unique_setup unique_a_store unique_b_store unique_check unique_cleanup
|
step unique_setup:
|
CREATE TABLE dbms_pipe_unique_iso
|
(
|
session_name text NOT NULL,
|
call_no integer NOT NULL,
|
pipe_name text NOT NULL
|
);
|
|
step unique_a_store:
|
INSERT INTO dbms_pipe_unique_iso
|
VALUES
|
('A', 1, dbms_pipe_unique_session_name()),
|
('A', 2, dbms_pipe_unique_session_name());
|
|
step unique_b_store:
|
INSERT INTO dbms_pipe_unique_iso
|
VALUES
|
('B', 1, dbms_pipe_unique_session_name()),
|
('B', 2, dbms_pipe_unique_session_name());
|
|
step unique_check:
|
SELECT count(*) = 4 AS row_count_ok,
|
count(DISTINCT pipe_name) FILTER (
|
WHERE session_name = 'A') = 1 AS session_a_stable,
|
count(DISTINCT pipe_name) FILTER (
|
WHERE session_name = 'B') = 1 AS session_b_stable,
|
count(DISTINCT pipe_name) = 2 AS sessions_distinct
|
FROM dbms_pipe_unique_iso;
|
|
row_count_ok|session_a_stable|session_b_stable|sessions_distinct
|
------------+----------------+----------------+-----------------
|
t |t |t |t
|
(1 row)
|
|
step unique_cleanup:
|
DROP TABLE dbms_pipe_unique_iso;
|
|
|
starting permutation: singleton_setup singleton_read_a singleton_read_b singleton_read_after_peers singleton_overwrite singleton_cleanup
|
step singleton_setup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_SINGLE_ISO'::varchar2);
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_SINGLE_ISO'::varchar2, 1000, false, true, 0);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message('shared-singleton'::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_SINGLE_ISO'::varchar2, 0, 1000, false, 0);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step singleton_read_a:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_SINGLE_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
shared-singleton
|
(1 row)
|
|
step singleton_read_b:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_SINGLE_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
shared-singleton
|
(1 row)
|
|
step singleton_read_after_peers:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_SINGLE_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
shared-singleton
|
(1 row)
|
|
step singleton_overwrite:
|
-- После чтения из двух backend новый SEND заменяет сообщение singleton и сразу виден управляющему backend.
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message('singleton-overwrite'::varchar2);
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_SINGLE_ISO'::varchar2, 0, 1000, false, 0);
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_SINGLE_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
singleton-overwrite
|
(1 row)
|
|
step singleton_cleanup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_SINGLE_ISO'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
|
starting permutation: cache_setup cache_refresh cache_peer_read cache_cleanup
|
step cache_setup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_CACHE_ISO'::varchar2);
|
SELECT dbms_pipe_create_pipe(
|
'DBMS_PIPE_CACHE_ISO'::varchar2, 1000, false, true, 0);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_create_pipe
|
---------------------
|
0
|
(1 row)
|
|
step cache_refresh:
|
-- Пустой singleton вызывает cache_func и возвращает созданное им сообщение.
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_CACHE_ISO'::varchar2,
|
1,
|
'public.dbms_pipe_cache_iso'::varchar2);
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
cache-shared
|
(1 row)
|
|
step cache_peer_read:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_CACHE_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT dbms_pipe_unpack_message_varchar2();
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
dbms_pipe_unpack_message_varchar2
|
---------------------------------
|
cache-shared
|
(1 row)
|
|
step cache_cleanup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_CACHE_ISO'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
|
starting permutation: date_send date_receive date_cleanup
|
step date_send:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_DATE_ISO'::varchar2);
|
SELECT dbms_pipe_reset_buffer();
|
SELECT dbms_pipe_pack_message(TIMESTAMP '2026-10-06 01:02:03.999');
|
SELECT dbms_pipe_send_message(
|
'DBMS_PIPE_DATE_ISO'::varchar2, 0, 1000, false, 0);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|
|
dbms_pipe_reset_buffer
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_pack_message
|
----------------------
|
|
(1 row)
|
|
dbms_pipe_send_message
|
----------------------
|
0
|
(1 row)
|
|
step date_receive:
|
SELECT dbms_pipe_receive_message(
|
'DBMS_PIPE_DATE_ISO'::varchar2, 0, NULL::varchar2);
|
SELECT dbms_pipe_next_item_type() AS date_type;
|
SELECT dbms_pipe_unpack_message_date() IS NOT DISTINCT FROM
|
TIMESTAMP '2026-10-06 01:02:03' AS date_matches;
|
|
dbms_pipe_receive_message
|
-------------------------
|
0
|
(1 row)
|
|
date_type
|
---------
|
12
|
(1 row)
|
|
date_matches
|
------------
|
t
|
(1 row)
|
|
step date_cleanup:
|
SELECT dbms_pipe_remove_pipe('DBMS_PIPE_DATE_ISO'::varchar2);
|
|
dbms_pipe_remove_pipe
|
---------------------
|
0
|
(1 row)
|