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

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Date: 2018-01-03 20:06:59
Message-ID: bbe1333f-17ba-1156-0713-7cc0bfe2d842@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

attached is v4 of the patch series, with a couple of changes:

1) Fixes a bunch of bugs I discovered during stress testing.

I'm not going to go into details, but the main fixes are related to
properly updating progress from the worker, and not streaming when
creating the logical replication slot.

2) Introduces columns into pg_stat_replication.

The new columns track various kinds of statistics (number of xacts,
bytes, ...) about spill-to-disk/streaming. This will be useful when
tuning the GUC memory limit.

3) Two temporary bugfixes that make the patch series work.

The first one (0008) makes sure is_known_subxact is set properly for all
subtransactions, and there's a separate fix in the CF. So this will
eventually go away.

The second one (0009) fixes an issue that is specific to streaming. It
does fix the issue, but I need a bit more time to think about it before
merging it into 0005.

This does pass extensive stress testing with a workload mixing DML, DDL,
subtransactions, aborts, etc. under valgrind. I'm working on extending
the test coverage, and introducing various error conditions (e.g.
walsender/walreceiver timeouts, failures on both ends, etc.).

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Introduce-logical_work_mem-to-limit-ReorderBuffer-v4.patch.gz application/gzip 9.9 KB
0002-Issue-XLOG_XACT_ASSIGNMENT-with-wal_level-logical-v4.patch.gz application/gzip 2.7 KB
0003-Issue-individual-invalidations-with-wal_level-log-v4.patch.gz application/gzip 4.8 KB
0004-Extend-the-output-plugin-API-with-stream-methods-v4.patch.gz application/gzip 5.3 KB
0005-Implement-streaming-mode-in-ReorderBuffer-v4.patch.gz application/gzip 10.8 KB
0006-Add-support-for-streaming-to-built-in-replication-v4.patch.gz application/gzip 18.2 KB
0007-Track-statistics-for-streaming-spilling-v4.patch.gz application/gzip 4.3 KB
0008-BUGFIX-make-sure-subxact-is-marked-as-is_known_as-v4.patch.gz application/gzip 571 bytes
0009-BUGFIX-set-final_lsn-for-subxacts-before-cleanup-v4.patch.gz application/gzip 629 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-01-03 20:13:29 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Tom Lane 2018-01-03 19:54:45 Re: to_timestamp TZH and TZM format specifiers