From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: --single-transaction hack to pg_upgrade does not work |
Date: | 2012-12-01 17:11:57 |
Message-ID: | 20121201171157.GB31780@alap2 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2012-12-01 12:01:17 -0500, Andrew Dunstan wrote:
>
> On 12/01/2012 11:38 AM, Andres Freund wrote:
> >On 2012-12-01 17:36:20 +0100, Andres Freund wrote:
> >>On 2012-12-01 17:03:03 +0100, Andres Freund wrote:
> >>>Could we possibly allow adding enum values to a type which was just created in
> >>>this transaction? That shouldn't be too hard. At least easier than providing
> >>>the capability to pre-assign the next N oids...
> >>The attached patch does just that. Its *not* ready yet though, as it
> >>will be apparent for everyone who reads it ;)
> >>
> >>To really make that work in a reliable manner we would probably need
> >>an rd_createSubid for typcache entries instead of testing xmin as I have
> >>done here?
>
>
> Does this actually get you over the problem identified in the comment?:
>
> * We disallow this in transaction blocks, because we can't cope
> * with enum OID values getting into indexes and then having their
> * defining pg_enum entries go away.
I don't see why not at least. No index that can contain values from the enum
will survive a transaction abort or can be seen from the outside before it
committed.
So I don't see a problem. What made you concerned?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-12-01 17:14:37 | Re: --single-transaction hack to pg_upgrade does not work |
Previous Message | Andres Freund | 2012-12-01 17:10:18 | Re: --single-transaction hack to pg_upgrade does not work |