Hi Hackers. As discovered in another thread [master] there is an *existing* bug in the PG HEAD code which can happen if a DROP TABLE is done at same time a replication tablesync worker is running.
It seems the table's relid that the sync worker is using gets ripped out from underneath it and is invalidated by the DROP TABLE. Any subsequent use of that relid will go wrong. In the particular test case which found this, the result was a stack trace when a LOG message tried to display the table name of the bad relid. PSA the patch code to fix this. The patch disallows DROP TABLE while any associated tablesync worker is still running. This fix was already confirmed OK in the other thread [v25] ---- [master] https://www.postgresql.org/message-id/CAHut%2BPtSO4WsZwx8z%3D%2BYp_OWpxFmmFi5WX6OmYJzULNa2NV89g%40mail.gmail.com [v25] https://www.postgresql.org/message-id/CAHut%2BPtAKP1FoHbUEWN%2Ba%3D8Pg_njsJKc9Zoz05A_ewJSvjX2MQ%40mail.gmail.com Kind Regards, Peter Smith. Fujitsu Australia
v1-0001-DROP-TABLE-breaks-sync-worker-relid.patch
Description: Binary data