pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Claudio Freire <klaussfreire@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_upgrade and materialized views
Date: Tue, 20 Feb 2018 14:59:43 -0800
Message-ID: <20180220225942.viknwtspvgeac5lh@alap3.anarazel.de> (raw)
In-Reply-To: <27849.1519165741@sss.pgh.pa.us>
References: <CAGTBQpbrY9CdRGGhyBZ9yqY4jWaGC85rUF4X+R7d-aim=mBNsw@mail.gmail.com>
	<20180220215420.cdmx6bfqtzasjjcs@alap3.anarazel.de>
	<25875.1519164329@sss.pgh.pa.us>
	<20180220221709.qztvpxgly2wvbz2u@alap3.anarazel.de>
	<27849.1519165741@sss.pgh.pa.us>

On 2018-02-20 17:29:01 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > I wonder if there's a scenario in which a schema restore uses enough
> > xids to get close to anti-wraparound territory?
> 
> Interesting question ... you'd need one heck of a lot of objects in
> the cluster, but we've certainly heard of people with lots of objects.
> 
> We could stave that problem off by running the restore steps in
> --single-transaction mode, if it weren't that pg_restore will reject the
> combination of --create and --single-transaction.  I wonder if we should
> allow that, specifying that it means that the single transaction starts
> after we reconnect to the new DB.

One problem is that we need to restore some types of objects that can be
quite voluminous (e.g. users) during the restore of global objects. But
we IIRC can't make all of that use a single transaction as some commands
like CREATE DATABASE / TABLESPACE etc don't like that.

I suspect one of the more realistic ways to use up huge amounts of xids
would be to have lots of large objects with individual permissions?

A quick and dirt option would be to add a few hand-scheduled transaction
commands at the right places in a pg_upgrade mode :/

Greetings,

Andres Freund




view thread (31+ messages)  latest in thread

Message-ID: <20180220225942.viknwtspvgeac5lh@alap3.anarazel.de>
Permalink:  ../20180220225942.viknwtspvgeac5lh@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20180220225942.viknwtspvgeac5lh@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-bugs@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, klaussfreire@gmail.com
  Subject: Re: pg_upgrade and materialized views
  In-Reply-To: <20180220225942.viknwtspvgeac5lh@alap3.anarazel.de>
  References: <CAGTBQpbrY9CdRGGhyBZ9yqY4jWaGC85rUF4X+R7d-aim=mBNsw@mail.gmail.com> <20180220215420.cdmx6bfqtzasjjcs@alap3.anarazel.de> <25875.1519164329@sss.pgh.pa.us> <20180220221709.qztvpxgly2wvbz2u@alap3.anarazel.de> <27849.1519165741@sss.pgh.pa.us> <20180220225942.viknwtspvgeac5lh@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