Re: Further pg_upgrade analysis for many tables

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Jeff Janes <jeff.janes@gmail.com>, Simon Riggs <simon@2ndquadrant.com>, Bruce Momjian <bruce@momjian.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Magnus Hagander <magnus@hagander.net>
Date: 2013-01-20T19:32:29Z
Lists: pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> I'm curious if this is going to help with rollback's of transactions
> which created lots of tables..?  We've certainly seen that take much
> longer than we'd like, although I've generally attributed it to doing
> all of the unlink'ing and truncating of files.

If a single transaction creates lots of tables and then rolls back,
this patch won't change anything because we'll long since have
overflowed the eoxact list.  But you weren't seeing an O(N^2) penalty
in such cases anyway: that penalty came from doing O(N) work in each
of N transactions.  I'm sure you're right that you're mostly looking
at the filesystem cleanup work, which we can't do much about.

			regards, tom lane