[Postgres-xl-bugs] about gtm control file

Mason S masonlists at gmail.com
Tue Apr 28 19:26:23 PDT 2015


On Tue, Apr 28, 2015 at 9:50 AM, bryain <pgdevuser at 163.com> wrote:

> Hi,Koichi
> By specifying the options -x (xid) can only let the GTM start from the
> specifying xid.
>
> for example:
> postgres$ vi gtm.control
> 1231311
>
> After stop the gtm will update the control file
> postgres$ vi gtm.control
> 1231495
>
> now,start the gtm
> postgres$ vi gtm.control
> 1231495
>
> The control file value did not change,but in memory the xid is
> increasing(We assume that is 1231500,bigger than before)
> At this time abnormal GTM to exit (the power outages or other factors)
> postgres$ vi gtm.control
> 1231495
>
> the value of 1231495 is smaller than 1231500,and start the gtm will start
> with 1231495,and this time how can I know the real value should be 1231500?
> just gtm.control record is 1231495.Is this a bug?
>
>
On restart, if no value is passed in, it will use the last value plus 1000,
to be safe and avoid such issues. I am not sure why you are seeing this
behavior.

How are you checking the value of XID? Note that it does not write *every*
change in value of XID to the file. After 1000 transactions, it will write
the next value. Skipping 1000 on restart ensures that the last unwritten
value won't be reused. I hope that helps explain things.

Regards,

Mason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/private.cgi/postgres-xl-bugs-postgres-xl.org/attachments/20150428/08af7ac2/attachment.htm>


More information about the postgres-xl-bugs mailing list