Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Date: 2019-01-14 18:23:31
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers


Attached is an updated patch series, merging fixes and changes to TAP
tests proposed by Alexey. I've merged the fixes into the appropriate
patches, and I've kept the TAP changes / new tests as separate patches
towards the end of the series.

I'm a bit unhappy with two aspects of the current patch series:

1) We now track schema changes in two ways - using the pre-existing
schema_sent flag in RelationSyncEntry, and the (newly added) flag in
ReorderBuffer. While those options are used for regular vs. streamed
transactions, fundamentally it's the same thing and so having two
competing ways seems like a bad idea. Not sure what's the best way to
resolve this, though.

2) We've removed quite a few asserts, particularly ensuring sanity of
cmin/cmax values. To some extent that's expected, because by allowing
decoding of in-progress transactions relaxes some of those rules. But
I'd be much happier if some of those asserts could be reinstated, even
if only in a weaker form.


Tomas Vondra
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Add-logical_work_mem-to-limit-ReorderBuffer-20190114.patch.gz application/gzip 9.9 KB
0002-Immediately-WAL-log-assignments-20190114.patch.gz application/gzip 6.4 KB
0003-Issue-individual-invalidations-with-wal_lev-20190114.patch.gz application/gzip 4.9 KB
0004-Extend-the-output-plugin-API-with-stream-me-20190114.patch.gz application/gzip 6.1 KB
0005-Implement-streaming-mode-in-ReorderBuffer-20190114.patch.gz application/gzip 12.8 KB
0006-Add-support-for-streaming-to-built-in-repli-20190114.patch.gz application/gzip 19.8 KB
0007-Track-statistics-for-streaming-spilling-20190114.patch.gz application/gzip 4.2 KB
0008-Enable-streaming-for-all-subscription-TAP-t-20190114.patch.gz application/gzip 1.8 KB
0009-BUGFIX-set-final_lsn-for-subxacts-before-cl-20190114.patch.gz application/gzip 639 bytes
0010-Add-TAP-test-for-streaming-vs.-DDL-20190114.patch.gz application/gzip 1.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-01-14 18:36:14 Re: Reducing header interdependencies around heapam.h et al.
Previous Message Simon Riggs 2019-01-14 17:14:03 Re: MERGE SQL statement for PG12