pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Peter Geoghegan <pg@bowt.ie>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Marco Nenciarini <marco.nenciarini@2ndquadrant.it>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Logical decoding of TRUNCATE
Date: Mon, 21 Dec 2020 09:42:47 -0800
Message-ID: <20201221174247.67pnoem5dtscocv4@alap3.anarazel.de> (raw)
In-Reply-To: <CAH2-WzkKTQVWhz7ZEJKiv7c4emgAzPKL92ag64kZdbh2YKgDkw@mail.gmail.com>
References: <20180405170712.av633jvnnizmd5sn@alvherre.pgsql>
	<1baed811-47b2-5b7d-c641-4b7eb01d650f@2ndquadrant.com>
	<20201220041319.GA3602688@rfd.leadboat.com>
	<20201220231308.yi4t3xj2btpanxs5@alap3.anarazel.de>
	<CAH2-WzkKTQVWhz7ZEJKiv7c4emgAzPKL92ag64kZdbh2YKgDkw@mail.gmail.com>

Hi,

On 2020-12-20 15:54:31 -0800, Peter Geoghegan wrote:
> On Sun, Dec 20, 2020 at 3:13 PM Andres Freund <andres@anarazel.de> wrote:
> > Hm. Do I understand correctly that this problem is hit solely because
> > the parallel mode code relies on there already have been a transaction
> > snapshot set, thus avoiding the error? And that the code normally only
> > works because GetTransactionSnapshot() will already have been called
> > somewhere, before EnterParallelMode()?
> 
> It seems unlikely that InitializeParallelDSM() was ever intended to be
> run in a background worker.

IDK, the environment in a bgworker shouldn't be that different from the
normal query environment in a normal connection. And it's far from
insane to want to be able to run a paralell query in a bgworker (and I
*think* I have seen that work before). This case here seems more like
an accidental dependency than anything to me, once that could perhaps
even hint at problems in normal backends too.

Greetings,

Andres Freund





view thread (48+ messages)  latest in thread

Message-ID: <20201221174247.67pnoem5dtscocv4@alap3.anarazel.de>
Permalink:  ../20201221174247.67pnoem5dtscocv4@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20201221174247.67pnoem5dtscocv4@alap3.anarazel.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andres@anarazel.de, pg@bowt.ie, robertmhaas@gmail.com, noah@leadboat.com, peter.eisentraut@2ndquadrant.com, alvherre@alvh.no-ip.org, marco.nenciarini@2ndquadrant.it, petr.jelinek@2ndquadrant.com, thomas.munro@enterprisedb.com, simon@2ndquadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: [PATCH] Logical decoding of TRUNCATE
  In-Reply-To: <20201221174247.67pnoem5dtscocv4@alap3.anarazel.de>
  References: <20180405170712.av633jvnnizmd5sn@alvherre.pgsql> <1baed811-47b2-5b7d-c641-4b7eb01d650f@2ndquadrant.com> <20201220041319.GA3602688@rfd.leadboat.com> <20201220231308.yi4t3xj2btpanxs5@alap3.anarazel.de> <CAH2-WzkKTQVWhz7ZEJKiv7c4emgAzPKL92ag64kZdbh2YKgDkw@mail.gmail.com> <20201221174247.67pnoem5dtscocv4@alap3.anarazel.de>

* 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