From:
Bruce Momjian <bruce(at)momjian(dot)us>
To:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc:
Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>,Magnus Hagander <magnus(at)hagander(dot)net>,Fujii Masao <masao(dot)fujii(at)gmail(dot)com>,Euler Taveira de Oliveira <euler(at)timbira(dot)com>,Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: xlog location arithmetic
Date:
2012-03-13 00:47:24
Message-ID:
20120313004724.GE10441@momjian.us (view raw or flat )
Thread:
2011-12-06 04:19:49 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2011-12-06 10:14:02 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-06 16:11:32 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-06 18:00:51 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2011-12-06 18:06:36 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-13 17:48:22 from Jim Nasby <jim(at)nasby(dot)net>
2011-12-13 20:37:10 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-20 10:27:41 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-20 13:08:50 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2011-12-23 11:54:22 from Magnus Hagander <magnus(at)hagander(dot)net>
2011-12-23 15:05:54 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-23 15:13:41 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-23 15:18:21 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-23 15:32:29 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-23 15:59:35 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-23 16:15:07 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-23 15:13:42 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-21 16:13:41 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-01-26 09:19:28 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-02-07 17:29:16 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-02-08 12:35:15 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-02-09 22:00:30 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-02-10 08:32:46 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-02-25 12:23:25 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-02-25 23:53:19 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-02-28 06:21:12 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-03-04 11:26:56 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-04 11:26:36 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-09 12:11:13 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-03-09 14:37:35 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 14:44:08 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-09 15:00:55 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 14:55:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 15:31:26 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-09 15:37:42 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 17:13:26 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-09 19:23:28 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2012-03-09 19:26:44 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 19:34:04 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-09 19:39:26 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-09 20:04:23 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 20:12:20 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-13 00:47:24 from Bruce Momjian <bruce(at)momjian(dot)us>
2012-03-13 02:51:50 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-03-13 03:03:42 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-13 03:36:45 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-03-09 19:37:43 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2012-03-09 17:14:00 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-09 17:18:24 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-03-09 17:38:28 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-03-09 18:23:38 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-03-13 02:34:10 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-04-13 20:30:16 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-04-14 11:25:42 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-04-14 12:08:12 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-17 14:46:07 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-06 17:39:21 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-01-14 14:06:34 from Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
2012-01-14 14:12:21 from Euler Taveira de Oliveira <euler(at)timbira(dot)com>
2012-01-15 01:18:31 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-15 03:49:00 from Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
2012-01-15 04:44:08 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-15 08:17:54 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-01-15 08:37:30 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-15 08:45:25 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-01-16 17:57:25 from Robert Haas <robertmhaas(at)gmail(dot)com>
2012-01-16 17:58:29 from Magnus Hagander <magnus(at)hagander(dot)net>
2012-01-16 20:48:41 from Josh Berkus <josh(at)agliodbs(dot)com>
2012-01-16 21:10:23 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-16 21:25:50 from Josh Berkus <josh(at)agliodbs(dot)com>
2012-01-16 21:37:59 from Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
2012-01-16 22:08:09 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-16 22:25:50 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-16 22:40:38 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-17 15:33:27 from Matteo Beccati <php(at)beccati(dot)com>
2012-01-17 16:50:41 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-17 17:10:11 from Matteo Beccati <php(at)beccati(dot)com>
2012-01-17 17:22:12 from Matteo Beccati <php(at)beccati(dot)com>
2012-01-17 16:50:20 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-17 17:24:05 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-01-17 20:17:05 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-18 01:23:13 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-18 02:46:36 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-22 18:53:39 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-01-16 23:23:33 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-17 16:50:26 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2012-01-17 18:19:13 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2012-01-19 17:59:35 from Alex Shulgin <ash(at)commandprompt(dot)com>
2012-01-22 18:54:30 from Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
2012-01-19 18:14:02 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2012-01-19 18:41:54 from Alex Shulgin <ash(at)commandprompt(dot)com>
2012-01-19 19:04:07 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2012-01-19 19:10:00 from Andrew Dunstan <andrew(at)dunslane(dot)net>
Lists:
pgsql-hackers
On Fri, Mar 09, 2012 at 03:04:23PM -0500, Tom Lane wrote:
> The main actual simplification would be in getting rid of the "hole"
> at the end of each 4GB worth of WAL, cf this bit in xlog_internal.h:
>
> /*
> * We break each logical log file (xlogid value) into segment files of the
> * size indicated by XLOG_SEG_SIZE. One possible segment at the end of each
> * log file is wasted, to ensure that we don't have problems representing
> * last-byte-position-plus-1.
> */
> #define XLogSegSize ((uint32) XLOG_SEG_SIZE)
> #define XLogSegsPerFile (((uint32) 0xffffffff) / XLogSegSize)
> #define XLogFileSize (XLogSegsPerFile * XLogSegSize)
>
> If we can't get rid of that and have a continuous 64-bit WAL address
> space then it's unlikely we can actually simplify any logic.
>
> Now, doing that doesn't break the naming convention exactly; what it
> changes is that there will be WAL files numbered xxxFFFF (for some
> number of trailing-1-bits I'm too lazy to work out at the moment) where
> before there were not. So the question really is how much external code
> there is that is aware of that specific noncontiguous numbering behavior
> and would be broken if things stopped being that way.
Our current WAL naming is hopelessly arcane, and we would certainly be
benfitting users to simplify it. Is this a TODO?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
In response to
pgsql-hackers by date
Next :From: Noah MischDate: 2012-03-13 01:24:40
Subject : Re: foreign key locks, 2nd attempt
Previous :From : Bruce MomjianDate : 2012-03-12 23:50:31
Subject : Re: pg_upgrade and umask