Tom Lane wrote:
>
> Vadim Mikheev <vadim@krs.ru> writes:
> >> On Thu, 3 Jun 1999, Tom Lane wrote:
> >>>> Bruce seemed to think that we could just flush the sys caches and
> >>>> relation cache completely during xact abort.
>
> > Could you remember me what's the problem with cache?
>
> The reported problem was that if a new relation is created, and then
> the transaction is aborted, the SysCache entry for the new relation's
> pg_class entry doesn't get removed. For example:
>
> test=> create table bug1 (f1 int28 primary key);
> ERROR: Can't find a default operator class for type 22.
> -- That's expected, since we have no index support for int28. But now:
> test=> create table bug1 (f1 int28);
> ERROR: Relation 'bug1' already exists
>
> The second try fails because it finds an entry for 'bug1' in the
> RELNAME SysCache, which was made before the create-index step of
> CREATE TABLE failed. That entry should not be there anymore.
Note this:
vac=> begin;
BEGIN
vac=> create table bug1 (f1 int28);
CREATE
vac=> abort;
ABORT
vac=> create table bug1 (f1 int28);
CREATE
I would leave this in 6.5 as is.
Vadim