insufficient-wal-level.td 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. # This test is expected to run with a wal_level of minimal or replica.
  10. > CREATE SECRET pgpass AS 'postgres'
  11. > CREATE CONNECTION pg TO POSTGRES (
  12. HOST postgres,
  13. DATABASE postgres,
  14. USER postgres,
  15. PASSWORD SECRET pgpass
  16. )
  17. $ postgres-execute connection=postgres://postgres:postgres@postgres
  18. ALTER USER postgres WITH replication;
  19. DROP SCHEMA IF EXISTS public CASCADE;
  20. CREATE SCHEMA public;
  21. DROP PUBLICATION IF EXISTS mz_source;
  22. CREATE PUBLICATION mz_source FOR ALL TABLES;
  23. CREATE TABLE pk_table (pk INTEGER PRIMARY KEY, f2 TEXT);
  24. INSERT INTO pk_table VALUES (1, 'one');
  25. ALTER TABLE pk_table REPLICA IDENTITY FULL;
  26. INSERT INTO pk_table VALUES (2, 'two');
  27. ! CREATE SOURCE pg_source
  28. FROM POSTGRES CONNECTION pg (PUBLICATION 'mz_source');
  29. contains:server must have wal_level >= logical