From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Andreas Karlsson <andreas(at)proxel(dot)se>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_sequence catalog |
Date: | 2016-12-01 03:58:18 |
Message-ID: | bbb84c37-9a7c-ae51-c143-7b3fb3a6f235@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/11/16 10:06 PM, Andreas Karlsson wrote:
> As pointed out by Peter this patch also requires the changes to
> pg_upgrade. I have not looked at those patches.
The required changes to pg_upgrade have been committed, so that will
work now.
> - The pg_dump tests fails due to the pg_dump code not being updated. I
> have attached a patch which fixes this.
fixed
> I was a bit worried that the extra syscache lookups might slow down
> nextval(), but I got a measurable speed up on a very simple workload
> which consisted of only calls to nextval() to one sequence. The speedup
> was about 10% on my machine.
I have done a fair amount of performance testing and the results were
usually in the neighborhood of 1%-2% slower or faster, nothing really
clear. But running nextval by itself in a tight loop isn't really a
normal use. The important thing is the concurrency behavior.
> > @@ -1155,6 +1156,8 @@ doDeletion(const ObjectAddress *object, int flags)
> > else
> > heap_drop_with_catalog(object->objectId);
> > }
> > + if (relKind == RELKIND_SEQUENCE)
> > + DeleteSequenceTuple(object->objectId);
> > break;
> > }
>
> I think it might be cleaner here to put this as a "else if" just like
> "relKind == RELKIND_INDEX".
The sequence tuple has to be deleted in addition to the heap drop. I
have added a comment to make the clearer.
> The patch does not update catalogs.sgml which it should do.
added
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Add-pg_sequence-system-catalog.patch | text/x-patch | 50.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-12-01 04:37:35 | Re: Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default |
Previous Message | Peter Eisentraut | 2016-12-01 02:32:06 | Re: Re: [COMMITTERS] pgsql: Build HTML documentation using XSLT stylesheets by default |