Professional Web Applications Themes
  1. #1

    Default What is xmin ?

    Hi,
    I read about xmin in a thread on optimistic concurrency control.
    Can you guys tell me how to interpret this value. I want to convert
    this to date format. Is it possible ?

    rgds
    Antony Paul

    ---------------------------(end of broadcast)---------------------------
    TIP 5: Have you checked our extensive FAQ?

    [url]http://www.postgresql.org/docs/faqs/FAQ.html[/url]

    Antony Paul Guest

  2. #2

    Default Re: What is xmin ?

    > Can you guys tell me how to interpret this value. I want to convert
    > this to date format. Is it possible ?
    No.

    XMIN holds the id of the transaction which did the most recent
    change to a row as is visible from within the current
    transaction. Unless it wraps around (is that possible ?) older
    transactions should have XMIN values lower than younger
    transactions.

    Karsten
    --
    GPG key ID E4071346 @ wwwkeys.pgp.net
    E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

    ---------------------------(end of broadcast)---------------------------
    TIP 3: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to [email]majordomo@postgresql.org[/email] so that your
    message can get through to the mailing list cleanly

    Karsten Hilbert Guest

  3. #3

    Default Re: What is xmin ?

    On Tue, Jan 18, 2005 at 02:43:09PM +0100, Karsten Hilbert wrote:
    > XMIN holds the id of the transaction which did the most recent
    > change to a row as is visible from within the current
    > transaction. Unless it wraps around (is that possible ?) older
    > transactions should have XMIN values lower than younger
    > transactions.
    Yes, it wraps around, that's why modulo arithmetic is used internally to
    handle it. Beyond that, it skips a few (3 or 4) special values just
    above zero.

    --
    Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
    "There was no reply" (Kernel Traffic)

    ---------------------------(end of broadcast)---------------------------
    TIP 3: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to [email]majordomo@postgresql.org[/email] so that your
    message can get through to the mailing list cleanly

    Alvaro Herrera Guest

  4. #4

    Default Re: What is xmin ?

    On Tue, Jan 18, 2005 at 02:43:09PM +0100, Karsten Hilbert wrote:
    > > Can you guys tell me how to interpret this value. I want to convert
    > > this to date format. Is it possible ?
    > No.
    >
    > XMIN holds the id of the transaction which did the most recent
    > change to a row as is visible from within the current
    > transaction. Unless it wraps around (is that possible ?) older
    > transactions should have XMIN values lower than younger
    > transactions.
    Correct. XMIN is a transaction ID and it can wraparound. To counter
    this there is a special XMIN value which means "older than any
    transaction". Which the reason you must run VACUUM at least once every
    billion transactions or so. Hardly a difficult request :)

    There is no way to convert it to a date, since it doesn't represent a
    date or even a point in time. It represents a transaction and how it
    relates to other transactions.

    Hope this helps,
    --
    Martijn van Oosterhout <kleptog@svana.org> [url]http://svana.org/kleptog/[/url]
    > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
    > tool for doing 5% of the work and then sitting around waiting for someone
    > else to do the other 95% so you can sue them.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (GNU/Linux)
    Comment: For info see [url]http://www.gnupg.org[/url]

    iD8DBQFB7Sx/Y5Twig3Ge+YRAgfvAJ4hpzxM52v/IFpPeVMF/QTkoo6tHACglkUo
    NQLVNFw6qEYG+JuYcBQx7tU=
    =iAn6
    -----END PGP SIGNATURE-----

    Martijn van Oosterhout Guest

  5. #5

    Default Re: What is xmin ?

    In an attempt to throw the authorities off his trail, [email]antonypaul24@gmail.com[/email] (Antony Paul) transmitted:
    > I read about xmin in a thread on optimistic concurrency control.
    > Can you guys tell me how to interpret this value. I want to convert
    > this to date format. Is it possible ?
    xmin is a transaction ID number. There is no such conversion
    possible.

    [url]http://www.faqs.org/docs/ppbook/x4636.htm[/url]

    It would be kind of neat if there were some table into which
    transactions were logged; in that case, there would presumably be a
    couple of timestamps, namely the time at which the transaction began
    and the time at which the transaction ended. There is no such table
    by default.
    --
    wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','acm.org').
    [url]http://www.ntlug.org/~cbbrowne/languages.html[/url]
    We are in fact well and truly doomed.
    -- Jamie Zawinski [url]http://www.jwz.org/gruntle/nscpdorm.html[/url]
    Christopher Browne Guest

  6. #6

    Default Re: What is xmin ?

    On Tue, Jan 18, 2005 at 01:16:55PM -0500, Christopher Browne wrote:
    > It would be kind of neat if there were some table into which
    > transactions were logged; in that case, there would presumably be a
    > couple of timestamps, namely the time at which the transaction began
    > and the time at which the transaction ended. There is no such table
    > by default.
    It would be useful in a savepoints' world only if accompanied by the
    time a subtransaction began and ended, and the information about
    parent/child relationship.

    --
    Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
    "Tiene valor aquel que admite que es un cobarde" (Fernandel)

    ---------------------------(end of broadcast)---------------------------
    TIP 5: Have you checked our extensive FAQ?

    [url]http://www.postgresql.org/docs/faqs/FAQ.html[/url]

    Alvaro Herrera Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139