You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ReadReplicationSlot returns the slot name as passed, not the one the server read #6735
PhysicalReplicationConnection.ReadReplicationSlot (PhysicalReplicationConnection.cs:90) returns a PhysicalReplicationSlot whose Name is its argument lowercased (ReplicationConnection.cs:397-398), because the result of READ_REPLICATION_SLOT has no name, only slot_type, restart_lsn and restart_tli (walsender.c:492-497). The server reads the name as an identifier, though, so the returned name can differ from the slot it read:
ReadReplicationSlot(" myslot ") reads the slot myslot, since the server skips the whitespace, but returns the name " myslot ".
ReadReplicationSlot("\"1abc\"") reads the slot 1abc but returns the name "\"1abc\"", quotes included.
Passing the returned object back to Npgsql reaches the same slot again, but its Name isn't the slot's name. The Create*ReplicationSlot methods take the name from the server's result (ReplicationConnection.cs:353). ReadReplicationSlot should return the slot's name as the server read it too: without surrounding whitespace, and without the quotes of a quoted name.
Activity