Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-10-02 Thread chenhj
On 2017-10-02 23:24:30,"Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: On Sun, Oct 1, 2017 at 8:27 PM, chenhj <chjis...@163.com> wrote: Now, this patch looks good for me. It applies cleanly, builds cleanly, passes regression tests, new functionality is cover

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-10-01 Thread chenhj
On 2017-10-01 04:09:19,"Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: On Sat, Sep 30, 2017 at 8:18 PM, chenhj <chjis...@163.com> wrote: On 2017-09-30 02:17:54,"Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: Great. Now code of this patch

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-30 Thread chenhj
On 2017-09-30 02:17:54,"Alexander Korotkov" wrote: Great. Now code of this patch looks good for me. However, we forgot about documentation. The result is equivalent to replacing the target data directory with the source one. Only changed blocks from

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-29 Thread chenhj
On 2017-09-30 00:53:31,"chenhj" <chjis...@163.com> wrote: On 2017-09-29 19:29:40,"Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: On Fri, Sep 29, 2017 at 10:07 AM, chenhj <chjis...@163.com> wrote: OK. That makes sense. Thank you for the

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-29 Thread chenhj
On 2017-09-29 19:29:40,"Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: On Fri, Sep 29, 2017 at 10:07 AM, chenhj <chjis...@163.com> wrote: OK. That makes sense. Thank you for the explanation. I still have some minor comments. /* +* Save the WAL filen

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-29 Thread chenhj
On 2017-09-29 05:31:51, "Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: On Thu, Sep 28, 2017 at 10:52 PM, chenhj <chjis...@163.com> wrote: On 2017-09-29 00:43:18,"Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: On Thu, Sep 28, 2017 at 6:

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-28 Thread chenhj
On 2017-09-29 00:43:18,"Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: On Thu, Sep 28, 2017 at 6:44 PM, chenhj <chjis...@163.com> wrote: On 2017-09-28 01:29:29,"Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: It appears that your patch co

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-28 Thread chenhj
On 2017-09-28 01:29:29,"Alexander Korotkov" wrote: It appears that your patch conflicts with fc49e24f. Please, rebase it. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company Yes, i had rebased it, Please

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-25 Thread chenhj
On 2017-09-23 01:59:0, "Alexander Korotkov" <a.korot...@postgrespro.ru> wrote: On Fri, Sep 22, 2017 at 7:16 PM, chenhj <chjis...@163.com> wrote: This is the new pacth with TAP test and use Macro XLOGDIR. Good. I took a quick look over the patch. Why do you need master_

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-22 Thread chenhj
Hi This is the new pacth with TAP test and use Macro XLOGDIR. And i had add this patch to the commitfest, https://commitfest.postgresql.org/15/1302/ -- Best Regards, Chen Huajun pg_rewind_wal_copy_reduce_v2.patch Description: Binary data -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-18 Thread chenhj
At 2017-09-17 08:33:33, "Michael Paquier" <michael.paqu...@gmail.com> wrote: >On Sun, Sep 17, 2017 at 3:19 AM, Alexander Korotkov ><a.korot...@postgrespro.ru> wrote: >> Hi! >> >> On Sat, Sep 16, 2017 at 5:56 PM, chenhj <chjis...@163.com> wro

[HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-16 Thread chenhj
Hi all, Currently, pg_rewind copies all WAL files from the source server, whether or not they are needed. In some circumstances, will bring a lot of unnecessary network and disk IO consumption, and also increase the execution time of pg_rewind. Such as when wal_keep_segments or max_wal_size is

Re: [HACKERS] PATCH:do not set Win32 server-side socket buffer size on windows 2012

2015-07-04 Thread chenhj
2015-07-03 16:49:44,David Rowley david.row...@2ndquadrant.com wrote: I'm wondering what the original test setup was. I'm assuming psql and postgres both running on separate windows machines? I've tested the patch just connecting to a database running on localhost and I'm not getting much of a

Re: [HACKERS] PATCH:do not set Win32 server-side socket buffer size on windows 2012

2015-04-10 Thread chenhj
At 2015-04-10 20:00:35, Michael Paquier michael.paqu...@gmail.com wrote: Interesting. I think that for the time being you should add it to the next commit fest to target an integration in 9.6 as these days we are busy wrapping up the last commit fest of 9.5: https://commitfest.postgresql.org/5/

Re: [HACKERS] OOM-killer issue when updating a inheritance table which has large number of child tables

2015-03-16 Thread chenhj
table and data createdb db1000 psql -q -v total=1000 -v pnum=1000 -f createsql.sql |psql db1000 psql -c insert into maintb values(1,'abcde12345') db1000 2)update the parent table with one connection, 955MB memory has been used. [chenhj@node2 part]$ pgbench -c 1 -n -T 10 -r -f update.sql db1000

[HACKERS] OOM-killer issue when updating a inheritance table which has large number of child tables

2015-03-12 Thread chenhj
Hi In my test(PG9.3.4), i found when update a parent table which has a large number of child tables, the execute plan will consume lots of memory. And possibly cause OOM. For example: create table maintb(id int,name char(10)); create table childtb_1 (CHECK ( id BETWEEN 1 AND 200))