I think I've discovered a problem with 850196b6. The following steps can be used to trigger a segfault:
# wal_level = logical psql postgres -c "create database testdb;" psql testdb -c "select pg_create_logical_replication_slot('slot', 'test_decoding');" psql "dbname=postgres replication=database" -c "START_REPLICATION SLOT slot LOGICAL 0/0;" From a quick glance, I think the problem starts in StartLogicalReplication() in walsender.c. The call to CreateDecodingContext() may ERROR before xlogreader is initialized in the next line, so the subsequent call to WalSndErrorCleanup() segfaults when it attempts to access xlogreader. Nathan