mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
config
contrib
adminpack
amcheck
auth_delay
auto_explain
bloom
btree_gin
btree_gist
citext
cube
dblink
dict_int
dict_xsyn
earthdistance
file_fdw
fuzzystrmatch
hstore
hstore_plperl
hstore_plpython
intagg
intarray
isn
jsonb_plperl
jsonb_plpython
lo
ltree
ltree_plpython
oid2name
pageinspect
passwordcheck
pg_buffercache
pg_freespacemap
pg_prewarm
pg_standby
pg_stat_statements
pg_trgm
pg_visibility
pgcrypto
pgrowlocks
pgstattuple
postgres_fdw
seg
sepgsql
spi
sslinfo
start-scripts
tablefunc
tcn
test_decoding
expected
binary.out
concurrent_ddl_dml.out
ddl.out
decoding_in_xact.out
decoding_into_rel.out
delayed_startup.out
messages.out
mxact.out
oldest_xmin.out
ondisk_startup.out
permissions.out
prepared.out
replorigin.out
rewrite.out
slot.out
snapshot_transfer.out
spill.out
time.out
toast.out
truncate.out
xact.out
specs
sql
.gitignore
Makefile
logical.conf
test_decoding.c
tsm_system_rows
tsm_system_time
unaccent
uuid-ossp
vacuumlo
xml2
Makefile
README
contrib-global.mk
doc
src
.dir-locals.el
.editorconfig
.gitattributes
.gitignore
COPYRIGHT
GNUmakefile.in
HISTORY
Makefile
README
README.git
aclocal.m4
configure
configure.in
Without that the tests fail when forced to be run against a cluster with synchronous_commit = off (as the WAL might not yet be flushed to disk by the point logical decoding gets called, and thus the expected output breaks). Most tests already do that, add it to a few newer tests. Author: Andres Freund
28 lines
785 B
Plaintext
28 lines
785 B
Plaintext
-- predictability
|
|
SET synchronous_commit = on;
|
|
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
|
|
?column?
|
|
----------
|
|
init
|
|
(1 row)
|
|
|
|
CREATE TABLE tab1 (id serial unique, data int);
|
|
CREATE TABLE tab2 (a int primary key, b int);
|
|
TRUNCATE tab1;
|
|
TRUNCATE tab1, tab1 RESTART IDENTITY CASCADE;
|
|
TRUNCATE tab1, tab2;
|
|
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
|
data
|
|
------------------------------------------------------
|
|
BEGIN
|
|
table public.tab1: TRUNCATE: (no-flags)
|
|
COMMIT
|
|
BEGIN
|
|
table public.tab1: TRUNCATE: restart_seqs cascade
|
|
COMMIT
|
|
BEGIN
|
|
table public.tab1, public.tab2: TRUNCATE: (no-flags)
|
|
COMMIT
|
|
(9 rows)
|
|
|