From c5385929593dd8499cfb5d85ac322e8ee1819fd4 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 29 Dec 2023 18:01:53 +0100 Subject: [PATCH] Make all Perl warnings fatal There are a lot of Perl scripts in the tree, mostly code generation and TAP tests. Occasionally, these scripts produce warnings. These are probably always mistakes on the developer side (true positives). Typical examples are warnings from genbki.pl or related when you make a mess in the catalog files during development, or warnings from tests when they massage a config file that looks different on different hosts, or mistakes during merges (e.g., duplicate subroutine definitions), or just mistakes that weren't noticed because there is a lot of output in a verbose build. This changes all warnings into fatal errors, by replacing use warnings; by use warnings FATAL => 'all'; in all Perl files. Discussion: https://www.postgresql.org/message-id/flat/06f899fd-1826-05ab-42d6-adeb1fd5e200%40eisentraut.org --- config/check_modules.pl | 2 +- contrib/amcheck/t/001_verify_heapam.pl | 2 +- contrib/amcheck/t/002_cic.pl | 2 +- contrib/amcheck/t/003_cic_2pc.pl | 2 +- contrib/amcheck/t/004_verify_nbtree_unique.pl | 2 +- contrib/amcheck/t/005_pitr.pl | 2 +- contrib/auto_explain/t/001_auto_explain.pl | 2 +- contrib/basebackup_to_shell/t/001_basic.pl | 2 +- contrib/bloom/t/001_wal.pl | 2 +- contrib/fuzzystrmatch/daitch_mokotoff_header.pl | 2 +- contrib/intarray/bench/bench.pl | 2 +- contrib/intarray/bench/create_test.pl | 2 +- contrib/oid2name/t/001_basic.pl | 2 +- contrib/pg_prewarm/t/001_basic.pl | 2 +- contrib/seg/seg-validate.pl | 2 +- contrib/seg/sort-segments.pl | 2 +- contrib/test_decoding/t/001_repl_stats.pl | 2 +- contrib/vacuumlo/t/001_basic.pl | 2 +- doc/src/sgml/generate-errcodes-table.pl | 2 +- doc/src/sgml/generate-keywords-table.pl | 2 +- doc/src/sgml/generate-targets-meson.pl | 2 +- doc/src/sgml/mk_feature_tables.pl | 2 +- src/backend/catalog/Catalog.pm | 2 +- src/backend/catalog/genbki.pl | 2 +- src/backend/nodes/gen_node_support.pl | 2 +- src/backend/parser/check_keywords.pl | 2 +- src/backend/snowball/snowball_create.pl | 2 +- src/backend/storage/lmgr/generate-lwlocknames.pl | 2 +- src/backend/utils/Gen_dummy_probes.pl | 2 +- src/backend/utils/Gen_fmgrtab.pl | 2 +- src/backend/utils/activity/generate-wait_event_types.pl | 2 +- src/backend/utils/generate-errcodes.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_BIG5.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_GB18030.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_SJIS.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_UHC.pl | 2 +- src/backend/utils/mb/Unicode/UCS_to_most.pl | 2 +- src/backend/utils/mb/Unicode/convutils.pm | 2 +- src/bin/initdb/t/001_initdb.pl | 2 +- src/bin/pg_amcheck/t/001_basic.pl | 2 +- src/bin/pg_amcheck/t/002_nonesuch.pl | 2 +- src/bin/pg_amcheck/t/003_check.pl | 2 +- src/bin/pg_amcheck/t/004_verify_heapam.pl | 2 +- src/bin/pg_amcheck/t/005_opclass_damage.pl | 2 +- src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl | 2 +- src/bin/pg_basebackup/t/010_pg_basebackup.pl | 2 +- src/bin/pg_basebackup/t/011_in_place_tablespace.pl | 2 +- src/bin/pg_basebackup/t/020_pg_receivewal.pl | 2 +- src/bin/pg_basebackup/t/030_pg_recvlogical.pl | 2 +- src/bin/pg_checksums/t/001_basic.pl | 2 +- src/bin/pg_checksums/t/002_actions.pl | 2 +- src/bin/pg_combinebackup/t/001_basic.pl | 2 +- src/bin/pg_combinebackup/t/002_compare_backups.pl | 2 +- src/bin/pg_combinebackup/t/003_timeline.pl | 2 +- src/bin/pg_combinebackup/t/004_manifest.pl | 2 +- src/bin/pg_combinebackup/t/005_integrity.pl | 2 +- src/bin/pg_config/t/001_pg_config.pl | 2 +- src/bin/pg_controldata/t/001_pg_controldata.pl | 2 +- src/bin/pg_ctl/t/001_start_stop.pl | 2 +- src/bin/pg_ctl/t/002_status.pl | 2 +- src/bin/pg_ctl/t/003_promote.pl | 2 +- src/bin/pg_ctl/t/004_logrotate.pl | 2 +- src/bin/pg_dump/t/001_basic.pl | 2 +- src/bin/pg_dump/t/002_pg_dump.pl | 2 +- src/bin/pg_dump/t/003_pg_dump_with_server.pl | 2 +- src/bin/pg_dump/t/004_pg_dump_parallel.pl | 2 +- src/bin/pg_dump/t/005_pg_dump_filterfile.pl | 2 +- src/bin/pg_dump/t/010_dump_connstr.pl | 2 +- src/bin/pg_resetwal/t/001_basic.pl | 2 +- src/bin/pg_resetwal/t/002_corrupted.pl | 2 +- src/bin/pg_rewind/t/001_basic.pl | 2 +- src/bin/pg_rewind/t/002_databases.pl | 2 +- src/bin/pg_rewind/t/003_extrafiles.pl | 2 +- src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 2 +- src/bin/pg_rewind/t/005_same_timeline.pl | 2 +- src/bin/pg_rewind/t/006_options.pl | 2 +- src/bin/pg_rewind/t/007_standby_source.pl | 2 +- src/bin/pg_rewind/t/008_min_recovery_point.pl | 2 +- src/bin/pg_rewind/t/009_growing_files.pl | 2 +- src/bin/pg_rewind/t/RewindTest.pm | 2 +- src/bin/pg_test_fsync/t/001_basic.pl | 2 +- src/bin/pg_test_timing/t/001_basic.pl | 2 +- src/bin/pg_upgrade/t/001_basic.pl | 2 +- src/bin/pg_upgrade/t/002_pg_upgrade.pl | 2 +- src/bin/pg_upgrade/t/003_logical_slots.pl | 2 +- src/bin/pg_verifybackup/t/001_basic.pl | 2 +- src/bin/pg_verifybackup/t/002_algorithm.pl | 2 +- src/bin/pg_verifybackup/t/003_corruption.pl | 2 +- src/bin/pg_verifybackup/t/004_options.pl | 2 +- src/bin/pg_verifybackup/t/005_bad_manifest.pl | 2 +- src/bin/pg_verifybackup/t/006_encoding.pl | 2 +- src/bin/pg_verifybackup/t/007_wal.pl | 2 +- src/bin/pg_verifybackup/t/008_untar.pl | 2 +- src/bin/pg_verifybackup/t/009_extract.pl | 2 +- src/bin/pg_verifybackup/t/010_client_untar.pl | 2 +- src/bin/pg_waldump/t/001_basic.pl | 2 +- src/bin/pg_waldump/t/002_save_fullpage.pl | 2 +- src/bin/pgbench/t/001_pgbench_with_server.pl | 2 +- src/bin/pgbench/t/002_pgbench_no_server.pl | 2 +- src/bin/psql/create_help.pl | 2 +- src/bin/psql/t/001_basic.pl | 2 +- src/bin/psql/t/010_tab_completion.pl | 2 +- src/bin/psql/t/020_cancel.pl | 2 +- src/bin/scripts/t/010_clusterdb.pl | 2 +- src/bin/scripts/t/011_clusterdb_all.pl | 2 +- src/bin/scripts/t/020_createdb.pl | 2 +- src/bin/scripts/t/040_createuser.pl | 2 +- src/bin/scripts/t/050_dropdb.pl | 2 +- src/bin/scripts/t/070_dropuser.pl | 2 +- src/bin/scripts/t/080_pg_isready.pl | 2 +- src/bin/scripts/t/090_reindexdb.pl | 2 +- src/bin/scripts/t/091_reindexdb_all.pl | 2 +- src/bin/scripts/t/100_vacuumdb.pl | 2 +- src/bin/scripts/t/101_vacuumdb_all.pl | 2 +- src/bin/scripts/t/102_vacuumdb_stages.pl | 2 +- src/bin/scripts/t/200_connstr.pl | 2 +- src/common/unicode/generate-norm_test_table.pl | 2 +- src/common/unicode/generate-unicode_category_table.pl | 2 +- src/common/unicode/generate-unicode_east_asian_fw_table.pl | 2 +- src/common/unicode/generate-unicode_nonspacing_table.pl | 2 +- src/common/unicode/generate-unicode_norm_table.pl | 2 +- src/common/unicode/generate-unicode_normprops_table.pl | 2 +- src/common/unicode/generate-unicode_version.pl | 2 +- src/include/catalog/duplicate_oids | 2 +- src/include/catalog/reformat_dat_file.pl | 2 +- src/include/catalog/renumber_oids.pl | 2 +- src/include/catalog/unused_oids | 2 +- src/interfaces/ecpg/preproc/check_rules.pl | 2 +- src/interfaces/ecpg/preproc/parse.pl | 2 +- src/interfaces/libpq/t/001_uri.pl | 2 +- src/interfaces/libpq/t/002_api.pl | 2 +- src/interfaces/libpq/t/003_load_balance_host_list.pl | 2 +- src/interfaces/libpq/t/004_load_balance_dns.pl | 2 +- src/pl/plperl/plc_perlboot.pl | 6 +++--- src/pl/plperl/plperl_opmask.pl | 2 +- src/pl/plperl/text2macro.pl | 2 +- src/pl/plpgsql/src/generate-plerrcodes.pl | 2 +- src/pl/plpython/generate-spiexceptions.pl | 2 +- src/pl/tcl/generate-pltclerrcodes.pl | 2 +- src/test/authentication/t/001_password.pl | 2 +- src/test/authentication/t/002_saslprep.pl | 2 +- src/test/authentication/t/003_peer.pl | 2 +- src/test/authentication/t/004_file_inclusion.pl | 2 +- src/test/authentication/t/005_sspi.pl | 2 +- src/test/authentication/t/006_login_trigger.pl | 2 +- src/test/icu/t/010_database.pl | 2 +- src/test/kerberos/t/001_auth.pl | 2 +- src/test/ldap/LdapServer.pm | 2 +- src/test/ldap/t/001_auth.pl | 2 +- src/test/ldap/t/002_bindpasswd.pl | 2 +- src/test/locale/sort-test.pl | 2 +- src/test/modules/brin/t/01_workitems.pl | 2 +- src/test/modules/brin/t/02_wal_consistency.pl | 2 +- src/test/modules/commit_ts/t/001_base.pl | 2 +- src/test/modules/commit_ts/t/002_standby.pl | 2 +- src/test/modules/commit_ts/t/003_standby_2.pl | 2 +- src/test/modules/commit_ts/t/004_restart.pl | 2 +- .../modules/ldap_password_func/t/001_mutated_bindpasswd.pl | 2 +- src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl | 2 +- src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl | 2 +- src/test/modules/test_custom_rmgrs/t/001_basic.pl | 2 +- src/test/modules/test_misc/t/001_constraint_validation.pl | 2 +- src/test/modules/test_misc/t/002_tablespace.pl | 2 +- src/test/modules/test_misc/t/003_check_guc.pl | 2 +- src/test/modules/test_misc/t/004_io_direct.pl | 2 +- src/test/modules/test_pg_dump/t/001_base.pl | 2 +- src/test/modules/worker_spi/t/001_worker_spi.pl | 2 +- src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl | 2 +- src/test/modules/xid_wraparound/t/002_limits.pl | 2 +- src/test/modules/xid_wraparound/t/003_wraparounds.pl | 2 +- src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm | 2 +- src/test/perl/PostgreSQL/Test/BackgroundPsql.pm | 2 +- src/test/perl/PostgreSQL/Test/Cluster.pm | 2 +- src/test/perl/PostgreSQL/Test/RecursiveCopy.pm | 2 +- src/test/perl/PostgreSQL/Test/SimpleTee.pm | 2 +- src/test/perl/PostgreSQL/Test/Utils.pm | 2 +- src/test/perl/PostgreSQL/Version.pm | 2 +- src/test/perl/README | 2 +- src/test/recovery/t/001_stream_rep.pl | 2 +- src/test/recovery/t/002_archiving.pl | 2 +- src/test/recovery/t/003_recovery_targets.pl | 2 +- src/test/recovery/t/004_timeline_switch.pl | 2 +- src/test/recovery/t/005_replay_delay.pl | 2 +- src/test/recovery/t/006_logical_decoding.pl | 2 +- src/test/recovery/t/007_sync_rep.pl | 2 +- src/test/recovery/t/008_fsm_truncation.pl | 2 +- src/test/recovery/t/009_twophase.pl | 2 +- src/test/recovery/t/010_logical_decoding_timelines.pl | 2 +- src/test/recovery/t/012_subtransactions.pl | 2 +- src/test/recovery/t/013_crash_restart.pl | 2 +- src/test/recovery/t/014_unlogged_reinit.pl | 2 +- src/test/recovery/t/015_promotion_pages.pl | 2 +- src/test/recovery/t/016_min_consistency.pl | 2 +- src/test/recovery/t/017_shm.pl | 2 +- src/test/recovery/t/018_wal_optimize.pl | 2 +- src/test/recovery/t/019_replslot_limit.pl | 2 +- src/test/recovery/t/020_archive_status.pl | 2 +- src/test/recovery/t/021_row_visibility.pl | 2 +- src/test/recovery/t/022_crash_temp_files.pl | 2 +- src/test/recovery/t/023_pitr_prepared_xact.pl | 2 +- src/test/recovery/t/024_archive_recovery.pl | 2 +- src/test/recovery/t/025_stuck_on_old_timeline.pl | 2 +- src/test/recovery/t/026_overwrite_contrecord.pl | 2 +- src/test/recovery/t/027_stream_regress.pl | 2 +- src/test/recovery/t/028_pitr_timelines.pl | 2 +- src/test/recovery/t/029_stats_restart.pl | 2 +- src/test/recovery/t/030_stats_cleanup_replica.pl | 2 +- src/test/recovery/t/031_recovery_conflict.pl | 2 +- src/test/recovery/t/032_relfilenode_reuse.pl | 2 +- src/test/recovery/t/033_replay_tsp_drops.pl | 2 +- src/test/recovery/t/034_create_database.pl | 2 +- src/test/recovery/t/035_standby_logical_decoding.pl | 2 +- src/test/recovery/t/036_truncated_dropped.pl | 2 +- src/test/recovery/t/037_invalid_database.pl | 2 +- src/test/recovery/t/038_save_logical_slots_shutdown.pl | 2 +- src/test/recovery/t/039_end_of_wal.pl | 2 +- src/test/recovery/t/cp_history_files | 2 +- src/test/ssl/t/001_ssltests.pl | 4 +++- src/test/ssl/t/002_scram.pl | 2 +- src/test/ssl/t/003_sslinfo.pl | 2 +- src/test/ssl/t/SSL/Backend/OpenSSL.pm | 2 +- src/test/ssl/t/SSL/Server.pm | 2 +- src/test/subscription/t/001_rep_changes.pl | 2 +- src/test/subscription/t/002_types.pl | 2 +- src/test/subscription/t/003_constraints.pl | 2 +- src/test/subscription/t/004_sync.pl | 2 +- src/test/subscription/t/005_encoding.pl | 2 +- src/test/subscription/t/006_rewrite.pl | 2 +- src/test/subscription/t/007_ddl.pl | 2 +- src/test/subscription/t/008_diff_schema.pl | 2 +- src/test/subscription/t/009_matviews.pl | 2 +- src/test/subscription/t/010_truncate.pl | 2 +- src/test/subscription/t/011_generated.pl | 2 +- src/test/subscription/t/012_collation.pl | 2 +- src/test/subscription/t/013_partition.pl | 2 +- src/test/subscription/t/014_binary.pl | 2 +- src/test/subscription/t/015_stream.pl | 2 +- src/test/subscription/t/016_stream_subxact.pl | 2 +- src/test/subscription/t/017_stream_ddl.pl | 2 +- src/test/subscription/t/018_stream_subxact_abort.pl | 2 +- src/test/subscription/t/019_stream_subxact_ddl_abort.pl | 2 +- src/test/subscription/t/020_messages.pl | 2 +- src/test/subscription/t/021_twophase.pl | 2 +- src/test/subscription/t/022_twophase_cascade.pl | 2 +- src/test/subscription/t/023_twophase_stream.pl | 2 +- src/test/subscription/t/024_add_drop_pub.pl | 2 +- src/test/subscription/t/025_rep_changes_for_schema.pl | 2 +- src/test/subscription/t/026_stats.pl | 2 +- src/test/subscription/t/027_nosuperuser.pl | 2 +- src/test/subscription/t/028_row_filter.pl | 2 +- src/test/subscription/t/029_on_error.pl | 2 +- src/test/subscription/t/030_origin.pl | 2 +- src/test/subscription/t/031_column_list.pl | 2 +- src/test/subscription/t/032_subscribe_use_index.pl | 2 +- src/test/subscription/t/033_run_as_table_owner.pl | 2 +- src/test/subscription/t/100_bugs.pl | 2 +- src/tools/PerfectHash.pm | 2 +- src/tools/check_bison_recursion.pl | 2 +- src/tools/ci/windows_build_config.pl | 2 +- src/tools/copyright.pl | 2 +- src/tools/fix-old-flex-code.pl | 2 +- src/tools/gen_export.pl | 2 +- src/tools/gen_keywordlist.pl | 2 +- src/tools/git_changelog | 2 +- src/tools/mark_pgdllimport.pl | 2 +- src/tools/msvc_gendef.pl | 2 +- src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl | 2 +- src/tools/pginclude/pgcheckdefines | 2 +- src/tools/pgindent/pgindent | 2 +- src/tools/version_stamp.pl | 2 +- src/tools/win32tzlist.pl | 2 +- 278 files changed, 282 insertions(+), 280 deletions(-) diff --git a/config/check_modules.pl b/config/check_modules.pl index 611f3a673f..1599abcc0b 100644 --- a/config/check_modules.pl +++ b/config/check_modules.pl @@ -5,7 +5,7 @@ # but specify them anyway for documentation's sake.) # use strict; -use warnings; +use warnings FATAL => 'all'; use Config; use IPC::Run 0.79; diff --git a/contrib/amcheck/t/001_verify_heapam.pl b/contrib/amcheck/t/001_verify_heapam.pl index 46d5b53181..c9caa48169 100644 --- a/contrib/amcheck/t/001_verify_heapam.pl +++ b/contrib/amcheck/t/001_verify_heapam.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/amcheck/t/002_cic.pl b/contrib/amcheck/t/002_cic.pl index 42a047a357..f0b5d8f7e4 100644 --- a/contrib/amcheck/t/002_cic.pl +++ b/contrib/amcheck/t/002_cic.pl @@ -3,7 +3,7 @@ # Test CREATE INDEX CONCURRENTLY with concurrent modifications use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/amcheck/t/003_cic_2pc.pl b/contrib/amcheck/t/003_cic_2pc.pl index 3279a2505a..a5eb2d9d69 100644 --- a/contrib/amcheck/t/003_cic_2pc.pl +++ b/contrib/amcheck/t/003_cic_2pc.pl @@ -3,7 +3,7 @@ # Test CREATE INDEX CONCURRENTLY with concurrent prepared-xact modifications use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/amcheck/t/004_verify_nbtree_unique.pl b/contrib/amcheck/t/004_verify_nbtree_unique.pl index b999ab9c17..cb36320986 100644 --- a/contrib/amcheck/t/004_verify_nbtree_unique.pl +++ b/contrib/amcheck/t/004_verify_nbtree_unique.pl @@ -5,7 +5,7 @@ # presence of breaking sort order changes. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/contrib/amcheck/t/005_pitr.pl b/contrib/amcheck/t/005_pitr.pl index 6bcc1596f2..aece77317e 100644 --- a/contrib/amcheck/t/005_pitr.pl +++ b/contrib/amcheck/t/005_pitr.pl @@ -2,7 +2,7 @@ # Test integrity of intermediate states by PITR to those states use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/contrib/auto_explain/t/001_auto_explain.pl b/contrib/auto_explain/t/001_auto_explain.pl index abb422f8de..2720215dbc 100644 --- a/contrib/auto_explain/t/001_auto_explain.pl +++ b/contrib/auto_explain/t/001_auto_explain.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/basebackup_to_shell/t/001_basic.pl b/contrib/basebackup_to_shell/t/001_basic.pl index e2cdd2ecb0..221f5b2296 100644 --- a/contrib/basebackup_to_shell/t/001_basic.pl +++ b/contrib/basebackup_to_shell/t/001_basic.pl @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl index 2a69ff1a74..7e8c2b1a3d 100644 --- a/contrib/bloom/t/001_wal.pl +++ b/contrib/bloom/t/001_wal.pl @@ -3,7 +3,7 @@ # Test generic xlog record work for bloom index replication. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/contrib/fuzzystrmatch/daitch_mokotoff_header.pl b/contrib/fuzzystrmatch/daitch_mokotoff_header.pl index 51a40e7748..5ee0d1cc7c 100755 --- a/contrib/fuzzystrmatch/daitch_mokotoff_header.pl +++ b/contrib/fuzzystrmatch/daitch_mokotoff_header.pl @@ -9,7 +9,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; die "Usage: $0 OUTPUT_FILE\n" if @ARGV != 1; my $output_file = $ARGV[0]; diff --git a/contrib/intarray/bench/bench.pl b/contrib/intarray/bench/bench.pl index 067654986e..ba8163ce11 100755 --- a/contrib/intarray/bench/bench.pl +++ b/contrib/intarray/bench/bench.pl @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; # make sure we are in a sane environment. use DBI(); diff --git a/contrib/intarray/bench/create_test.pl b/contrib/intarray/bench/create_test.pl index 6efe9151ca..f6ffc5b452 100755 --- a/contrib/intarray/bench/create_test.pl +++ b/contrib/intarray/bench/create_test.pl @@ -5,7 +5,7 @@ # contrib/intarray/bench/create_test.pl use strict; -use warnings; +use warnings FATAL => 'all'; print < 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/contrib/pg_prewarm/t/001_basic.pl b/contrib/pg_prewarm/t/001_basic.pl index 6b7c869afc..b2f86c1a25 100644 --- a/contrib/pg_prewarm/t/001_basic.pl +++ b/contrib/pg_prewarm/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/seg/seg-validate.pl b/contrib/seg/seg-validate.pl index 67c0015e6b..b21af13140 100755 --- a/contrib/seg/seg-validate.pl +++ b/contrib/seg/seg-validate.pl @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $integer = '[+-]?[0-9]+'; my $real = '[+-]?[0-9]+\.[0-9]+'; diff --git a/contrib/seg/sort-segments.pl b/contrib/seg/sort-segments.pl index 3cc21a3ba0..9bd71c0391 100755 --- a/contrib/seg/sort-segments.pl +++ b/contrib/seg/sort-segments.pl @@ -5,7 +5,7 @@ # this script will sort any table with the segment data type in its last column use strict; -use warnings; +use warnings FATAL => 'all'; my @rows; diff --git a/contrib/test_decoding/t/001_repl_stats.pl b/contrib/test_decoding/t/001_repl_stats.pl index 7c2d87561c..da466bdacf 100644 --- a/contrib/test_decoding/t/001_repl_stats.pl +++ b/contrib/test_decoding/t/001_repl_stats.pl @@ -4,7 +4,7 @@ # Test replication statistics data in pg_stat_replication_slots is sane after # drop replication slot and restart. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/contrib/vacuumlo/t/001_basic.pl b/contrib/vacuumlo/t/001_basic.pl index 75067863de..4e6566d86b 100644 --- a/contrib/vacuumlo/t/001_basic.pl +++ b/contrib/vacuumlo/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/doc/src/sgml/generate-errcodes-table.pl b/doc/src/sgml/generate-errcodes-table.pl index 51f22bde95..e4df6d9ece 100644 --- a/doc/src/sgml/generate-errcodes-table.pl +++ b/doc/src/sgml/generate-errcodes-table.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "\n"; diff --git a/doc/src/sgml/generate-keywords-table.pl b/doc/src/sgml/generate-keywords-table.pl index ee44edaa6c..145d131670 100644 --- a/doc/src/sgml/generate-keywords-table.pl +++ b/doc/src/sgml/generate-keywords-table.pl @@ -5,7 +5,7 @@ # Copyright (c) 2019-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my @sql_versions = reverse sort ('1992', '2016', '2023'); diff --git a/doc/src/sgml/generate-targets-meson.pl b/doc/src/sgml/generate-targets-meson.pl index 56a94d6ead..2a371ef86f 100644 --- a/doc/src/sgml/generate-targets-meson.pl +++ b/doc/src/sgml/generate-targets-meson.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $targets_meson_file = $ARGV[0]; open my $targets_meson, '<', $targets_meson_file or die; diff --git a/doc/src/sgml/mk_feature_tables.pl b/doc/src/sgml/mk_feature_tables.pl index 824be729a0..69b1d3a1a7 100644 --- a/doc/src/sgml/mk_feature_tables.pl +++ b/doc/src/sgml/mk_feature_tables.pl @@ -3,7 +3,7 @@ # doc/src/sgml/mk_feature_tables.pl use strict; -use warnings; +use warnings FATAL => 'all'; my $yesno = $ARGV[0]; diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm index be56cc153f..c1ba8bfd54 100644 --- a/src/backend/catalog/Catalog.pm +++ b/src/backend/catalog/Catalog.pm @@ -14,7 +14,7 @@ package Catalog; use strict; -use warnings; +use warnings FATAL => 'all'; use File::Compare; diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl index 380bc23c82..cde35cf242 100644 --- a/src/backend/catalog/genbki.pl +++ b/src/backend/catalog/genbki.pl @@ -14,7 +14,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; use FindBin; diff --git a/src/backend/nodes/gen_node_support.pl b/src/backend/nodes/gen_node_support.pl index 72c7963578..c7091d6bf2 100644 --- a/src/backend/nodes/gen_node_support.pl +++ b/src/backend/nodes/gen_node_support.pl @@ -16,7 +16,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; use Getopt::Long; diff --git a/src/backend/parser/check_keywords.pl b/src/backend/parser/check_keywords.pl index e9b6f40eaa..cc58ce88a9 100644 --- a/src/backend/parser/check_keywords.pl +++ b/src/backend/parser/check_keywords.pl @@ -7,7 +7,7 @@ # Copyright (c) 2009-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $gram_filename = $ARGV[0]; my $kwlist_filename = $ARGV[1]; diff --git a/src/backend/snowball/snowball_create.pl b/src/backend/snowball/snowball_create.pl index 35d1cd9621..f1c5d160de 100644 --- a/src/backend/snowball/snowball_create.pl +++ b/src/backend/snowball/snowball_create.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $outdir_path = ''; diff --git a/src/backend/storage/lmgr/generate-lwlocknames.pl b/src/backend/storage/lmgr/generate-lwlocknames.pl index 863c88252b..34bac0faf5 100644 --- a/src/backend/storage/lmgr/generate-lwlocknames.pl +++ b/src/backend/storage/lmgr/generate-lwlocknames.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $output_path = '.'; diff --git a/src/backend/utils/Gen_dummy_probes.pl b/src/backend/utils/Gen_dummy_probes.pl index f6df82baa5..e82caae846 100644 --- a/src/backend/utils/Gen_dummy_probes.pl +++ b/src/backend/utils/Gen_dummy_probes.pl @@ -7,7 +7,7 @@ #------------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; m/^\s*probe / || next; s/^\s*probe ([^(]*)(.*);/$1$2/; diff --git a/src/backend/utils/Gen_fmgrtab.pl b/src/backend/utils/Gen_fmgrtab.pl index 764216c56d..d0f3652136 100644 --- a/src/backend/utils/Gen_fmgrtab.pl +++ b/src/backend/utils/Gen_fmgrtab.pl @@ -17,7 +17,7 @@ use Catalog; use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $output_path = ''; diff --git a/src/backend/utils/activity/generate-wait_event_types.pl b/src/backend/utils/activity/generate-wait_event_types.pl index 046be2cb70..14506990a2 100644 --- a/src/backend/utils/activity/generate-wait_event_types.pl +++ b/src/backend/utils/activity/generate-wait_event_types.pl @@ -15,7 +15,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $output_path = '.'; diff --git a/src/backend/utils/generate-errcodes.pl b/src/backend/utils/generate-errcodes.pl index 34d0f25c23..42730e8c1a 100644 --- a/src/backend/utils/generate-errcodes.pl +++ b/src/backend/utils/generate-errcodes.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $outfile = ''; diff --git a/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl b/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl index 4c5724b8b7..41fe881e1b 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl @@ -25,7 +25,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl index f9ff2bd3d2..a14e4ac820 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl @@ -14,7 +14,7 @@ # and the "b" field is the hex byte sequence for GB18030 use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl index 2d0e05fb79..4b77ecc694 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl @@ -8,7 +8,7 @@ # "euc-jis-2004-std.txt" (http://x0213.org) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl index 4073578027..41c825dbe7 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl @@ -12,7 +12,7 @@ # organization's ftp site. use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl index 9112e1cfe9..ff2a644012 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl @@ -17,7 +17,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl index 4ad17064ab..d2a3dac589 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl @@ -18,7 +18,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl index 9c8a983bf7..88c9c374b2 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl @@ -14,7 +14,7 @@ # and the "b" field is the hex byte sequence for GB18030 use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl b/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl index f50baa8f1f..decf8ab443 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl @@ -16,7 +16,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl b/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl index ed010a58fa..eb57ca89c5 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl @@ -8,7 +8,7 @@ # "sjis-0213-2004-std.txt" (http://x0213.org) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl b/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl index 0808c6836b..3ef8960ade 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl @@ -11,7 +11,7 @@ # ftp site. use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_UHC.pl b/src/backend/utils/mb/Unicode/UCS_to_UHC.pl index 207677d76d..cc8b7d804c 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_UHC.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_UHC.pl @@ -14,7 +14,7 @@ # and the "b" field is the hex byte sequence for UHC use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/UCS_to_most.pl b/src/backend/utils/mb/Unicode/UCS_to_most.pl index a1947308ff..2a095b7d7d 100755 --- a/src/backend/utils/mb/Unicode/UCS_to_most.pl +++ b/src/backend/utils/mb/Unicode/UCS_to_most.pl @@ -16,7 +16,7 @@ # # and Unicode name (not used in this script) use strict; -use warnings; +use warnings FATAL => 'all'; use convutils; diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm index 77de7b1a4d..0f55d9621b 100644 --- a/src/backend/utils/mb/Unicode/convutils.pm +++ b/src/backend/utils/mb/Unicode/convutils.pm @@ -6,7 +6,7 @@ package convutils; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Exporter 'import'; diff --git a/src/bin/initdb/t/001_initdb.pl b/src/bin/initdb/t/001_initdb.pl index 45f96cd8bb..cd86ce3122 100644 --- a/src/bin/initdb/t/001_initdb.pl +++ b/src/bin/initdb/t/001_initdb.pl @@ -6,7 +6,7 @@ # Successful initdb consumes much time and I/O. use strict; -use warnings; +use warnings FATAL => 'all'; use Fcntl ':mode'; use File::stat qw{lstat}; use PostgreSQL::Test::Cluster; diff --git a/src/bin/pg_amcheck/t/001_basic.pl b/src/bin/pg_amcheck/t/001_basic.pl index 1f1e33278b..9737d965aa 100644 --- a/src/bin/pg_amcheck/t/001_basic.pl +++ b/src/bin/pg_amcheck/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_amcheck/t/002_nonesuch.pl b/src/bin/pg_amcheck/t/002_nonesuch.pl index 99b94dd022..df7ff5397a 100644 --- a/src/bin/pg_amcheck/t/002_nonesuch.pl +++ b/src/bin/pg_amcheck/t/002_nonesuch.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_amcheck/t/003_check.pl b/src/bin/pg_amcheck/t/003_check.pl index 2b7ef19855..6d756e70a3 100644 --- a/src/bin/pg_amcheck/t/003_check.pl +++ b/src/bin/pg_amcheck/t/003_check.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_amcheck/t/004_verify_heapam.pl b/src/bin/pg_amcheck/t/004_verify_heapam.pl index 1b5027c420..0f57adabe6 100644 --- a/src/bin/pg_amcheck/t/004_verify_heapam.pl +++ b/src/bin/pg_amcheck/t/004_verify_heapam.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_amcheck/t/005_opclass_damage.pl b/src/bin/pg_amcheck/t/005_opclass_damage.pl index a5ef2c0f33..e8e1d62d83 100644 --- a/src/bin/pg_amcheck/t/005_opclass_damage.pl +++ b/src/bin/pg_amcheck/t/005_opclass_damage.pl @@ -5,7 +5,7 @@ # presence of breaking sort order changes. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl b/src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl index 18a82ff002..279c438345 100644 --- a/src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl +++ b/src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl index bf765291e7..53a9823c17 100644 --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename qw(basename dirname); use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; diff --git a/src/bin/pg_basebackup/t/011_in_place_tablespace.pl b/src/bin/pg_basebackup/t/011_in_place_tablespace.pl index d58696e8f9..da7154362e 100644 --- a/src/bin/pg_basebackup/t/011_in_place_tablespace.pl +++ b/src/bin/pg_basebackup/t/011_in_place_tablespace.pl @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_basebackup/t/020_pg_receivewal.pl b/src/bin/pg_basebackup/t/020_pg_receivewal.pl index 374f090a8b..765049ee96 100644 --- a/src/bin/pg_basebackup/t/020_pg_receivewal.pl +++ b/src/bin/pg_basebackup/t/020_pg_receivewal.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl index 62dca5b67a..1bbe88da14 100644 --- a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl +++ b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/pg_checksums/t/001_basic.pl b/src/bin/pg_checksums/t/001_basic.pl index d3601a5dd8..cfc147b77c 100644 --- a/src/bin/pg_checksums/t/001_basic.pl +++ b/src/bin/pg_checksums/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl index 2d63182d59..207dc8ec9c 100644 --- a/src/bin/pg_checksums/t/002_actions.pl +++ b/src/bin/pg_checksums/t/002_actions.pl @@ -5,7 +5,7 @@ # an initialized cluster. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_combinebackup/t/001_basic.pl b/src/bin/pg_combinebackup/t/001_basic.pl index fb66075d1a..7558bfb1fa 100644 --- a/src/bin/pg_combinebackup/t/001_basic.pl +++ b/src/bin/pg_combinebackup/t/001_basic.pl @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_combinebackup/t/002_compare_backups.pl b/src/bin/pg_combinebackup/t/002_compare_backups.pl index 99a4f5ba2d..3c612bd759 100644 --- a/src/bin/pg_combinebackup/t/002_compare_backups.pl +++ b/src/bin/pg_combinebackup/t/002_compare_backups.pl @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Compare; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_combinebackup/t/003_timeline.pl b/src/bin/pg_combinebackup/t/003_timeline.pl index bc053ca5e8..5abef20a9c 100644 --- a/src/bin/pg_combinebackup/t/003_timeline.pl +++ b/src/bin/pg_combinebackup/t/003_timeline.pl @@ -4,7 +4,7 @@ # properly even when the reference backup is on a different timeline. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Compare; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_combinebackup/t/004_manifest.pl b/src/bin/pg_combinebackup/t/004_manifest.pl index 4f3779274f..ed1821e0ef 100644 --- a/src/bin/pg_combinebackup/t/004_manifest.pl +++ b/src/bin/pg_combinebackup/t/004_manifest.pl @@ -6,7 +6,7 @@ # pg_combinebackup does not produce a manifest when run with --no-manifest. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Compare; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_combinebackup/t/005_integrity.pl b/src/bin/pg_combinebackup/t/005_integrity.pl index b1f63a43e0..02909ecb42 100644 --- a/src/bin/pg_combinebackup/t/005_integrity.pl +++ b/src/bin/pg_combinebackup/t/005_integrity.pl @@ -5,7 +5,7 @@ # prior backup. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Compare; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; diff --git a/src/bin/pg_config/t/001_pg_config.pl b/src/bin/pg_config/t/001_pg_config.pl index 24acf7872b..693f7be054 100644 --- a/src/bin/pg_config/t/001_pg_config.pl +++ b/src/bin/pg_config/t/001_pg_config.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_controldata/t/001_pg_controldata.pl b/src/bin/pg_controldata/t/001_pg_controldata.pl index 9db8015d0b..6c7deda617 100644 --- a/src/bin/pg_controldata/t/001_pg_controldata.pl +++ b/src/bin/pg_controldata/t/001_pg_controldata.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_ctl/t/001_start_stop.pl b/src/bin/pg_ctl/t/001_start_stop.pl index f019fe1703..e072916dfa 100644 --- a/src/bin/pg_ctl/t/001_start_stop.pl +++ b/src/bin/pg_ctl/t/001_start_stop.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_ctl/t/002_status.pl b/src/bin/pg_ctl/t/002_status.pl index f5c50f6a7d..95bba696a4 100644 --- a/src/bin/pg_ctl/t/002_status.pl +++ b/src/bin/pg_ctl/t/002_status.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_ctl/t/003_promote.pl b/src/bin/pg_ctl/t/003_promote.pl index 0e83933098..f38e02f4a2 100644 --- a/src/bin/pg_ctl/t/003_promote.pl +++ b/src/bin/pg_ctl/t/003_promote.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_ctl/t/004_logrotate.pl b/src/bin/pg_ctl/t/004_logrotate.pl index 8d48e56ee9..912d89b5d6 100644 --- a/src/bin/pg_ctl/t/004_logrotate.pl +++ b/src/bin/pg_ctl/t/004_logrotate.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/001_basic.pl b/src/bin/pg_dump/t/001_basic.pl index 8c63d31cb6..60f0e1de45 100644 --- a/src/bin/pg_dump/t/001_basic.pl +++ b/src/bin/pg_dump/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl index a671603cd2..1639bdd9fc 100644 --- a/src/bin/pg_dump/t/002_pg_dump.pl +++ b/src/bin/pg_dump/t/002_pg_dump.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/003_pg_dump_with_server.pl b/src/bin/pg_dump/t/003_pg_dump_with_server.pl index ab025c44a4..e21de45ba2 100644 --- a/src/bin/pg_dump/t/003_pg_dump_with_server.pl +++ b/src/bin/pg_dump/t/003_pg_dump_with_server.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/004_pg_dump_parallel.pl b/src/bin/pg_dump/t/004_pg_dump_parallel.pl index c4b461ed87..c14391f58b 100644 --- a/src/bin/pg_dump/t/004_pg_dump_parallel.pl +++ b/src/bin/pg_dump/t/004_pg_dump_parallel.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/005_pg_dump_filterfile.pl b/src/bin/pg_dump/t/005_pg_dump_filterfile.pl index d16f034170..308a1e42c4 100644 --- a/src/bin/pg_dump/t/005_pg_dump_filterfile.pl +++ b/src/bin/pg_dump/t/005_pg_dump_filterfile.pl @@ -2,7 +2,7 @@ # Copyright (c) 2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_dump/t/010_dump_connstr.pl b/src/bin/pg_dump/t/010_dump_connstr.pl index ed86c332ef..f03e1e08cc 100644 --- a/src/bin/pg_dump/t/010_dump_connstr.pl +++ b/src/bin/pg_dump/t/010_dump_connstr.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_resetwal/t/001_basic.pl b/src/bin/pg_resetwal/t/001_basic.pl index 18d0882cb1..dcb5fa846e 100644 --- a/src/bin/pg_resetwal/t/001_basic.pl +++ b/src/bin/pg_resetwal/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_resetwal/t/002_corrupted.pl b/src/bin/pg_resetwal/t/002_corrupted.pl index 91e4757ebc..61c2339e24 100644 --- a/src/bin/pg_resetwal/t/002_corrupted.pl +++ b/src/bin/pg_resetwal/t/002_corrupted.pl @@ -4,7 +4,7 @@ # Tests for handling a corrupted pg_control use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_rewind/t/001_basic.pl b/src/bin/pg_rewind/t/001_basic.pl index c7b48255a7..842f6c7fbe 100644 --- a/src/bin/pg_rewind/t/001_basic.pl +++ b/src/bin/pg_rewind/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/002_databases.pl b/src/bin/pg_rewind/t/002_databases.pl index 0d480aedb4..313b2486e1 100644 --- a/src/bin/pg_rewind/t/002_databases.pl +++ b/src/bin/pg_rewind/t/002_databases.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/003_extrafiles.pl b/src/bin/pg_rewind/t/003_extrafiles.pl index fd2bee5d20..6e040239c4 100644 --- a/src/bin/pg_rewind/t/003_extrafiles.pl +++ b/src/bin/pg_rewind/t/003_extrafiles.pl @@ -4,7 +4,7 @@ # Test how pg_rewind reacts to extra files and directories in the data dirs. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl index 5fb7fa9077..7d1bb65cae 100644 --- a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl +++ b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl @@ -5,7 +5,7 @@ # Test pg_rewind when the target's pg_wal directory is a symlink. # use strict; -use warnings; +use warnings FATAL => 'all'; use File::Copy; use File::Path qw(rmtree); use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_rewind/t/005_same_timeline.pl b/src/bin/pg_rewind/t/005_same_timeline.pl index b4ef05e560..57e04b0ce2 100644 --- a/src/bin/pg_rewind/t/005_same_timeline.pl +++ b/src/bin/pg_rewind/t/005_same_timeline.pl @@ -6,7 +6,7 @@ # on the same timeline runs successfully. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/006_options.pl b/src/bin/pg_rewind/t/006_options.pl index 4b6e39a47c..c346b370a6 100644 --- a/src/bin/pg_rewind/t/006_options.pl +++ b/src/bin/pg_rewind/t/006_options.pl @@ -5,7 +5,7 @@ # Test checking options of pg_rewind. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/007_standby_source.pl b/src/bin/pg_rewind/t/007_standby_source.pl index 4fd1ed001c..fab84a4bbb 100644 --- a/src/bin/pg_rewind/t/007_standby_source.pl +++ b/src/bin/pg_rewind/t/007_standby_source.pl @@ -25,7 +25,7 @@ # as is. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/008_min_recovery_point.pl b/src/bin/pg_rewind/t/008_min_recovery_point.pl index d4c89451e6..287e4555b5 100644 --- a/src/bin/pg_rewind/t/008_min_recovery_point.pl +++ b/src/bin/pg_rewind/t/008_min_recovery_point.pl @@ -31,7 +31,7 @@ # nodes. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/009_growing_files.pl b/src/bin/pg_rewind/t/009_growing_files.pl index cf60a04ae7..016f7736e7 100644 --- a/src/bin/pg_rewind/t/009_growing_files.pl +++ b/src/bin/pg_rewind/t/009_growing_files.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm index 8fbbd521cb..23144f19e8 100644 --- a/src/bin/pg_rewind/t/RewindTest.pm +++ b/src/bin/pg_rewind/t/RewindTest.pm @@ -32,7 +32,7 @@ package RewindTest; # to run psql against the primary and standby servers, respectively. use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Exporter 'import'; diff --git a/src/bin/pg_test_fsync/t/001_basic.pl b/src/bin/pg_test_fsync/t/001_basic.pl index 401ad2c07c..135e68b9ba 100644 --- a/src/bin/pg_test_fsync/t/001_basic.pl +++ b/src/bin/pg_test_fsync/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_test_timing/t/001_basic.pl b/src/bin/pg_test_timing/t/001_basic.pl index 43bc68cb37..628a603f85 100644 --- a/src/bin/pg_test_timing/t/001_basic.pl +++ b/src/bin/pg_test_timing/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_upgrade/t/001_basic.pl b/src/bin/pg_upgrade/t/001_basic.pl index ceac4e0851..6f7117cec6 100644 --- a/src/bin/pg_upgrade/t/001_basic.pl +++ b/src/bin/pg_upgrade/t/001_basic.pl @@ -1,7 +1,7 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl index e5f57e550a..b0470844de 100644 --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl @@ -2,7 +2,7 @@ # Set of tests for pg_upgrade, including cross-version checks. use strict; -use warnings; +use warnings FATAL => 'all'; use Cwd qw(abs_path); use File::Basename qw(dirname); diff --git a/src/bin/pg_upgrade/t/003_logical_slots.pl b/src/bin/pg_upgrade/t/003_logical_slots.pl index 020e7aa1cc..752c25a601 100644 --- a/src/bin/pg_upgrade/t/003_logical_slots.pl +++ b/src/bin/pg_upgrade/t/003_logical_slots.pl @@ -3,7 +3,7 @@ # Tests for upgrading logical replication slots use strict; -use warnings; +use warnings FATAL => 'all'; use File::Find qw(find); diff --git a/src/bin/pg_verifybackup/t/001_basic.pl b/src/bin/pg_verifybackup/t/001_basic.pl index 73e8663238..f1127c827a 100644 --- a/src/bin/pg_verifybackup/t/001_basic.pl +++ b/src/bin/pg_verifybackup/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_verifybackup/t/002_algorithm.pl b/src/bin/pg_verifybackup/t/002_algorithm.pl index 5b02ea4d55..c9f0c10f83 100644 --- a/src/bin/pg_verifybackup/t/002_algorithm.pl +++ b/src/bin/pg_verifybackup/t/002_algorithm.pl @@ -4,7 +4,7 @@ # Verify that we can take and verify backups with various checksum types. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/003_corruption.pl b/src/bin/pg_verifybackup/t/003_corruption.pl index 4cc3dd05e3..273a6ff77b 100644 --- a/src/bin/pg_verifybackup/t/003_corruption.pl +++ b/src/bin/pg_verifybackup/t/003_corruption.pl @@ -4,7 +4,7 @@ # Verify that various forms of corruption are detected by pg_verifybackup. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/004_options.pl b/src/bin/pg_verifybackup/t/004_options.pl index 2aa8352f00..f6b092b58a 100644 --- a/src/bin/pg_verifybackup/t/004_options.pl +++ b/src/bin/pg_verifybackup/t/004_options.pl @@ -4,7 +4,7 @@ # Verify the behavior of assorted pg_verifybackup options. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/005_bad_manifest.pl b/src/bin/pg_verifybackup/t/005_bad_manifest.pl index c94fdd5df8..d481ea1f02 100644 --- a/src/bin/pg_verifybackup/t/005_bad_manifest.pl +++ b/src/bin/pg_verifybackup/t/005_bad_manifest.pl @@ -5,7 +5,7 @@ # problems. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_verifybackup/t/006_encoding.pl b/src/bin/pg_verifybackup/t/006_encoding.pl index 0b37bda20c..3831a28272 100644 --- a/src/bin/pg_verifybackup/t/006_encoding.pl +++ b/src/bin/pg_verifybackup/t/006_encoding.pl @@ -4,7 +4,7 @@ # Verify that pg_verifybackup handles hex-encoded filenames correctly. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_verifybackup/t/007_wal.pl b/src/bin/pg_verifybackup/t/007_wal.pl index 89f96f85db..ea3d60b242 100644 --- a/src/bin/pg_verifybackup/t/007_wal.pl +++ b/src/bin/pg_verifybackup/t/007_wal.pl @@ -4,7 +4,7 @@ # Test pg_verifybackup's WAL verification. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_verifybackup/t/008_untar.pl b/src/bin/pg_verifybackup/t/008_untar.pl index 1a783d1188..7f0f2245f6 100644 --- a/src/bin/pg_verifybackup/t/008_untar.pl +++ b/src/bin/pg_verifybackup/t/008_untar.pl @@ -6,7 +6,7 @@ # format. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/009_extract.pl b/src/bin/pg_verifybackup/t/009_extract.pl index f4d5378555..e8e4f60768 100644 --- a/src/bin/pg_verifybackup/t/009_extract.pl +++ b/src/bin/pg_verifybackup/t/009_extract.pl @@ -5,7 +5,7 @@ # a backup which was compressed by the server. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_verifybackup/t/010_client_untar.pl b/src/bin/pg_verifybackup/t/010_client_untar.pl index 44d83e777f..64907f0cae 100644 --- a/src/bin/pg_verifybackup/t/010_client_untar.pl +++ b/src/bin/pg_verifybackup/t/010_client_untar.pl @@ -5,7 +5,7 @@ # backup that didn't start out in plain format. use strict; -use warnings; +use warnings FATAL => 'all'; use File::Path qw(rmtree); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pg_waldump/t/001_basic.pl b/src/bin/pg_waldump/t/001_basic.pl index 029a0d0521..b805283385 100644 --- a/src/bin/pg_waldump/t/001_basic.pl +++ b/src/bin/pg_waldump/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/pg_waldump/t/002_save_fullpage.pl b/src/bin/pg_waldump/t/002_save_fullpage.pl index f0725805f2..ed6726c486 100644 --- a/src/bin/pg_waldump/t/002_save_fullpage.pl +++ b/src/bin/pg_waldump/t/002_save_fullpage.pl @@ -2,7 +2,7 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::RecursiveCopy; diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl index 85e6520007..3e719cdeca 100644 --- a/src/bin/pgbench/t/001_pgbench_with_server.pl +++ b/src/bin/pgbench/t/001_pgbench_with_server.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/pgbench/t/002_pgbench_no_server.pl b/src/bin/pgbench/t/002_pgbench_no_server.pl index ffc8c772ae..457c67555f 100644 --- a/src/bin/pgbench/t/002_pgbench_no_server.pl +++ b/src/bin/pgbench/t/002_pgbench_no_server.pl @@ -6,7 +6,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl index 0809db4151..def02465d5 100644 --- a/src/bin/psql/create_help.pl +++ b/src/bin/psql/create_help.pl @@ -20,7 +20,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $docdir = ''; diff --git a/src/bin/psql/t/001_basic.pl b/src/bin/psql/t/001_basic.pl index 95f4e60ab2..eefcdfa05f 100644 --- a/src/bin/psql/t/001_basic.pl +++ b/src/bin/psql/t/001_basic.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use locale; use PostgreSQL::Test::Cluster; diff --git a/src/bin/psql/t/010_tab_completion.pl b/src/bin/psql/t/010_tab_completion.pl index f2d2809aef..2220ea270f 100644 --- a/src/bin/psql/t/010_tab_completion.pl +++ b/src/bin/psql/t/010_tab_completion.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/psql/t/020_cancel.pl b/src/bin/psql/t/020_cancel.pl index 2590b014dd..5f0b921ac3 100644 --- a/src/bin/psql/t/020_cancel.pl +++ b/src/bin/psql/t/020_cancel.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/010_clusterdb.pl b/src/bin/scripts/t/010_clusterdb.pl index 715207fb4d..60792c2eea 100644 --- a/src/bin/scripts/t/010_clusterdb.pl +++ b/src/bin/scripts/t/010_clusterdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/011_clusterdb_all.pl b/src/bin/scripts/t/011_clusterdb_all.pl index 35f0b18f50..26315d0a51 100644 --- a/src/bin/scripts/t/011_clusterdb_all.pl +++ b/src/bin/scripts/t/011_clusterdb_all.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/020_createdb.pl b/src/bin/scripts/t/020_createdb.pl index 40291924e5..8815477672 100644 --- a/src/bin/scripts/t/020_createdb.pl +++ b/src/bin/scripts/t/020_createdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/040_createuser.pl b/src/bin/scripts/t/040_createuser.pl index 3290e30c88..75dd7331ba 100644 --- a/src/bin/scripts/t/040_createuser.pl +++ b/src/bin/scripts/t/040_createuser.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/050_dropdb.pl b/src/bin/scripts/t/050_dropdb.pl index 3ed670bb0a..e5acab9a38 100644 --- a/src/bin/scripts/t/050_dropdb.pl +++ b/src/bin/scripts/t/050_dropdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/070_dropuser.pl b/src/bin/scripts/t/070_dropuser.pl index 95c24c4f30..74947e8ca7 100644 --- a/src/bin/scripts/t/070_dropuser.pl +++ b/src/bin/scripts/t/070_dropuser.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/080_pg_isready.pl b/src/bin/scripts/t/080_pg_isready.pl index 8f53aef573..9784006465 100644 --- a/src/bin/scripts/t/080_pg_isready.pl +++ b/src/bin/scripts/t/080_pg_isready.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/090_reindexdb.pl b/src/bin/scripts/t/090_reindexdb.pl index b663d0e741..7ed71849c3 100644 --- a/src/bin/scripts/t/090_reindexdb.pl +++ b/src/bin/scripts/t/090_reindexdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/091_reindexdb_all.pl b/src/bin/scripts/t/091_reindexdb_all.pl index 7f3e081ceb..fdb198b4e7 100644 --- a/src/bin/scripts/t/091_reindexdb_all.pl +++ b/src/bin/scripts/t/091_reindexdb_all.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/scripts/t/100_vacuumdb.pl b/src/bin/scripts/t/100_vacuumdb.pl index 925079bbed..f731457e2e 100644 --- a/src/bin/scripts/t/100_vacuumdb.pl +++ b/src/bin/scripts/t/100_vacuumdb.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/bin/scripts/t/101_vacuumdb_all.pl b/src/bin/scripts/t/101_vacuumdb_all.pl index 8d7c3ab014..673a94d005 100644 --- a/src/bin/scripts/t/101_vacuumdb_all.pl +++ b/src/bin/scripts/t/101_vacuumdb_all.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/scripts/t/102_vacuumdb_stages.pl b/src/bin/scripts/t/102_vacuumdb_stages.pl index 64d7ed1575..c1174fd5e8 100644 --- a/src/bin/scripts/t/102_vacuumdb_stages.pl +++ b/src/bin/scripts/t/102_vacuumdb_stages.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/bin/scripts/t/200_connstr.pl b/src/bin/scripts/t/200_connstr.pl index 53c5e21ab2..4f3d9ffe98 100644 --- a/src/bin/scripts/t/200_connstr.pl +++ b/src/bin/scripts/t/200_connstr.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/common/unicode/generate-norm_test_table.pl b/src/common/unicode/generate-norm_test_table.pl index 3434f7e263..fb1718047f 100644 --- a/src/common/unicode/generate-norm_test_table.pl +++ b/src/common/unicode/generate-norm_test_table.pl @@ -8,7 +8,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; diff --git a/src/common/unicode/generate-unicode_category_table.pl b/src/common/unicode/generate-unicode_category_table.pl index 992b877ede..7936eed102 100644 --- a/src/common/unicode/generate-unicode_category_table.pl +++ b/src/common/unicode/generate-unicode_category_table.pl @@ -9,7 +9,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; use FindBin; diff --git a/src/common/unicode/generate-unicode_east_asian_fw_table.pl b/src/common/unicode/generate-unicode_east_asian_fw_table.pl index 125bd396a0..91423be78e 100644 --- a/src/common/unicode/generate-unicode_east_asian_fw_table.pl +++ b/src/common/unicode/generate-unicode_east_asian_fw_table.pl @@ -7,7 +7,7 @@ # Copyright (c) 2019-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $range_start = undef; my ($first, $last); diff --git a/src/common/unicode/generate-unicode_nonspacing_table.pl b/src/common/unicode/generate-unicode_nonspacing_table.pl index ae86e82922..521b939943 100644 --- a/src/common/unicode/generate-unicode_nonspacing_table.pl +++ b/src/common/unicode/generate-unicode_nonspacing_table.pl @@ -7,7 +7,7 @@ # Copyright (c) 2019-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $range_start = undef; my $codepoint; diff --git a/src/common/unicode/generate-unicode_norm_table.pl b/src/common/unicode/generate-unicode_norm_table.pl index d5914118ab..65b001d065 100644 --- a/src/common/unicode/generate-unicode_norm_table.pl +++ b/src/common/unicode/generate-unicode_norm_table.pl @@ -9,7 +9,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; use FindBin; diff --git a/src/common/unicode/generate-unicode_normprops_table.pl b/src/common/unicode/generate-unicode_normprops_table.pl index 1b7473180b..f831c2d0d5 100644 --- a/src/common/unicode/generate-unicode_normprops_table.pl +++ b/src/common/unicode/generate-unicode_normprops_table.pl @@ -7,7 +7,7 @@ # Copyright (c) 2020-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib "$FindBin::RealBin/../../tools/"; diff --git a/src/common/unicode/generate-unicode_version.pl b/src/common/unicode/generate-unicode_version.pl index 22eb2f1a3d..e8cdb8e7d1 100644 --- a/src/common/unicode/generate-unicode_version.pl +++ b/src/common/unicode/generate-unicode_version.pl @@ -7,7 +7,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; use FindBin; diff --git a/src/include/catalog/duplicate_oids b/src/include/catalog/duplicate_oids index eb5c3fb084..1830b95b0a 100755 --- a/src/include/catalog/duplicate_oids +++ b/src/include/catalog/duplicate_oids @@ -17,7 +17,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; # Must run in src/include/catalog use FindBin; diff --git a/src/include/catalog/reformat_dat_file.pl b/src/include/catalog/reformat_dat_file.pl index 725117d846..b5235c24d3 100755 --- a/src/include/catalog/reformat_dat_file.pl +++ b/src/include/catalog/reformat_dat_file.pl @@ -18,7 +18,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use Getopt::Long; diff --git a/src/include/catalog/renumber_oids.pl b/src/include/catalog/renumber_oids.pl index ec09584959..a418b33d58 100755 --- a/src/include/catalog/renumber_oids.pl +++ b/src/include/catalog/renumber_oids.pl @@ -16,7 +16,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use Getopt::Long; diff --git a/src/include/catalog/unused_oids b/src/include/catalog/unused_oids index ccf3c3f781..f5f0c57b74 100755 --- a/src/include/catalog/unused_oids +++ b/src/include/catalog/unused_oids @@ -19,7 +19,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; # Must run in src/include/catalog use FindBin; diff --git a/src/interfaces/ecpg/preproc/check_rules.pl b/src/interfaces/ecpg/preproc/check_rules.pl index 5e823fa30e..6417ee7315 100644 --- a/src/interfaces/ecpg/preproc/check_rules.pl +++ b/src/interfaces/ecpg/preproc/check_rules.pl @@ -17,7 +17,7 @@ # Then it checks to make sure each rule in ecpg.addons was found in gram.y use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $srcdir = '.'; diff --git a/src/interfaces/ecpg/preproc/parse.pl b/src/interfaces/ecpg/preproc/parse.pl index 7574fc3110..b0caeb356f 100644 --- a/src/interfaces/ecpg/preproc/parse.pl +++ b/src/interfaces/ecpg/preproc/parse.pl @@ -13,7 +13,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $srcdir = '.'; diff --git a/src/interfaces/libpq/t/001_uri.pl b/src/interfaces/libpq/t/001_uri.pl index fd062a95c5..cd876e758f 100644 --- a/src/interfaces/libpq/t/001_uri.pl +++ b/src/interfaces/libpq/t/001_uri.pl @@ -1,6 +1,6 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/interfaces/libpq/t/002_api.pl b/src/interfaces/libpq/t/002_api.pl index 8b43a984fb..9d376bcaa2 100644 --- a/src/interfaces/libpq/t/002_api.pl +++ b/src/interfaces/libpq/t/002_api.pl @@ -1,6 +1,6 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/interfaces/libpq/t/003_load_balance_host_list.pl b/src/interfaces/libpq/t/003_load_balance_host_list.pl index 21c3b8dd33..c6fe049fe5 100644 --- a/src/interfaces/libpq/t/003_load_balance_host_list.pl +++ b/src/interfaces/libpq/t/003_load_balance_host_list.pl @@ -1,6 +1,6 @@ # Copyright (c) 2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Config; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; diff --git a/src/interfaces/libpq/t/004_load_balance_dns.pl b/src/interfaces/libpq/t/004_load_balance_dns.pl index 875070e212..81cf628ac7 100644 --- a/src/interfaces/libpq/t/004_load_balance_dns.pl +++ b/src/interfaces/libpq/t/004_load_balance_dns.pl @@ -1,6 +1,6 @@ # Copyright (c) 2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Config; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; diff --git a/src/pl/plperl/plc_perlboot.pl b/src/pl/plperl/plc_perlboot.pl index 13298013d3..90c1b7e667 100644 --- a/src/pl/plperl/plc_perlboot.pl +++ b/src/pl/plperl/plc_perlboot.pl @@ -4,7 +4,7 @@ # src/pl/plperl/plc_perlboot.pl use strict; -use warnings; +use warnings FATAL => 'all'; use vars qw(%_SHARED $_TD); @@ -58,7 +58,7 @@ sub ::encode_array_constructor package PostgreSQL::InServer; ## no critic (RequireFilenameMatchesPackage) #>>> use strict; - use warnings; + use warnings FATAL => 'all'; sub plperl_warn { @@ -107,7 +107,7 @@ sub ::encode_array_constructor package PostgreSQL::InServer::ARRAY; use strict; - use warnings; + use warnings FATAL => 'all'; use overload '""' => \&to_str, diff --git a/src/pl/plperl/plperl_opmask.pl b/src/pl/plperl/plperl_opmask.pl index 26ac717770..09dc72d273 100644 --- a/src/pl/plperl/plperl_opmask.pl +++ b/src/pl/plperl/plperl_opmask.pl @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Opcode qw(opset opset_to_ops opdesc); diff --git a/src/pl/plperl/text2macro.pl b/src/pl/plperl/text2macro.pl index 933632c0df..7a41da84c6 100644 --- a/src/pl/plperl/text2macro.pl +++ b/src/pl/plperl/text2macro.pl @@ -27,7 +27,7 @@ file as capitalized and used as the name of the macro, along with an optional pr =cut use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; diff --git a/src/pl/plpgsql/src/generate-plerrcodes.pl b/src/pl/plpgsql/src/generate-plerrcodes.pl index f4fd376ef9..03ce58b94e 100644 --- a/src/pl/plpgsql/src/generate-plerrcodes.pl +++ b/src/pl/plpgsql/src/generate-plerrcodes.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n"; diff --git a/src/pl/plpython/generate-spiexceptions.pl b/src/pl/plpython/generate-spiexceptions.pl index 61b37c3541..090e20472c 100644 --- a/src/pl/plpython/generate-spiexceptions.pl +++ b/src/pl/plpython/generate-spiexceptions.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n"; diff --git a/src/pl/tcl/generate-pltclerrcodes.pl b/src/pl/tcl/generate-pltclerrcodes.pl index 9c2309108c..df1ba7d4d4 100644 --- a/src/pl/tcl/generate-pltclerrcodes.pl +++ b/src/pl/tcl/generate-pltclerrcodes.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "/* autogenerated from src/backend/utils/errcodes.txt, do not edit */\n"; diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl index 320e45ef84..6a2b2ae790 100644 --- a/src/test/authentication/t/001_password.pl +++ b/src/test/authentication/t/001_password.pl @@ -9,7 +9,7 @@ # This test can only run with Unix-domain sockets. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/authentication/t/002_saslprep.pl b/src/test/authentication/t/002_saslprep.pl index ef15831166..c3a73dfda1 100644 --- a/src/test/authentication/t/002_saslprep.pl +++ b/src/test/authentication/t/002_saslprep.pl @@ -6,7 +6,7 @@ # This test can only run with Unix-domain sockets. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/authentication/t/003_peer.pl b/src/test/authentication/t/003_peer.pl index eacff2b52a..96217b6661 100644 --- a/src/test/authentication/t/003_peer.pl +++ b/src/test/authentication/t/003_peer.pl @@ -6,7 +6,7 @@ # and is only able to run with Unix-domain sockets. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/authentication/t/004_file_inclusion.pl b/src/test/authentication/t/004_file_inclusion.pl index 55d28ad586..364bba81ca 100644 --- a/src/test/authentication/t/004_file_inclusion.pl +++ b/src/test/authentication/t/004_file_inclusion.pl @@ -5,7 +5,7 @@ # only run with Unix-domain sockets. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use File::Basename qw(basename); diff --git a/src/test/authentication/t/005_sspi.pl b/src/test/authentication/t/005_sspi.pl index 37fd5bc243..bdc829dcf8 100644 --- a/src/test/authentication/t/005_sspi.pl +++ b/src/test/authentication/t/005_sspi.pl @@ -4,7 +4,7 @@ # Tests targeting SSPI on Windows. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/authentication/t/006_login_trigger.pl b/src/test/authentication/t/006_login_trigger.pl index 3f1a8a7c45..3415ab9e00 100644 --- a/src/test/authentication/t/006_login_trigger.pl +++ b/src/test/authentication/t/006_login_trigger.pl @@ -5,7 +5,7 @@ # tests. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/icu/t/010_database.pl b/src/test/icu/t/010_database.pl index 67fc3bbf19..39cba8492d 100644 --- a/src/test/icu/t/010_database.pl +++ b/src/test/icu/t/010_database.pl @@ -1,7 +1,7 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl index 0deb9bffc8..e9ceb712f5 100644 --- a/src/test/kerberos/t/001_auth.pl +++ b/src/test/kerberos/t/001_auth.pl @@ -18,7 +18,7 @@ # See the README for additional information. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/test/ldap/LdapServer.pm b/src/test/ldap/LdapServer.pm index a4c1a1843c..f63844d60a 100644 --- a/src/test/ldap/LdapServer.pm +++ b/src/test/ldap/LdapServer.pm @@ -46,7 +46,7 @@ LdapServer - class for an LDAP server for testing pg_hba.conf authentication package LdapServer; use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl index 3e113fd6eb..5e569c4db9 100644 --- a/src/test/ldap/t/001_auth.pl +++ b/src/test/ldap/t/001_auth.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib "$FindBin::RealBin/.."; diff --git a/src/test/ldap/t/002_bindpasswd.pl b/src/test/ldap/t/002_bindpasswd.pl index bcd4aa2b74..204ed39059 100644 --- a/src/test/ldap/t/002_bindpasswd.pl +++ b/src/test/ldap/t/002_bindpasswd.pl @@ -2,7 +2,7 @@ # Copyright (c) 2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use lib "$FindBin::RealBin/.."; diff --git a/src/test/locale/sort-test.pl b/src/test/locale/sort-test.pl index 8bed29b3ad..47efa8f8bb 100755 --- a/src/test/locale/sort-test.pl +++ b/src/test/locale/sort-test.pl @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use locale; open(my $in_fh, '<', $ARGV[0]) || die; diff --git a/src/test/modules/brin/t/01_workitems.pl b/src/test/modules/brin/t/01_workitems.pl index 5f71074231..376c3a43f1 100644 --- a/src/test/modules/brin/t/01_workitems.pl +++ b/src/test/modules/brin/t/01_workitems.pl @@ -4,7 +4,7 @@ # Verify that work items work correctly use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/brin/t/02_wal_consistency.pl b/src/test/modules/brin/t/02_wal_consistency.pl index 8b2b244feb..a588a28669 100644 --- a/src/test/modules/brin/t/02_wal_consistency.pl +++ b/src/test/modules/brin/t/02_wal_consistency.pl @@ -3,7 +3,7 @@ # Verify WAL consistency use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/commit_ts/t/001_base.pl b/src/test/modules/commit_ts/t/001_base.pl index ae3fc5f52d..d6ea0c4c69 100644 --- a/src/test/modules/commit_ts/t/001_base.pl +++ b/src/test/modules/commit_ts/t/001_base.pl @@ -4,7 +4,7 @@ # Single-node test: value can be set, and is still present after recovery use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl index 59cc2b1244..e843578ddb 100644 --- a/src/test/modules/commit_ts/t/002_standby.pl +++ b/src/test/modules/commit_ts/t/002_standby.pl @@ -4,7 +4,7 @@ # Test simple scenario involving a standby use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl index 5af511e369..b38c3c0f26 100644 --- a/src/test/modules/commit_ts/t/003_standby_2.pl +++ b/src/test/modules/commit_ts/t/003_standby_2.pl @@ -4,7 +4,7 @@ # Test primary/standby scenario where the track_commit_timestamp GUC is # repeatedly toggled on and off. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/commit_ts/t/004_restart.pl b/src/test/modules/commit_ts/t/004_restart.pl index 8fe4bedb14..399268ebee 100644 --- a/src/test/modules/commit_ts/t/004_restart.pl +++ b/src/test/modules/commit_ts/t/004_restart.pl @@ -3,7 +3,7 @@ # Testing of commit timestamps preservation across restarts use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl b/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl index c96c8d7a4d..b7ac65091a 100644 --- a/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl +++ b/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl @@ -2,7 +2,7 @@ # Copyright (c) 2022, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Copy; use FindBin; use PostgreSQL::Test::Utils; diff --git a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl index 056fa5c6d2..71a11ddf25 100644 --- a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl +++ b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl index 2b2c144ee2..c63e7bd394 100644 --- a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl +++ b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use File::Copy; diff --git a/src/test/modules/test_custom_rmgrs/t/001_basic.pl b/src/test/modules/test_custom_rmgrs/t/001_basic.pl index 50655d3788..dc3d830299 100644 --- a/src/test/modules/test_custom_rmgrs/t/001_basic.pl +++ b/src/test/modules/test_custom_rmgrs/t/001_basic.pl @@ -1,7 +1,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/modules/test_misc/t/001_constraint_validation.pl b/src/test/modules/test_misc/t/001_constraint_validation.pl index 5a07a5d36d..4d0ea0c59d 100644 --- a/src/test/modules/test_misc/t/001_constraint_validation.pl +++ b/src/test/modules/test_misc/t/001_constraint_validation.pl @@ -4,7 +4,7 @@ # Verify that ALTER TABLE optimizes certain operations as expected use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/test_misc/t/002_tablespace.pl b/src/test/modules/test_misc/t/002_tablespace.pl index f774a021a8..220e2b073d 100644 --- a/src/test/modules/test_misc/t/002_tablespace.pl +++ b/src/test/modules/test_misc/t/002_tablespace.pl @@ -3,7 +3,7 @@ # regression tests. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/test_misc/t/003_check_guc.pl b/src/test/modules/test_misc/t/003_check_guc.pl index a5d680e82e..0c222bada9 100644 --- a/src/test/modules/test_misc/t/003_check_guc.pl +++ b/src/test/modules/test_misc/t/003_check_guc.pl @@ -2,7 +2,7 @@ # postgresql.conf.sample. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/test_misc/t/004_io_direct.pl b/src/test/modules/test_misc/t/004_io_direct.pl index dddcfb1aa9..e3f0966b8d 100644 --- a/src/test/modules/test_misc/t/004_io_direct.pl +++ b/src/test/modules/test_misc/t/004_io_direct.pl @@ -1,7 +1,7 @@ # Very simple exercise of direct I/O GUC. use strict; -use warnings; +use warnings FATAL => 'all'; use Fcntl; use IO::File; use PostgreSQL::Test::Cluster; diff --git a/src/test/modules/test_pg_dump/t/001_base.pl b/src/test/modules/test_pg_dump/t/001_base.pl index a5d5b9b35d..25a80c8c66 100644 --- a/src/test/modules/test_pg_dump/t/001_base.pl +++ b/src/test/modules/test_pg_dump/t/001_base.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/modules/worker_spi/t/001_worker_spi.pl b/src/test/modules/worker_spi/t/001_worker_spi.pl index ba1d281e81..4759b55a60 100644 --- a/src/test/modules/worker_spi/t/001_worker_spi.pl +++ b/src/test/modules/worker_spi/t/001_worker_spi.pl @@ -3,7 +3,7 @@ # Test worker_spi module. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl b/src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl index 4cf579047e..4121154a53 100644 --- a/src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl +++ b/src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl @@ -2,7 +2,7 @@ # Test wraparound emergency autovacuum. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/xid_wraparound/t/002_limits.pl b/src/test/modules/xid_wraparound/t/002_limits.pl index 6aeea19cdc..7750473bc5 100644 --- a/src/test/modules/xid_wraparound/t/002_limits.pl +++ b/src/test/modules/xid_wraparound/t/002_limits.pl @@ -8,7 +8,7 @@ # been advanced. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/modules/xid_wraparound/t/003_wraparounds.pl b/src/test/modules/xid_wraparound/t/003_wraparounds.pl index be71b00a17..283d1532c2 100644 --- a/src/test/modules/xid_wraparound/t/003_wraparounds.pl +++ b/src/test/modules/xid_wraparound/t/003_wraparounds.pl @@ -4,7 +4,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm index e34dfb9243..1b1078f8c6 100644 --- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm +++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm @@ -30,7 +30,7 @@ compare the results of cross-version upgrade tests. package PostgreSQL::Test::AdjustUpgrade; use strict; -use warnings; +use warnings FATAL => 'all'; use Exporter 'import'; use PostgreSQL::Version; diff --git a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm index bae452ac9c..ec91f735a8 100644 --- a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm +++ b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm @@ -54,7 +54,7 @@ initiated by PostgreSQL::Test::Cluster. package PostgreSQL::Test::BackgroundPsql; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Config; diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index b0777e2724..869b0fb885 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -97,7 +97,7 @@ The IPC::Run module is required. package PostgreSQL::Test::Cluster; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Config; diff --git a/src/test/perl/PostgreSQL/Test/RecursiveCopy.pm b/src/test/perl/PostgreSQL/Test/RecursiveCopy.pm index 15964e6217..1c79bfabd1 100644 --- a/src/test/perl/PostgreSQL/Test/RecursiveCopy.pm +++ b/src/test/perl/PostgreSQL/Test/RecursiveCopy.pm @@ -19,7 +19,7 @@ PostgreSQL::Test::RecursiveCopy::copypath($from, $to); package PostgreSQL::Test::RecursiveCopy; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use File::Basename; diff --git a/src/test/perl/PostgreSQL/Test/SimpleTee.pm b/src/test/perl/PostgreSQL/Test/SimpleTee.pm index 82099bf503..9258b7c4cd 100644 --- a/src/test/perl/PostgreSQL/Test/SimpleTee.pm +++ b/src/test/perl/PostgreSQL/Test/SimpleTee.pm @@ -17,7 +17,7 @@ package PostgreSQL::Test::SimpleTee; use strict; -use warnings; +use warnings FATAL => 'all'; use Time::HiRes qw(time); diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm index cd86897580..2b78840629 100644 --- a/src/test/perl/PostgreSQL/Test/Utils.pm +++ b/src/test/perl/PostgreSQL/Test/Utils.pm @@ -42,7 +42,7 @@ aimed at controlling command execution, logging and test functions. package PostgreSQL::Test::Utils; use strict; -use warnings; +use warnings FATAL => 'all'; use Carp; use Config; diff --git a/src/test/perl/PostgreSQL/Version.pm b/src/test/perl/PostgreSQL/Version.pm index 3705c1bdaf..dadc90fecc 100644 --- a/src/test/perl/PostgreSQL/Version.pm +++ b/src/test/perl/PostgreSQL/Version.pm @@ -45,7 +45,7 @@ of common version formats and comparison operations. package PostgreSQL::Version; use strict; -use warnings; +use warnings FATAL => 'all'; use Scalar::Util qw(blessed); diff --git a/src/test/perl/README b/src/test/perl/README index 8fb44184b9..af037a8091 100644 --- a/src/test/perl/README +++ b/src/test/perl/README @@ -58,7 +58,7 @@ order. Each test script should begin with: use strict; - use warnings; + use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/001_stream_rep.pl b/src/test/recovery/t/001_stream_rep.pl index f0de921b4b..3aff0f61d5 100644 --- a/src/test/recovery/t/001_stream_rep.pl +++ b/src/test/recovery/t/001_stream_rep.pl @@ -3,7 +3,7 @@ # Minimal test testing streaming replication use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl index 48e00f9e29..c4d0a2a81f 100644 --- a/src/test/recovery/t/002_archiving.pl +++ b/src/test/recovery/t/002_archiving.pl @@ -3,7 +3,7 @@ # test for archiving with hot standby use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl index e882ce2077..1b63116ceb 100644 --- a/src/test/recovery/t/003_recovery_targets.pl +++ b/src/test/recovery/t/003_recovery_targets.pl @@ -3,7 +3,7 @@ # Test for recovery targets: name, timestamp, XID use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/004_timeline_switch.pl b/src/test/recovery/t/004_timeline_switch.pl index edaef91845..2500201b99 100644 --- a/src/test/recovery/t/004_timeline_switch.pl +++ b/src/test/recovery/t/004_timeline_switch.pl @@ -3,7 +3,7 @@ # Test for timeline switch use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl index 8fadca4204..2f7a99e687 100644 --- a/src/test/recovery/t/005_replay_delay.pl +++ b/src/test/recovery/t/005_replay_delay.pl @@ -3,7 +3,7 @@ # Checks for recovery_min_apply_delay and recovery pause use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/006_logical_decoding.pl b/src/test/recovery/t/006_logical_decoding.pl index 5c851bf4c1..97e3df04aa 100644 --- a/src/test/recovery/t/006_logical_decoding.pl +++ b/src/test/recovery/t/006_logical_decoding.pl @@ -7,7 +7,7 @@ # is for work that doesn't fit well there, like where server restarts # are required. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/007_sync_rep.pl b/src/test/recovery/t/007_sync_rep.pl index 2026af0702..b25ae1e8ec 100644 --- a/src/test/recovery/t/007_sync_rep.pl +++ b/src/test/recovery/t/007_sync_rep.pl @@ -3,7 +3,7 @@ # Minimal test testing synchronous replication sync_state transition use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl index acac0a0a55..10d1535a93 100644 --- a/src/test/recovery/t/008_fsm_truncation.pl +++ b/src/test/recovery/t/008_fsm_truncation.pl @@ -6,7 +6,7 @@ # FSM changes don't normally need to be WAL-logged, except for truncation. # The FSM mustn't return a page that doesn't exist (anymore). use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl index e1273fd0f1..cde6e2a944 100644 --- a/src/test/recovery/t/009_twophase.pl +++ b/src/test/recovery/t/009_twophase.pl @@ -3,7 +3,7 @@ # Tests dedicated to two-phase commit in recovery use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/010_logical_decoding_timelines.pl b/src/test/recovery/t/010_logical_decoding_timelines.pl index 6fbbeedde3..2359821b28 100644 --- a/src/test/recovery/t/010_logical_decoding_timelines.pl +++ b/src/test/recovery/t/010_logical_decoding_timelines.pl @@ -22,7 +22,7 @@ # on logical slots). # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/012_subtransactions.pl b/src/test/recovery/t/012_subtransactions.pl index 91ae79dd51..32434d4340 100644 --- a/src/test/recovery/t/012_subtransactions.pl +++ b/src/test/recovery/t/012_subtransactions.pl @@ -3,7 +3,7 @@ # Tests dedicated to subtransactions in recovery use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/013_crash_restart.pl b/src/test/recovery/t/013_crash_restart.pl index ce57792f31..0dfd197df4 100644 --- a/src/test/recovery/t/013_crash_restart.pl +++ b/src/test/recovery/t/013_crash_restart.pl @@ -12,7 +12,7 @@ # backend died), or because it's already restarted. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/014_unlogged_reinit.pl b/src/test/recovery/t/014_unlogged_reinit.pl index 3591b3309e..bee8b8804f 100644 --- a/src/test/recovery/t/014_unlogged_reinit.pl +++ b/src/test/recovery/t/014_unlogged_reinit.pl @@ -7,7 +7,7 @@ # that is not tested here. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/015_promotion_pages.pl b/src/test/recovery/t/015_promotion_pages.pl index beeb9dfddf..b49dd4c835 100644 --- a/src/test/recovery/t/015_promotion_pages.pl +++ b/src/test/recovery/t/015_promotion_pages.pl @@ -6,7 +6,7 @@ # invalid page references at replay based on the minimum consistent # recovery point defined. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/016_min_consistency.pl b/src/test/recovery/t/016_min_consistency.pl index 81f7a43c07..cabdd3156e 100644 --- a/src/test/recovery/t/016_min_consistency.pl +++ b/src/test/recovery/t/016_min_consistency.pl @@ -8,7 +8,7 @@ # both checked. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/017_shm.pl b/src/test/recovery/t/017_shm.pl index 74359e0e38..7935ce63d3 100644 --- a/src/test/recovery/t/017_shm.pl +++ b/src/test/recovery/t/017_shm.pl @@ -5,7 +5,7 @@ # Tests of pg_shmem.h functions # use strict; -use warnings; +use warnings FATAL => 'all'; use File::stat qw(stat); use IPC::Run 'run'; use PostgreSQL::Test::Cluster; diff --git a/src/test/recovery/t/018_wal_optimize.pl b/src/test/recovery/t/018_wal_optimize.pl index 1d613eaede..0752bff174 100644 --- a/src/test/recovery/t/018_wal_optimize.pl +++ b/src/test/recovery/t/018_wal_optimize.pl @@ -10,7 +10,7 @@ # For many years, individual commands made the decision to skip WAL, hence the # frequent appearance of COPY in these tests. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/019_replslot_limit.pl b/src/test/recovery/t/019_replslot_limit.pl index 6c244a5550..22ca8ecb5c 100644 --- a/src/test/recovery/t/019_replslot_limit.pl +++ b/src/test/recovery/t/019_replslot_limit.pl @@ -5,7 +5,7 @@ # Ensure that max_slot_wal_keep_size limits the number of WAL files to # be kept by replication slots. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Utils; use PostgreSQL::Test::Cluster; diff --git a/src/test/recovery/t/020_archive_status.pl b/src/test/recovery/t/020_archive_status.pl index fa24153d4b..ce51bfb58e 100644 --- a/src/test/recovery/t/020_archive_status.pl +++ b/src/test/recovery/t/020_archive_status.pl @@ -5,7 +5,7 @@ # Tests related to WAL archiving and recovery. # use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/021_row_visibility.pl b/src/test/recovery/t/021_row_visibility.pl index 52a6a3509c..3bdd42c25d 100644 --- a/src/test/recovery/t/021_row_visibility.pl +++ b/src/test/recovery/t/021_row_visibility.pl @@ -4,7 +4,7 @@ # Checks that snapshots on standbys behave in a minimally reasonable # way. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/022_crash_temp_files.pl b/src/test/recovery/t/022_crash_temp_files.pl index 14fd8bfc7f..e702323a8f 100644 --- a/src/test/recovery/t/022_crash_temp_files.pl +++ b/src/test/recovery/t/022_crash_temp_files.pl @@ -3,7 +3,7 @@ # Test remove of temporary files after a crash. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/023_pitr_prepared_xact.pl b/src/test/recovery/t/023_pitr_prepared_xact.pl index a8cdf4efdd..090711ca4b 100644 --- a/src/test/recovery/t/023_pitr_prepared_xact.pl +++ b/src/test/recovery/t/023_pitr_prepared_xact.pl @@ -3,7 +3,7 @@ # Test for point-in-time recovery (PITR) with prepared transactions use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/024_archive_recovery.pl b/src/test/recovery/t/024_archive_recovery.pl index d594332b18..e9ab11895f 100644 --- a/src/test/recovery/t/024_archive_recovery.pl +++ b/src/test/recovery/t/024_archive_recovery.pl @@ -3,7 +3,7 @@ # Test for archive recovery of WAL generated with wal_level=minimal use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/025_stuck_on_old_timeline.pl b/src/test/recovery/t/025_stuck_on_old_timeline.pl index 91309030df..65d8864327 100644 --- a/src/test/recovery/t/025_stuck_on_old_timeline.pl +++ b/src/test/recovery/t/025_stuck_on_old_timeline.pl @@ -7,7 +7,7 @@ # archive, so the WAL files all have to be streamed. Test that the cascading # standby can follow the new primary (promoted standby). use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/026_overwrite_contrecord.pl b/src/test/recovery/t/026_overwrite_contrecord.pl index 6807a97f26..09c7e13da9 100644 --- a/src/test/recovery/t/026_overwrite_contrecord.pl +++ b/src/test/recovery/t/026_overwrite_contrecord.pl @@ -3,7 +3,7 @@ # Tests for already-propagated WAL segments ending in incomplete WAL records. use strict; -use warnings; +use warnings FATAL => 'all'; use FindBin; use PostgreSQL::Test::Cluster; diff --git a/src/test/recovery/t/027_stream_regress.pl b/src/test/recovery/t/027_stream_regress.pl index f2f4e77626..20508307b5 100644 --- a/src/test/recovery/t/027_stream_regress.pl +++ b/src/test/recovery/t/027_stream_regress.pl @@ -1,6 +1,6 @@ # Run the standard regression tests with streaming replication use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/028_pitr_timelines.pl b/src/test/recovery/t/028_pitr_timelines.pl index bb29a2d378..58390b6d79 100644 --- a/src/test/recovery/t/028_pitr_timelines.pl +++ b/src/test/recovery/t/028_pitr_timelines.pl @@ -27,7 +27,7 @@ # The actual checks are not sensitive to that. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/029_stats_restart.pl b/src/test/recovery/t/029_stats_restart.pl index f6368ab1d3..e350a5e8aa 100644 --- a/src/test/recovery/t/029_stats_restart.pl +++ b/src/test/recovery/t/029_stats_restart.pl @@ -4,7 +4,7 @@ # invalid stats files, as well as restorting stats after "normal" restarts. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/030_stats_cleanup_replica.pl b/src/test/recovery/t/030_stats_cleanup_replica.pl index 51495aebcd..db451d9d1b 100644 --- a/src/test/recovery/t/030_stats_cleanup_replica.pl +++ b/src/test/recovery/t/030_stats_cleanup_replica.pl @@ -6,7 +6,7 @@ # - discard stats after immediate / crash restarts use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/031_recovery_conflict.pl b/src/test/recovery/t/031_recovery_conflict.pl index 7cafe2fd86..82ba7a7b10 100644 --- a/src/test/recovery/t/031_recovery_conflict.pl +++ b/src/test/recovery/t/031_recovery_conflict.pl @@ -5,7 +5,7 @@ # pg_stat_database_conflicts are populated correctly use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/032_relfilenode_reuse.pl b/src/test/recovery/t/032_relfilenode_reuse.pl index 3bc2db1a4f..8a4cceacc2 100644 --- a/src/test/recovery/t/032_relfilenode_reuse.pl +++ b/src/test/recovery/t/032_relfilenode_reuse.pl @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/033_replay_tsp_drops.pl b/src/test/recovery/t/033_replay_tsp_drops.pl index af97ed9f70..64c370224c 100644 --- a/src/test/recovery/t/033_replay_tsp_drops.pl +++ b/src/test/recovery/t/033_replay_tsp_drops.pl @@ -4,7 +4,7 @@ # Test replay of tablespace/database creation/drop use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/034_create_database.pl b/src/test/recovery/t/034_create_database.pl index ed562bba25..d4d7500dd5 100644 --- a/src/test/recovery/t/034_create_database.pl +++ b/src/test/recovery/t/034_create_database.pl @@ -4,7 +4,7 @@ # Test WAL replay for CREATE DATABASE .. STRATEGY WAL_LOG. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/035_standby_logical_decoding.pl b/src/test/recovery/t/035_standby_logical_decoding.pl index 5d7c278d01..2e7893ec4e 100644 --- a/src/test/recovery/t/035_standby_logical_decoding.pl +++ b/src/test/recovery/t/035_standby_logical_decoding.pl @@ -4,7 +4,7 @@ # recovery conflict and standby promotion. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/036_truncated_dropped.pl b/src/test/recovery/t/036_truncated_dropped.pl index 2d5339d9d8..53194978fc 100644 --- a/src/test/recovery/t/036_truncated_dropped.pl +++ b/src/test/recovery/t/036_truncated_dropped.pl @@ -5,7 +5,7 @@ # truncated or dropped. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/test/recovery/t/037_invalid_database.pl b/src/test/recovery/t/037_invalid_database.pl index 29b9bb6977..a6b23c3ba7 100644 --- a/src/test/recovery/t/037_invalid_database.pl +++ b/src/test/recovery/t/037_invalid_database.pl @@ -3,7 +3,7 @@ # Test we handle interrupted DROP DATABASE correctly. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/038_save_logical_slots_shutdown.pl b/src/test/recovery/t/038_save_logical_slots_shutdown.pl index 52ec4e8820..f263aff5b3 100644 --- a/src/test/recovery/t/038_save_logical_slots_shutdown.pl +++ b/src/test/recovery/t/038_save_logical_slots_shutdown.pl @@ -5,7 +5,7 @@ # checkpoint. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; diff --git a/src/test/recovery/t/039_end_of_wal.pl b/src/test/recovery/t/039_end_of_wal.pl index d2bf062bb2..285aab0683 100644 --- a/src/test/recovery/t/039_end_of_wal.pl +++ b/src/test/recovery/t/039_end_of_wal.pl @@ -5,7 +5,7 @@ # scenarios. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/recovery/t/cp_history_files b/src/test/recovery/t/cp_history_files index cfeea41e5b..5832b98ef4 100644 --- a/src/test/recovery/t/cp_history_files +++ b/src/test/recovery/t/cp_history_files @@ -2,7 +2,7 @@ use File::Copy; use strict; -use warnings; +use warnings FATAL => 'all'; die "wrong number of arguments" if @ARGV != 2; my ($source, $target) = @ARGV; diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index d921f1dde9..4f2864da93 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Config qw ( %Config ); use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; @@ -708,6 +708,8 @@ if ($? == 0) # integer like how we do when grabbing the serial fails. if ($Config{ivsize} == 8) { + no warnings qw(portable); + $serialno =~ s/^serial=//; $serialno =~ s/\s+//g; $serialno = hex($serialno); diff --git a/src/test/ssl/t/002_scram.pl b/src/test/ssl/t/002_scram.pl index 91e771ec47..807b211f98 100644 --- a/src/test/ssl/t/002_scram.pl +++ b/src/test/ssl/t/002_scram.pl @@ -4,7 +4,7 @@ # Test SCRAM authentication and TLS channel binding types use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/ssl/t/003_sslinfo.pl b/src/test/ssl/t/003_sslinfo.pl index 5306aad802..866fe5ad2c 100644 --- a/src/test/ssl/t/003_sslinfo.pl +++ b/src/test/ssl/t/003_sslinfo.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/ssl/t/SSL/Backend/OpenSSL.pm b/src/test/ssl/t/SSL/Backend/OpenSSL.pm index a762f43634..a2b44f8516 100644 --- a/src/test/ssl/t/SSL/Backend/OpenSSL.pm +++ b/src/test/ssl/t/SSL/Backend/OpenSSL.pm @@ -25,7 +25,7 @@ for a PostgreSQL cluster compiled against OpenSSL. package SSL::Backend::OpenSSL; use strict; -use warnings; +use warnings FATAL => 'all'; use File::Basename; use File::Copy; diff --git a/src/test/ssl/t/SSL/Server.pm b/src/test/ssl/t/SSL/Server.pm index 2c5c055222..836e098902 100644 --- a/src/test/ssl/t/SSL/Server.pm +++ b/src/test/ssl/t/SSL/Server.pm @@ -64,7 +64,7 @@ specific infrastructure. Currently only OpenSSL is supported. package SSL::Server; use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/001_rep_changes.pl b/src/test/subscription/t/001_rep_changes.pl index e49da00b29..16c7fb94eb 100644 --- a/src/test/subscription/t/001_rep_changes.pl +++ b/src/test/subscription/t/001_rep_changes.pl @@ -3,7 +3,7 @@ # Basic logical replication test use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/002_types.pl b/src/test/subscription/t/002_types.pl index 40155ad563..e8f6044351 100644 --- a/src/test/subscription/t/002_types.pl +++ b/src/test/subscription/t/002_types.pl @@ -4,7 +4,7 @@ # This tests that more complex datatypes are replicated correctly # by logical replication use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/003_constraints.pl b/src/test/subscription/t/003_constraints.pl index 6e3591d486..e0c7b1051d 100644 --- a/src/test/subscription/t/003_constraints.pl +++ b/src/test/subscription/t/003_constraints.pl @@ -3,7 +3,7 @@ # This test checks that constraints work on subscriber use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/004_sync.pl b/src/test/subscription/t/004_sync.pl index 11269708aa..6ecbc9b729 100644 --- a/src/test/subscription/t/004_sync.pl +++ b/src/test/subscription/t/004_sync.pl @@ -3,7 +3,7 @@ # Tests for logical replication table syncing use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/005_encoding.pl b/src/test/subscription/t/005_encoding.pl index c9cece48c4..4836a48ca4 100644 --- a/src/test/subscription/t/005_encoding.pl +++ b/src/test/subscription/t/005_encoding.pl @@ -3,7 +3,7 @@ # Test replication between databases with different encodings use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/006_rewrite.pl b/src/test/subscription/t/006_rewrite.pl index 62a1bdcd15..90e81ab670 100644 --- a/src/test/subscription/t/006_rewrite.pl +++ b/src/test/subscription/t/006_rewrite.pl @@ -3,7 +3,7 @@ # Test logical replication behavior with heap rewrites use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/007_ddl.pl b/src/test/subscription/t/007_ddl.pl index 02e9dd61d5..241c911ac7 100644 --- a/src/test/subscription/t/007_ddl.pl +++ b/src/test/subscription/t/007_ddl.pl @@ -3,7 +3,7 @@ # Test some logical replication DDL behavior use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/008_diff_schema.pl b/src/test/subscription/t/008_diff_schema.pl index ed676b73e5..491352668d 100644 --- a/src/test/subscription/t/008_diff_schema.pl +++ b/src/test/subscription/t/008_diff_schema.pl @@ -3,7 +3,7 @@ # Test behavior with different schema on subscriber use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/009_matviews.pl b/src/test/subscription/t/009_matviews.pl index 798aad53c7..6e25b8fe90 100644 --- a/src/test/subscription/t/009_matviews.pl +++ b/src/test/subscription/t/009_matviews.pl @@ -3,7 +3,7 @@ # Test materialized views behavior use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/010_truncate.pl b/src/test/subscription/t/010_truncate.pl index 9eeb518b52..4d97402c8d 100644 --- a/src/test/subscription/t/010_truncate.pl +++ b/src/test/subscription/t/010_truncate.pl @@ -3,7 +3,7 @@ # Test TRUNCATE use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/011_generated.pl b/src/test/subscription/t/011_generated.pl index 4f8518cf35..bf54cebcd8 100644 --- a/src/test/subscription/t/011_generated.pl +++ b/src/test/subscription/t/011_generated.pl @@ -3,7 +3,7 @@ # Test generated columns use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/012_collation.pl b/src/test/subscription/t/012_collation.pl index dd66424be8..dc2adce8dd 100644 --- a/src/test/subscription/t/012_collation.pl +++ b/src/test/subscription/t/012_collation.pl @@ -4,7 +4,7 @@ # Test collations, in particular nondeterministic ones # (only works with ICU) use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/013_partition.pl b/src/test/subscription/t/013_partition.pl index 0f1a34235d..ce881f31bd 100644 --- a/src/test/subscription/t/013_partition.pl +++ b/src/test/subscription/t/013_partition.pl @@ -3,7 +3,7 @@ # Test logical replication with partitioned tables use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/014_binary.pl b/src/test/subscription/t/014_binary.pl index 6abc899bd9..4a04db7de2 100644 --- a/src/test/subscription/t/014_binary.pl +++ b/src/test/subscription/t/014_binary.pl @@ -4,7 +4,7 @@ # Binary mode logical replication test use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/015_stream.pl b/src/test/subscription/t/015_stream.pl index 986e879968..6d2eb76d27 100644 --- a/src/test/subscription/t/015_stream.pl +++ b/src/test/subscription/t/015_stream.pl @@ -3,7 +3,7 @@ # Test streaming of simple large transaction use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/016_stream_subxact.pl b/src/test/subscription/t/016_stream_subxact.pl index 561855cb42..fe255fbb07 100644 --- a/src/test/subscription/t/016_stream_subxact.pl +++ b/src/test/subscription/t/016_stream_subxact.pl @@ -3,7 +3,7 @@ # Test streaming of transaction containing subtransactions use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/017_stream_ddl.pl b/src/test/subscription/t/017_stream_ddl.pl index 2fd4ede402..176c033ac6 100644 --- a/src/test/subscription/t/017_stream_ddl.pl +++ b/src/test/subscription/t/017_stream_ddl.pl @@ -6,7 +6,7 @@ # This file is mainly to test the DDL/DML interaction of the publisher side, # so we didn't add a parallel apply version for the tests in this file. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/018_stream_subxact_abort.pl b/src/test/subscription/t/018_stream_subxact_abort.pl index e115216e75..9f06217536 100644 --- a/src/test/subscription/t/018_stream_subxact_abort.pl +++ b/src/test/subscription/t/018_stream_subxact_abort.pl @@ -3,7 +3,7 @@ # Test streaming of transaction containing multiple subtransactions and rollbacks use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/019_stream_subxact_ddl_abort.pl b/src/test/subscription/t/019_stream_subxact_ddl_abort.pl index cd26eee05a..ebd17a4f9b 100644 --- a/src/test/subscription/t/019_stream_subxact_ddl_abort.pl +++ b/src/test/subscription/t/019_stream_subxact_ddl_abort.pl @@ -7,7 +7,7 @@ # This file is mainly to test the DDL/DML interaction of the publisher side, # so we didn't add a parallel apply version for the tests in this file. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/020_messages.pl b/src/test/subscription/t/020_messages.pl index 6f31fe4d6f..001882d7cc 100644 --- a/src/test/subscription/t/020_messages.pl +++ b/src/test/subscription/t/020_messages.pl @@ -3,7 +3,7 @@ # Tests that logical decoding messages use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/021_twophase.pl b/src/test/subscription/t/021_twophase.pl index 9bcf46c7b3..cf71391318 100644 --- a/src/test/subscription/t/021_twophase.pl +++ b/src/test/subscription/t/021_twophase.pl @@ -3,7 +3,7 @@ # logical replication of 2PC test use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/022_twophase_cascade.pl b/src/test/subscription/t/022_twophase_cascade.pl index 75b1a62a74..76a0b4320d 100644 --- a/src/test/subscription/t/022_twophase_cascade.pl +++ b/src/test/subscription/t/022_twophase_cascade.pl @@ -8,7 +8,7 @@ # Two-phase and parallel apply will be tested in 023_twophase_stream, so we # didn't add a parallel apply version for the tests in this file. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/023_twophase_stream.pl b/src/test/subscription/t/023_twophase_stream.pl index 22948e6424..e440200ae3 100644 --- a/src/test/subscription/t/023_twophase_stream.pl +++ b/src/test/subscription/t/023_twophase_stream.pl @@ -3,7 +3,7 @@ # Test logical replication of 2PC with streaming. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/024_add_drop_pub.pl b/src/test/subscription/t/024_add_drop_pub.pl index cdb14a919a..b54a5ce340 100644 --- a/src/test/subscription/t/024_add_drop_pub.pl +++ b/src/test/subscription/t/024_add_drop_pub.pl @@ -3,7 +3,7 @@ # This test checks behaviour of ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/025_rep_changes_for_schema.pl b/src/test/subscription/t/025_rep_changes_for_schema.pl index 97405cd8d5..30111f2c32 100644 --- a/src/test/subscription/t/025_rep_changes_for_schema.pl +++ b/src/test/subscription/t/025_rep_changes_for_schema.pl @@ -3,7 +3,7 @@ # Logical replication tests for schema publications use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/026_stats.pl b/src/test/subscription/t/026_stats.pl index f31b25b4af..a7777c0de8 100644 --- a/src/test/subscription/t/026_stats.pl +++ b/src/test/subscription/t/026_stats.pl @@ -3,7 +3,7 @@ # Tests for subscription stats. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/027_nosuperuser.pl b/src/test/subscription/t/027_nosuperuser.pl index 642baa5d7c..9acd616ba2 100644 --- a/src/test/subscription/t/027_nosuperuser.pl +++ b/src/test/subscription/t/027_nosuperuser.pl @@ -3,7 +3,7 @@ # Test that logical replication respects permissions use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/test/subscription/t/028_row_filter.pl b/src/test/subscription/t/028_row_filter.pl index 1510149f97..638ea12989 100644 --- a/src/test/subscription/t/028_row_filter.pl +++ b/src/test/subscription/t/028_row_filter.pl @@ -2,7 +2,7 @@ # Test logical replication behavior with row filtering use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/029_on_error.pl b/src/test/subscription/t/029_on_error.pl index fcab7386fe..d874e83896 100644 --- a/src/test/subscription/t/029_on_error.pl +++ b/src/test/subscription/t/029_on_error.pl @@ -3,7 +3,7 @@ # Tests for disable_on_error and SKIP transaction features. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/030_origin.pl b/src/test/subscription/t/030_origin.pl index 9ca1fa25d8..fa33f997e8 100644 --- a/src/test/subscription/t/030_origin.pl +++ b/src/test/subscription/t/030_origin.pl @@ -4,7 +4,7 @@ # Test the CREATE SUBSCRIPTION 'origin' parameter and its interaction with # 'copy_data' parameter. use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/031_column_list.pl b/src/test/subscription/t/031_column_list.pl index 7bf83e01f4..90c321df3c 100644 --- a/src/test/subscription/t/031_column_list.pl +++ b/src/test/subscription/t/031_column_list.pl @@ -2,7 +2,7 @@ # Test partial-column publication of tables use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/032_subscribe_use_index.pl b/src/test/subscription/t/032_subscribe_use_index.pl index d1f65d05e5..f085e3a560 100644 --- a/src/test/subscription/t/032_subscribe_use_index.pl +++ b/src/test/subscription/t/032_subscribe_use_index.pl @@ -2,7 +2,7 @@ # Test logical replication behavior with subscriber using available index use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/test/subscription/t/033_run_as_table_owner.pl b/src/test/subscription/t/033_run_as_table_owner.pl index f4083202e5..3e3ee875e6 100644 --- a/src/test/subscription/t/033_run_as_table_owner.pl +++ b/src/test/subscription/t/033_run_as_table_owner.pl @@ -3,7 +3,7 @@ # Test that logical replication respects permissions use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use Test::More; diff --git a/src/test/subscription/t/100_bugs.pl b/src/test/subscription/t/100_bugs.pl index d64be621e8..f061f4d68d 100644 --- a/src/test/subscription/t/100_bugs.pl +++ b/src/test/subscription/t/100_bugs.pl @@ -3,7 +3,7 @@ # Tests for various bugs found over time use strict; -use warnings; +use warnings FATAL => 'all'; use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; diff --git a/src/tools/PerfectHash.pm b/src/tools/PerfectHash.pm index e54905a3ef..0587107962 100644 --- a/src/tools/PerfectHash.pm +++ b/src/tools/PerfectHash.pm @@ -30,7 +30,7 @@ package PerfectHash; use strict; -use warnings; +use warnings FATAL => 'all'; # At runtime, we'll compute two simple hash functions of the input key, diff --git a/src/tools/check_bison_recursion.pl b/src/tools/check_bison_recursion.pl index 18f14ad127..2f079a01a7 100755 --- a/src/tools/check_bison_recursion.pl +++ b/src/tools/check_bison_recursion.pl @@ -22,7 +22,7 @@ ################################################################# use strict; -use warnings; +use warnings FATAL => 'all'; my $debug = 0; diff --git a/src/tools/ci/windows_build_config.pl b/src/tools/ci/windows_build_config.pl index b0d4360c74..a3eb96b7fd 100644 --- a/src/tools/ci/windows_build_config.pl +++ b/src/tools/ci/windows_build_config.pl @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings FATAL => 'all'; our $config; diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl index 30c38c757b..4263b5a3eb 100755 --- a/src/tools/copyright.pl +++ b/src/tools/copyright.pl @@ -10,7 +10,7 @@ ################################################################# use strict; -use warnings; +use warnings FATAL => 'all'; use File::Find; use File::Basename; diff --git a/src/tools/fix-old-flex-code.pl b/src/tools/fix-old-flex-code.pl index d88e68b8b6..c9b0517ed4 100644 --- a/src/tools/fix-old-flex-code.pl +++ b/src/tools/fix-old-flex-code.pl @@ -16,7 +16,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; # Get command line argument. usage() if $#ARGV != 0; diff --git a/src/tools/gen_export.pl b/src/tools/gen_export.pl index ed60abe956..08f839ed07 100644 --- a/src/tools/gen_export.pl +++ b/src/tools/gen_export.pl @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; my $format; diff --git a/src/tools/gen_keywordlist.pl b/src/tools/gen_keywordlist.pl index 97a9ff1b30..2ad9c9a4a3 100644 --- a/src/tools/gen_keywordlist.pl +++ b/src/tools/gen_keywordlist.pl @@ -29,7 +29,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; use Getopt::Long; use FindBin; diff --git a/src/tools/git_changelog b/src/tools/git_changelog index 39e1b1fe15..f3c225d556 100755 --- a/src/tools/git_changelog +++ b/src/tools/git_changelog @@ -50,7 +50,7 @@ use strict; -use warnings; +use warnings FATAL => 'all'; require Time::Local; require Getopt::Long; require IPC::Open2; diff --git a/src/tools/mark_pgdllimport.pl b/src/tools/mark_pgdllimport.pl index 45b4e73bff..a0ff7f0e2b 100755 --- a/src/tools/mark_pgdllimport.pl +++ b/src/tools/mark_pgdllimport.pl @@ -23,7 +23,7 @@ #---------------------------------------------------------------------- use strict; -use warnings; +use warnings FATAL => 'all'; for my $include_file (@ARGV) { diff --git a/src/tools/msvc_gendef.pl b/src/tools/msvc_gendef.pl index 8749fd0dd7..efdd67f67c 100644 --- a/src/tools/msvc_gendef.pl +++ b/src/tools/msvc_gendef.pl @@ -2,7 +2,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use List::Util qw(min); use Getopt::Long; diff --git a/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl b/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl index fef5c86ca4..fb772cb89b 100644 --- a/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl +++ b/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl @@ -4,7 +4,7 @@ # Copyright (c) 2017-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Cwd qw(getcwd); use File::Copy "cp"; diff --git a/src/tools/pginclude/pgcheckdefines b/src/tools/pginclude/pgcheckdefines index a9fe79ebe5..68aa5d178e 100755 --- a/src/tools/pginclude/pgcheckdefines +++ b/src/tools/pginclude/pgcheckdefines @@ -23,7 +23,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use Cwd; use File::Basename; diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index 37f38eefc3..2d454fc92b 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -3,7 +3,7 @@ # Copyright (c) 2021-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; use Cwd qw(abs_path getcwd); use File::Find; diff --git a/src/tools/version_stamp.pl b/src/tools/version_stamp.pl index 1f0074ded5..ad0f233758 100755 --- a/src/tools/version_stamp.pl +++ b/src/tools/version_stamp.pl @@ -21,7 +21,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; # Major version is hard-wired into the script. We update it when we branch # a new development version. diff --git a/src/tools/win32tzlist.pl b/src/tools/win32tzlist.pl index 457462df27..1efbc5a543 100755 --- a/src/tools/win32tzlist.pl +++ b/src/tools/win32tzlist.pl @@ -16,7 +16,7 @@ # use strict; -use warnings; +use warnings FATAL => 'all'; use Config;