Improve error messages introduced in be87200efd9 and 0fdab27ad68
authorAndres Freund <[email protected]>
Wed, 12 Apr 2023 18:00:37 +0000 (11:00 -0700)
committerAndres Freund <[email protected]>
Wed, 12 Apr 2023 18:00:37 +0000 (11:00 -0700)
Author: Kyotaro Horiguchi <[email protected]>
Discussion: https://postgr.es/m/20230411.120301.93333867350615278[email protected]
Discussion: https://postgr.es/m/20230412174244[email protected]

src/backend/replication/logical/decode.c
src/backend/replication/logical/logical.c
src/backend/replication/slot.c
src/test/recovery/t/035_standby_logical_decoding.pl

index 5508cc217777a95fe66af78bdda46aaf819ed671..beef399b429df72537c1b0b051e05c1ba816f857 100644 (file)
@@ -177,7 +177,7 @@ xlog_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
                                        Assert(RecoveryInProgress());
                                        ereport(ERROR,
                                                        (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                                                        errmsg("logical decoding on a standby requires wal_level to be at least logical on the primary")));
+                                                        errmsg("logical decoding on standby requires wal_level >= logical on the primary")));
                                }
                                break;
                        }
index 82dae950809eb9c6630aa1d5bb63d7768804cab7..7e1f677f7a05016d5e05955347c395e6c3fc0383 100644 (file)
@@ -137,7 +137,7 @@ CheckLogicalDecodingRequirements(void)
                if (GetActiveWalLevelOnStandby() < WAL_LEVEL_LOGICAL)
                        ereport(ERROR,
                                        (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                                        errmsg("logical decoding on a standby requires wal_level to be at least logical on the primary")));
+                                        errmsg("logical decoding on standby requires wal_level >= logical on the primary")));
        }
 }
 
index 41848f0ac6dc0b159a8c74cdb16623120897c8c7..8021aaa0a8c1df9fd8094dae22b2423a9e6f9d67 100644 (file)
@@ -1274,7 +1274,7 @@ ReportSlotInvalidation(ReplicationSlotInvalidationCause cause,
                        break;
 
                case RS_INVAL_WAL_LEVEL:
-                       appendStringInfo(&err_detail, _("Logical decoding on standby requires wal_level to be at least logical on the primary server"));
+                       appendStringInfo(&err_detail, _("Logical decoding on standby requires wal_level >= logical on the primary server."));
                        break;
                case RS_INVAL_NONE:
                        pg_unreachable();
index 94a8384c31ca6d4d833f7d5809187a0fe81f29bc..20838d49b53bff339a66c02a96954183aa604692 100644 (file)
@@ -596,8 +596,8 @@ check_for_invalidation('wal_level_', $logstart, 'due to wal_level');
 check_slots_conflicting_status(1);
 
 $handle = make_slot_active($node_standby, 'wal_level_', 0, \$stdout, \$stderr);
-# We are not able to read from the slot as it requires wal_level at least logical on the primary server
-check_pg_recvlogical_stderr($handle, "logical decoding on a standby requires wal_level to be at least logical on the primary");
+# We are not able to read from the slot as it requires wal_level >= logical on the primary server
+check_pg_recvlogical_stderr($handle, "logical decoding on standby requires wal_level >= logical on the primary");
 
 # Restore primary wal_level
 $node_primary->append_conf('postgresql.conf',q[