Rename txn->{n_local_rows,n_remote_rows}
We need to keep count of different kind of rows in a transaction: - rows which already exist in some WAL and are replayed locally. These used to be called n_remote_rows, and renamed to n_applier_rows - rows which were created locally, on this server (previously called n_local_rows, renamed to n_new_rows). Of the latter, we need to distinguish between GROUP_ID=LOCAL rows, i.e. rows which need not be replicated, and GROUP_ID=REPLICA rows, which need to be replicated. For example, a remote transaction can fire local triggers which generate local rows. If these triggers generate rows which need to be replicated, the transaction has to be aborted. In a subsequent patch I plan to add n_local_rows, which tracks the number of new rows with GROUP_ID=local and use it in txn_is_distributed() check.
Loading
Please register or sign in to comment