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
feat: postpone waiting of sync ddl
Due to the shared-storage architecture, higher requirement for DDL
synchronization is needed. Primary needs to acquire locks among all
replicas before doing acture operation. But it cause too much waiting
on PolarDB PG, some of them are just redundant. For example, primary
acqueries DDL lock and do nothing. This happends really often in
vacuum. And another case is create new table, truncate temp table are
also waiting for the DDL lock, which is unnecessary.
In this commit, postpone the waiting of sync ddl till the actual file
operations, eg, truncate and unlink. This will reduce a lot of
unnecessary waitings. The waiting on the operation of temp table is
also ignored. And thanks to the postpone, the waiting time can also be
collapse. When the waiting begins, it's likely to have all replicas
replayed beyond the point.
Add a new GUC polar_enable_sync_ddl_legacy to enable the old style
synchronous ddl.