From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Date: Wed, 3 Jan 2018 21:06:59 +0100
Message-ID: <bbe1333f-17ba-1156-0713-7cc0bfe2d842@2ndquadrant.com> (raw)
In-Reply-To: <688b0b7f-2f6c-d827-c27b-216a8e3ea700@2ndquadrant.com>
References: <688b0b7f-2f6c-d827-c27b-216a8e3ea700@2ndquadrant.com>
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
Attachments:
0001-Introduce-logical_work_mem-to-limit-ReorderBuffer-v4.patch.gz (application/gzip, 9.9K) download
0002-Issue-XLOG_XACT_ASSIGNMENT-with-wal_level-logical-v4.patch.gz (application/gzip, 2.7K) download
0003-Issue-individual-invalidations-with-wal_level-log-v4.patch.gz (application/gzip, 4.8K) download
0004-Extend-the-output-plugin-API-with-stream-methods-v4.patch.gz (application/gzip, 5.3K) download
0005-Implement-streaming-mode-in-ReorderBuffer-v4.patch.gz (application/gzip, 10.8K) download
0006-Add-support-for-streaming-to-built-in-replication-v4.patch.gz (application/gzip, 18.2K) download
0007-Track-statistics-for-streaming-spilling-v4.patch.gz (application/gzip, 4.3K) download
0008-BUGFIX-make-sure-subxact-is-marked-as-is_known_as-v4.patch.gz (application/gzip, 571B) download
0009-BUGFIX-set-final_lsn-for-subxacts-before-cleanup-v4.patch.gz (application/gzip, 629B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@2ndquadrant.com
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
In-Reply-To: <bbe1333f-17ba-1156-0713-7cc0bfe2d842@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox