pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Alexey Kondratov <a.kondratov@postgrespro.ru>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Date: Fri, 30 Aug 2019 18:59:32 +0300
Message-ID: <322e40c4-8ca7-6c34-2544-28a6d95989c2@postgrespro.ru> (raw)
In-Reply-To: <20190829184824.kmrbchrk2ged6vjw@development>
References: <e84013b6-b890-1c4c-2b82-eca185a2197c@2ndquadrant.com>
	<8940f374-6651-26d0-cefe-6c719454b6fe@2ndquadrant.com>
	<40c38758-04b5-74f4-c963-cf300f9e5dff@postgrespro.ru>
	<b95ba070-cd21-72b9-2979-8cdf4d3dd1c6@2ndquadrant.com>
	<126e3a30-a7f5-ede4-2bd0-b217749c8b33@postgrespro.ru>
	<c511125d-33d7-5209-98ce-5c9977f3e437@2ndquadrant.com>
	<f4cf3883-5ce2-6829-bb42-3038bfc7b4d9@postgrespro.ru>
	<8eda5118-2dd0-79a1-4fe9-eec7e334de17@postgrespro.ru>
	<20190828190646.s3bjs22urff32k56@development>
	<bb84dcf8-0a7d-5c8b-9cea-7186dc3acc3c@postgrespro.ru>
	<20190829184824.kmrbchrk2ged6vjw@development>


>
> FWIW my understanding is that the speedup comes mostly from 
> elimination of
> the serialization to a file. That however requires savepoints to handle
> aborts of subtransactions - I'm pretty sure I'd be trivial to create a
> workload where this will be much slower (with many aborts of large
> subtransactions).
>
>

I think that instead of defining savepoints it is simpler and more 
efficient to use

BeginInternalSubTransaction + 
ReleaseCurrentSubTransaction/RollbackAndReleaseCurrentSubTransaction

as it is done in PL/pgSQL (pl_exec.c).
Not sure if it can pr

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company






view thread (536+ messages)  latest in thread

Message-ID: <322e40c4-8ca7-6c34-2544-28a6d95989c2@postgrespro.ru>
Permalink:  ../322e40c4-8ca7-6c34-2544-28a6d95989c2@postgrespro.ru/
Also on:    postgresql.org/message-id/322e40c4-8ca7-6c34-2544-28a6d95989c2@postgrespro.ru

 · 

reply

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: k.knizhnik@postgrespro.ru, tomas.vondra@2ndquadrant.com, a.kondratov@postgrespro.ru, peter.eisentraut@2ndquadrant.com, er@xs4all.nl, sawada.mshk@gmail.com
  Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
  In-Reply-To: <322e40c4-8ca7-6c34-2544-28a6d95989c2@postgrespro.ru>

* 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