Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 4D80E13FA3D7 for ; Mon, 18 Jun 2012 15:08:35 -0300 (ADT) Received: from exprod7og105.obsmtp.com ([64.18.2.163]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SggNN-0006lN-EJ for pgsql-hackers@postgresql.org; Mon, 18 Jun 2012 18:08:34 +0000 Received: from mail-lb0-f179.google.com ([209.85.217.179]) (using TLSv1) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKT99ukwPURCOEnXTfVb+Yi9CKJpV59+93@postini.com; Mon, 18 Jun 2012 11:08:33 PDT Received: by lban1 with SMTP id n1so4139511lba.10 for ; Mon, 18 Jun 2012 11:08:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=smzDyKiVk4ty0mgYQ+htZB0wjnggjIfW8wazJMbKIyg=; b=jG9c2RXvkjKiz2Xr+e4VsjxltGG88C6OIa+yMmfCDBM1ZyZYryqEC83GytV0QBwRDy 3ihvVc5BR3t5NjUTaBvVVnHYcXqYIMTZ9t99Xr5D0i+AkbT97+sKIuTvvep3SINR27wC sYlxuWL9FcTYKno4RnOjCiUuhKIXXPFSv2HFVFRRlcoDp4dW5hGaIFrl2Fcwx14KTik3 a7KRqGcGQVUgE0bJV+dveq8eyqVwSpgwamTICDHQdI0C3QRT6AiGAg/2u9jj5WS4tzYe 5PKFbB1Pypps2MUJ0r9J1CYMQYLXz8GK1QHavFi5sq1OVs9MUePVwnmtIVcXAYri9OSh C6sg== Received: by 10.152.106.12 with SMTP id gq12mr15366219lab.17.1340042896885; Mon, 18 Jun 2012 11:08:16 -0700 (PDT) Received: from [192.168.1.100] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id j1sm11940767lby.8.2012.06.18.11.08.15 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jun 2012 11:08:15 -0700 (PDT) Message-ID: <4FDF6E8E.4080900@enterprisedb.com> Date: Mon, 18 Jun 2012 21:08:14 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4 MIME-Version: 1.0 To: Robert Haas CC: Andres Freund , pgsql-hackers@postgresql.org Subject: Re: WAL format changes References: <4FDA5136.6080206@enterprisedb.com> <201206142358.12431.andres@2ndquadrant.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQn4Zq4bYw96P8bWQVNEOz4/zJjRcOBbmJGMOu3dc5h06MZVKL+Gw5847x+VKMHFiwUVx6ak X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201206/909 X-Sequence-Number: 209749 On 18.06.2012 21:00, Robert Haas wrote: > On Thu, Jun 14, 2012 at 5:58 PM, Andres Freund wrote: >>> 1. Use a 64-bit segment number, instead of the log/seg combination. And >>> don't waste the last segment on each logical 4 GB log file. The concept >>> of a "logical log file" is now completely gone. XLogRecPtr is unchanged, >>> but it should now be understood as a plain 64-bit value, just split into >>> two 32-bit integers for historical reasons. On disk, this means that >>> there will be log files ending in FF, those were skipped before. >> Whats the reason for keeping that awkward split now? There aren't that many >> users of xlogid/xcrecoff and many of those would be better served by using >> helper macros. > > I wondered that, too. There may be a good reason for keeping it split > up that way, but we at least oughta think about it a bit. The page header contains an XLogRecPtr (LSN), so if we change it we'll have to deal with pg_upgrade. I guess we could still keep XLogRecPtr around as the on-disk representation, and convert between the 64-bit integer and XLogRecPtr in PageGetLSN/PageSetLSN. I can try that out - many xlog calculations would admittedly be simpler if it was an uint64. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com