pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Antonin Houska <ah@cybertec.at>
To: pgsql-hackers@postgresql.org
Subject: Re: snapbuild woes
Date: Fri, 09 Jun 2017 09:25:34 +0200
Message-ID: <32704.1496993134@localhost> (raw )
In-Reply-To: <20170424225957.3i2qpsyblgcisbsg@alap3.anarazel.de >
References: <194608bf-d403-b566-3578-4439e70a8119@2ndquadrant.com >
<20161212223338.bmhswrdaipttvcve@alap3.anarazel.de >
<7023017e-8b08-eaba-396c-80baf0a793c0@2ndquadrant.com >
<7286ebe9-cb1b-cf1a-f85b-fbe3402ea0bf@2ndquadrant.com >
<9a897b86-46e1-9915-ee4c-da02e4ff6a95@2ndquadrant.com >
<51f65289-54f8-2256-d107-937d662d69f1@2ndquadrant.com >
<f41d64c7-1ae2-fac7-bf7f-f24dfe2d33bd@2ndquadrant.com >
<20170413002959.apytyi5lkknauauj@alap3.anarazel.de >
<0d06dfc1-0bc5-c3ab-3555-24e2f275d7fa@2ndquadrant.com >
<30242bc6-eca4-b7bb-670e-8d0458753a8c@2ndquadrant.com >
<20170424225957.3i2qpsyblgcisbsg@alap3.anarazel.de >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Andres Freund <andres@anarazel.de> wrote:
> Looking at 0001:
> - GetOldestSafeDecodingTransactionId() only guarantees to return an xid
> safe for decoding (note how procArray->replication_slot_catalog_xmin
> is checked), not one for the initial snapshot - so afaics this whole
> exercise doesn't guarantee much so far.
I happen to use CreateInitDecodingContext() in an extension, so I had to think
what the new argumen exactly means (as for the incompatibility between PG
9.6.2 and 9.6.3, I suppose preprocessor directives can handle it).
One thing I'm failing to understand is: if TRUE is passed for
need_full_snapshot, then slot->effective_xmin receives the result of
GetOldestSafeDecodingTransactionId(need_full_snapshot)
but this does include "catalog xmin".
If the value returned is determined by an existing slot which has valid
effective_catalog_xmin and invalid effective_xmin (i.e. that slot only
protects catalog tables from VACUUM but not the regular ones), then the new
slot will think it (i.e. the new slot) protects even non-catalog tables, but
that's no true.
Shouldn't the xmin_horizon be computed by this call instead?
GetOldestSafeDecodingTransactionId(!need_full_snapshot);
(If so, I think "considerCatalog" argument name would be clearer than
"catalogOnly".)
--
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de , http://www.cybertec.at
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (92+ messages) latest in thread
Message-ID: <32704.1496993134@localhost>
Permalink: ../32704.1496993134@localhost/
Also on: postgresql.org/message-id/32704.1496993134@localhost
copy link · copy postgr.es
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: ah@cybertec.at
Subject: Re: snapbuild woes
In-Reply-To: <32704.1496993134@localhost>
* 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