Re: pgbench - add pseudo-random permutation function

2018-09-09 Thread Hironobu SUZUKI
Hi Fabian, I reviewed `pgbench-prp-func-1.patch` and found an incomplete implementation. In the pseudorandom_perm function, I confirmed that the scramble and scatter operations are mathematically bijections. Therefore, this function is mathematically correct. However, the implementation

Re: pgbench - add pseudo-random permutation function

2018-10-14 Thread Hironobu SUZUKI
Hi, I reviewed pgbench-prp-func-6.patch. (1) modular_multiply() In modular_multiply(), the numbers of digits of inputs are checked in order to determine using the interleaved modular multiplication algorithm or not. However, the check condition absolutely depends on the implementation of

Re: pgbench - add pseudo-random permutation function

2018-10-23 Thread Hironobu SUZUKI
Hello, > Also, the alternate implementation should not change the result, so > something looks amiss in your version. Moreover, I'm unclear how to > implement an overflow multiply with the safe no overflow version. (snip) I made an honest mistake. I had assumed the modulo number of Knuth's LCG

Re: pgbench - add pseudo-random permutation function

2018-10-24 Thread Hironobu SUZUKI
Hi Fabian-san, I reviewed 'pgbench-prp-func/pgbench-prp-func-10.patch'. On 2018/10/24 12:55, Fabien COELHO wrote: Hello Hironobu-san, In pseudorandom_perm(), `modular_multiply() + (key >> LCG_SHIFT)` may overflow if the result of modular_multiply() is large. Therefore, I've improved it.

Re: Support custom socket directory in pg_upgrade

2018-10-25 Thread Hironobu SUZUKI
Hi, I reviewed `pg_upgrade_sockdir-v2.patch`. I checked `-s` option on OSX. I confirmed that all tools, which are internally invoked such as pg_dumpall and pg_restore, used the specified socket and pg_upgrade worked as expected. I think this patch is fine. Best regards, On 2018/10/09

Re: 64-bit hash function for hstore and citext data type

2018-11-20 Thread Hironobu SUZUKI
On 2018/09/26 11:20, amul sul wrote: Hi all, Commit[1] has added 64-bit hash functions for core data types and in the same discussion thread[2] Robert Haas suggested to have the similar extended hash function for hstore and citext data type. Attaching patch proposes the same. Regards, Amul 1]

Re: row filtering for logical replication

2018-11-20 Thread Hironobu SUZUKI
On 2018/11/01 0:29, Euler Taveira wrote: Em qua, 28 de fev de 2018 às 20:03, Euler Taveira escreveu: The attached patches add support for filtering rows in the publisher. I rebased the patch. I added row filtering for initial synchronization, pg_dump support and psql support. 0001 removes

Re: pgbench - add pseudo-random permutation function

2018-09-18 Thread Hironobu SUZUKI
Hi Fabian-san, I reviewed 'pgbench-prp-func/pgbench-prp-func-4.patch'. I could apply it and did the TAP test successfully. I could not find typo in the documentations and comments. To make sure, I checked the new routine which contains the __builtin_popcountll() function on Linux + gcc

Re: pgbench - add pseudo-random permutation function

2019-03-29 Thread Hironobu SUZUKI
On 2019/03/21 17:27, David Steele wrote: Hi Hironobu, Sorry for the late reply. I reviewed this patch. Function nbits(), which was previously discussed, has been simplified by using the function pg_popcount64(). By adding the mathematical explanation, it has been easier to understand the

Re: pgbench - add pseudo-random permutation function

2019-02-10 Thread Hironobu SUZUKI
I updated the patch. And also I added some explanations and simple examples in the modular_multiply function. Fabian-san, To make easily understanding, I think it is a good idea to add a brief explanation of outline the pseudorandom_perm function and bijective functions/transformations. What

Editing errors in the comments of tableam.h and heapam.c

2020-07-13 Thread Hironobu SUZUKI
Hi, Some comments in tableam.h and heapam.c contain three old function names although these have been renamed by this commit 73b8c3bd2889fed986044e15aefd0911f96ccdd3. Old: table_insert, table_fetch_row_version, table_get_latest_tid. New: table_tuple_insert, table_tuple_fetch_row_version,