Which is confusing for me. I tried to find some info
but did not find anything about logical replication
depending on WAL segments.
There is no streaming replication running on that
particular master and these error messages I see on both
master and replica connected with only logical
replication.
Am I doing something wrong? Is there some special way
how to publish older data? For newer data and latest
data all works without problems.
Of course since I published like ~20 tables it took
some time for replica to process all tables - currently
it processes always 2 at the time. But I still do not
understand why it should depend on WAL segments... Thank
you very much.
I tried to unpublished and unsubscribe these older
tables and publish and subscribe them again but getting
still the same error message for the exactly the same
WAL segment number.
I unpublished and unsubscribed those
problematic tables and error messages stopped so they
were definitely related to logical replication. Could
they be caused by snapshot?
I even made additional strange experience with WAL
segments errors - my logical replica had only quite
small disk and during all that fiddling I forgot to
check disk usage. So postgresql on logical replica
crashed due to full disk. Since I use GCE I just resized
root disk and after restart of the instance got more
space. But I also got back missing WAL segments errors
in connections with logical replication. My postgresql
log on replica is now full of sequence of these 3 lines:
2019-01-22 09:47:14.408 UTC [1946] LOG: logical replication apply worker for subscription "mysubscription" has started
2019-01-22 09:47:14.429 UTC [1946] ERROR: could not receive data from WAL stream: ERROR: requested WAL segment 000000010000099D0000007A has already been removed
2019-01-22 09:47:14.431 UTC [737] LOG: background worker "logical replication worker" (PID 1946) exited with exit code 1
Why logical replication depends on some old WAL
segments? Today's data seem to work perfectly although
there cannot be all WAL segments for today available on
the logical master. But I am unable to publish older
data...
Thanks for help.
Josef Machytka