Re: pg_sequence catalog
От
Andreas Karlsson
Тема
Re: pg_sequence catalog
Дата
Msg-id
b330f4c4-6bc2-0a25-be6b-14f85c347361@proxel.se
Ответ на
Re: pg_sequence catalog (Peter Eisentraut)
Список
Дерево обсуждения
pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pg_sequence catalog Craig Ringer <craig@2ndquadrant.com>
Re: pg_sequence catalog Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_sequence catalog Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_sequence catalog Petr Jelinek <petr@2ndquadrant.com>
Re: pg_sequence catalog Craig Ringer <craig@2ndquadrant.com>
Re: pg_sequence catalog Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_sequence catalog Andres Freund <andres@anarazel.de>
Re: pg_sequence catalog Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_sequence catalog Andres Freund <andres@anarazel.de>
Re: pg_sequence catalog Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_sequence catalog Andres Freund <andres@anarazel.de>
Re: pg_sequence catalog Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pg_sequence catalog andres@anarazel.de (Andres Freund)
Re: pg_sequence catalog Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_sequence catalog Andres Freund <andres@anarazel.de>
Re: pg_sequence catalog Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_sequence catalog Andres Freund <andres@anarazel.de>
Re: pg_sequence catalog Amit Kapila <amit.kapila16@gmail.com>
Re: pg_sequence catalog Andres Freund <andres@anarazel.de>
Re: pg_sequence catalog Amit Kapila <amit.kapila16@gmail.com>
Re: pg_sequence catalog Michael Paquier <michael.paquier@gmail.com>
Re: pg_sequence catalog Greg Stark <stark@mit.edu>
Re: pg_sequence catalog Simon Riggs <simon@2ndquadrant.com>
Re: pg_sequence catalog Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_sequence catalog Andres Freund <andres@anarazel.de>
Re: pg_sequence catalog Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pg_sequence catalog Andreas Karlsson <andreas@proxel.se>
Re: pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pg_sequence catalog Andreas Karlsson <andreas@proxel.se>
Re: [HACKERS] pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] pg_sequence catalog Kuntal Ghosh <kuntalghosh.2007@gmail.com>
Re: [HACKERS] pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] pg_sequence catalog Andreas Karlsson <andreas@proxel.se>
Re: [HACKERS] pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pg_sequence catalog Haribabu Kommi <kommi.haribabu@gmail.com>
Re: pg_sequence catalog Andreas Karlsson <andreas@proxel.se>
Re: pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: pg_sequence catalog Andreas Karlsson <andreas@proxel.se>
Re: pg_sequence catalog Andreas Karlsson <andreas@proxel.se>
Re: pg_sequence catalog Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Review for pg_sequence catalog I like this change since it moves all the parts which should be transactional to the system catalogs while keeping the only non-transactional stuff in the sequence relations. There was some discussion upthread about more compact representations for the sequences, but I feel that is a separate issue mostly unrelated to this patch. I might play around more with it but it seems to work well so far. As pointed out by Peter this patch also requires the changes to pg_upgrade. I have not looked at those patches. = Functional review - The patch applies and compiles and seems to work fine after some quick manual testing. - The pg_dump tests fails due to the pg_dump code not being updated. I have attached a patch which fixes this. = Benchmarks 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. = Code The changes to the code looks generally good. > @@ -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". = Documentation The patch does not update catalogs.sgml which it should do. Andreas
В списке pgsql-hackers по дате отправления
От: Amit Kapila
Дата:
От: Craig Ringer
Дата: