From: 鈴木 幸市 <ko...@in...> - 2013-04-22 00:48:40
|
I'm afraid the cause is not only by gym. If min_value is not specified (or specified as "invalid" value), gtm assigns -0x7ffffffffffffffeLL as the minimum value of the sequence (see gtm_seq.[ch]). So I suspect that minimum value will be specified by DDL in the coordinator. You fix is very welcome. GTM in the current master has a backup feature which dumps next restore point of gxid and each sequence to gtm.control. I hope this helps tests to some extent. Regards; --- Koichi Suzuki On 2013/04/22, at 8:32, Michael Paquier <mic...@gm...> wrote: > > > > On Mon, Apr 22, 2013 at 3:57 AM, Nikhil Sontakke <ni...@st...> wrote: > Hi all, > > Consider the following: > > create sequence seqname increment by -2; > select nextval('seqname'); > ERROR: GTM error, could not obtain sequence value > > The above should have returned -1. > > ISTM, the sequence fetching logic on the backend side has been coded entirely with the assumption that sequences can never have negative values. So a less than 0 value returned from get_next() is assumed to be a problem! That's completely wrong. We need to deal with this properly. I will submit a patch for this when I get some time soon. > Adding a regression test in xc_sequence.sql would also be good to cover this case as this is caused by xc-only code. > -- > Michael > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers |