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
Store the snapshot for the initial load in the correct memory context.
Although the correct context (TopMemoryContext) is set explicitly, it appears
that DecodingContextFindStartpoint() (PG core) can change it to
TopTransactionContext. This can happen if cache invalidations are processed at
certain stage of the setup of the logical decoding system. In practice, cache
invalidations take place when DDL commands are executed.
If the wrong memory context is used, the snapshot for the initial load can get
corrupted, which in turn can cause ERROR (i.e. failure complete the squeezing,
in which case all the work done by the extension gets rolled
back). Unfortunately, at specific circumstances, data loss might probably take
place instead, although I haven't heard about such a case so far.
This bug only affects "manual" processing of tables, i.e. cases where the
squeeze.squeeze_table() function is used. It does not affect cases where the
scheduler worker is involved (shared memory is used then).
0 commit comments