Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTUAR-0000Xr-Mq for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Dec 2017 14:55:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTUAP-0005Nb-LP for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Dec 2017 14:55:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eTUAP-0005NR-C7 for pgsql-hackers@lists.postgresql.org; Mon, 25 Dec 2017 14:55:49 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eTUAI-0004Jt-0g for pgsql-hackers@postgresql.org; Mon, 25 Dec 2017 14:55:48 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 3C96121C1C2B; Mon, 25 Dec 2017 17:55:40 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from zilders-MacBook-Pro.local (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 0ED1521C03E8; Mon, 25 Dec 2017 17:55:40 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1514213740; bh=s6cTjWVu7aib3iYiC6+4IFdzpMd3j2GCXFdrNEKycAc=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=okxmXodqBE+Yz67ibWHqIswqRCeDGHFyeVrCIF6oBH/HbeKkTRFK1M/kt/h7/zpnu dh1BZpDHVF8b5EVnyOEXb3QKi7GPVyrQ8wa3B4XB4TGMWp0zNQObCuZOXbEfkgqsow A7lqiYWJRbF5rCQgyMs/d+9NCfPjrz7tJNEKVhBk= Subject: Re: General purpose hashing func in pgbench To: Fabien COELHO Cc: pgsql-hackers References: <0e8bd39e-dfcd-2879-f88f-272799ad7ef2@postgrespro.ru> <699225ee-c30c-b22e-4028-415e9eab26b2@postgrespro.ru> <80e9c570-5c49-1a01-f309-3d8d0cbbae42@postgrespro.ru> <38f1503e-7b63-4612-24a9-041af25bb022@postgrespro.ru> From: Ildar Musin Message-ID: Date: Mon, 25 Dec 2017 17:55:39 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: ru List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 25/12/2017 17:12, Fabien COELHO пишет: > > However, the key can be used if controlled so that different values do > not have the same randomization in different part of the script, so as > to avoid using the same patterns for different things if not desirable. Original murmur algorithm accepts seed as a parameter, which can be used for this purpose. I used value itself as a seed in the patch, but I can turn it into a function argument. > > For the pgbench pseudo-random permutation I'm looking at, the key can > be specified to control whether the same pattern or not should be used. > Just curious, which algorithm are you intended to choose? -- Ildar Musin Postgres Professional: http://www.postgrespro.com Russian Postgres Company