pgsql: Fix ReorderBuffer memory overflow check.

2020-06-09 Thread Amit Kapila
Fix ReorderBuffer memory overflow check. Commit cec2edfa78 introduced logical_decoding_work_mem to limit ReorderBuffer memory usage. We spill the changes once the memory occupied by changes exceeds logical_decoding_work_mem. There was an assumption in the code that by evicting the largest (sub)tr

pgsql: Fix ReorderBuffer memory overflow check.

2020-06-09 Thread Amit Kapila
Fix ReorderBuffer memory overflow check. Commit cec2edfa78 introduced logical_decoding_work_mem to limit ReorderBuffer memory usage. We spill the changes once the memory occupied by changes exceeds logical_decoding_work_mem. There was an assumption in the code that by evicting the largest (sub)tr