Re: [HACKERS] [COMMITTERS] pgsql: Collect and use multi-column dependency stats

2017-04-06 Thread Kyotaro HORIGUCHI
At Thu, 6 Apr 2017 18:59:35 +1200, David Rowley wrote in > On 6 April 2017 at 18:03, Kyotaro HORIGUCHI > wrote: > > At Thu, 6 Apr 2017 13:10:48 +1200, David Rowley > > wrote in > > > >> On 6 April 2017 at 13:05, David Rowley > >> wrote: > I&

[HACKERS] Duplicate usage of tablespace location?

2017-04-06 Thread Kyotaro HORIGUCHI
ed instead. https://www.postgresql.org/docs/9.6/static/manage-ag-tablespaces.html | The location must be an existing, empty directory that is owned | by the PostgreSQL operating system user. regards, - Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/backend/commands/tablespace.c b/s

Re: [HACKERS] Interval for launching the table sync worker

2017-04-05 Thread Kyotaro HORIGUCHI
ing) error in walsender. regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [COMMITTERS] pgsql: Collect and use multi-column dependency stats

2017-04-05 Thread Kyotaro HORIGUCHI
endency covering the columns at the very tail. Maybe only two are not practical for testing. Even if it doesn't impact performance detectably, if only one attribute is needed, an AttrNumber member in context will be sufficient. No bitmap operation seems required in dependency_compatible_walk

Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-04-05 Thread Kyotaro HORIGUCHI
ed as of 9.0 so that pg_upgrade (or pg_migrator at the time) can perform in-place migration. It is not intended to share a directory among multiple instances with different versions. That being said, an additional trick in the attached file will work for you. regards, -- Kyotaro Horigu

Re: [HACKERS] Logical Replication and Character encoding

2017-04-05 Thread Kyotaro HORIGUCHI
t in encoding > "LATIN1" > CONTEXT: COPY t, line 1: "" > LOG: worker process: logical replication worker for subscription 16391 sync > 16384 (PID 26915) exited with exit code 1 After this, walreceiver repeats reconnecting to master with no wait. Maybe walreceiver

Re: [HACKERS] multivariate statistics (v25)

2017-04-04 Thread Kyotaro HORIGUCHI
added into estimatedclauses, calling clause_selectivity once is enough. Since clause_selectivity may return 1.0 for some clauses, using s2 for the decision seems reasonable. | if (dependency_implies_attribute(dependency, | list_attnums[listidx])) | { | clause = (

Re: [HACKERS] FDW and parallel execution

2017-04-04 Thread Kyotaro HORIGUCHI
ond - > not. > My FDW provides implementation for IsForeignScanParallelSafe which > returns true. > I wonder what can prevent optimizer from using parallel plan in this > case? Parallel execution requires partial paths. It's the work for GetForeignPaths of your FDW. regard

Re: [HACKERS] asynchronous execution

2017-04-04 Thread Kyotaro HORIGUCHI
t apply) The attached patch is rebased on the current master, but no substantial changes other than disallowing partitioned tables on async by assertion. regards, -- Kyotaro Horiguchi NTT Open Source Software Center >From e4c38a11171e8c6c6a1950f122b97b5048c7c5f8 Mon Sep 17 00:00:00 2001 From: Kyot

Re: [HACKERS] Some never executed code regarding the table sync worker

2017-04-04 Thread Kyotaro HORIGUCHI
); > else > process_syncing_tables_for_apply(current_lsn); > } > > These code will be used for future enhancement? I think that since > leaving unused code is not good we can get rid of these unnecessary > codes. Attached patch removes unnecessary codes rel

Re: [HACKERS] show "aggressive" or not in autovacuum logs

2017-04-03 Thread Kyotaro HORIGUCHI
Hello, At Fri, 31 Mar 2017 18:20:23 +0900, Masahiko Sawada wrote in > On Wed, Mar 29, 2017 at 12:46 PM, Kyotaro HORIGUCHI > wrote: > > Hello, it would be too late but I'd like to propose this because > > this cannot be back-patched. > > > > > > In a

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-31 Thread Kyotaro HORIGUCHI
At Fri, 31 Mar 2017 16:17:05 +0900, Amit Langote wrote in <2dec1acb-6e2f-5aa5-0e26-fcc172ce9...@lab.ntt.co.jp> > Horiguchi-san, > > On 2017/03/31 15:50, Kyotaro HORIGUCHI wrote: > > At Thu, 30 Mar 2017 20:58:35 +0900, Amit Langote wrote: > >> Updated patc

Re: [HACKERS] multivariate statistics (v25)

2017-03-31 Thread Kyotaro HORIGUCHI
't think seeming-expressions with side effect is not good idea here. == + switch (get_oprrest(expr->opno)) + { + case F_EQSEL: + + /* equality conditions are compatible with all statistics */ +

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-30 Thread Kyotaro HORIGUCHI
At Thu, 30 Mar 2017 20:58:35 +0900, Amit Langote wrote in > Thanks for the review. > > On Thu, Mar 30, 2017 at 7:37 PM, Kyotaro HORIGUCHI wrote: > > At Thu, 30 Mar 2017 18:24:16 +0900, Amit Langote wrote: > >> On 2017/03/29 23:58, Robert Haas wrote: > >> > O

Re: [HACKERS] [patch] reorder tablespaces in basebackup tar stream for backup_label

2017-03-30 Thread Kyotaro HORIGUCHI
rly. The instances of the usage of these protocols are found in the source code of walreceiver and pg_basebackup." That being said, pg_basebackup is straightforward but unfortunately, walrecever.c seems a bit hard to read for those who unaccustomed to PostgresSQL source code. regards, -- Kyo

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-30 Thread Kyotaro HORIGUCHI
Thank you having a look on this. # I removed -bugs in CC:. At Fri, 31 Mar 2017 13:40:00 +1100, Venkata B Nagothi wrote in > On Fri, Mar 17, 2017 at 6:48 PM, Kyotaro HORIGUCHI < > horiguchi.kyot...@lab.ntt.co.jp> wrote: > > > Hello, > > > > At Mon, 13 M

Re: [HACKERS] Something broken around FDW connection close

2017-03-30 Thread Kyotaro HORIGUCHI
If the analysis is right, ISTM > that it's the user's fault. Agreed, this behavior is mentioned here. https://www.postgresql.org/docs/9.6/static/postgres-fdw.html#AEN182920 | table_name | | This option, which can be specified for a foreign table, gives | the table name to use for t

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-30 Thread Kyotaro HORIGUCHI
; > ALTER TABLE > > Again, no pg_class.reloptions update occurs in this case. The reason this > happens is because transformRelOptions() never includes the options to be > reset in the array of options received by parseRelOptions(), so no > validation occurs. > > But since both are existing behaviors, perhaps we can worry about it some > other time. -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Kyotaro HORIGUCHI
am.keepcr in you configuration? regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Kyotaro HORIGUCHI
At Thu, 30 Mar 2017 11:12:56 +1100, Venkata B Nagothi wrote in > On Thu, Mar 30, 2017 at 10:55 AM, Michael Paquier > wrote: > > > On Thu, Mar 30, 2017 at 8:49 AM, Venkata B Nagothi > > wrote: > > > On Tue, Mar 28, 2017 at 5:51 PM, Kyotaro HORIGUCHI > > &

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-29 Thread Kyotaro HORIGUCHI
ollowing *wrongly* succeeds: Ouch! I briefly checked that by "hoge.oids" without confirming around. > create table p (a int) partition by list (a) with > (toast.autovacuum_enabled = true); > CREATE TABLE > > > + if (def->defnamespace != NULL || > > + pg_strcasecmp(def-&g

Re: [HACKERS] [patch] reorder tablespaces in basebackup tar stream for backup_label

2017-03-29 Thread Kyotaro HORIGUCHI
OCATION: 0/E60 BACKUP METHOD: streamed BACKUP FROM: master START TIME: 2017-03-29 17:32:16 JST LABEL: base backup > The reason one might not want to run pg_basebackup directly is that this > way one can pipe the output to an external program, e.g. to better > compress it; this i

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-29 Thread Kyotaro HORIGUCHI
mp(def->defname, "oids") != 0) +ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("unrecognized parameter \"%s\" for a partitioned table", This works since defnamespace is always NULL here, but if I understand correctly what we should do here is "reject any option other than "(default).OID"". So I think that the condition should be like the following. + if (def->defnamespace != NULL || + pg_strcasecmp(def->defname, "oids") != 0) regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Multiple false-positive warnings from Valgrind

2017-03-28 Thread Kyotaro HORIGUCHI
says that, https://www.openssl.org/docs/man1.0.1/crypto/RAND_bytes.html > The contents of buf is mixed into the entropy pool before > retrieving the new pseudo-random bytes unless disabled at compile > time (see FAQ). This isn't saying that RAND_bytes does the same thing but something

[HACKERS] show "aggressive" or not in autovacuum logs

2017-03-28 Thread Kyotaro HORIGUCHI
pgbench_branches": mode: > normal, index scans: 0 > LOG: automatic vacuum of table "postgres.public.pgbench_branches": mode: > aggressive, index scans: 0 regards, -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/backend/commands/vacuumlazy.c b/src/ba

Re: [HACKERS] Missing increment of vacrelstats->pinskipped_pages

2017-03-28 Thread Kyotaro HORIGUCHI
own as "# dead row versios cannot be removed yet". regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] free space map and visibility map

2017-03-28 Thread Kyotaro HORIGUCHI
page image. So, the reason seems to be that it just doesn't seem necessary. Including another branch of this thread, the following options are proposed. - Let FREEZE_PAGE and VISIBLE update FSM. This causes extra fetch of a heap page, summing up of free space and FSM update for every f

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-27 Thread Kyotaro HORIGUCHI
This conflicts with 6912acc (replication lag tracker) so just rebased on a6f22e8. At Fri, 17 Mar 2017 16:48:27 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170317.164827.46663014.horiguchi.kyot...@lab.ntt.co.jp> > Hello, > > At Mon, 13 Mar 2017 11:06:00 +1100, Ve

Re: [HACKERS] free space map and visibility map

2017-03-27 Thread Kyotaro HORIGUCHI
I'd like to have a comment from Heikki or Tom. At Mon, 27 Mar 2017 16:49:08 +0900, Masahiko Sawada wrote in > On Mon, Mar 27, 2017 at 2:38 PM, Kyotaro HORIGUCHI > wrote: > > Other than by FPI, FSM update is omitted when record LSN is older > > than page LSN. If heap

Re: [HACKERS] Radix tree for character conversion

2017-03-27 Thread Kyotaro HORIGUCHI
Hmm, things are bit different. At Thu, 23 Mar 2017 12:13:07 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170323.121307.241436413.horiguchi.kyot...@lab.ntt.co.jp> > > Ok, I'll write a small script to generate a set of "conversion > > dump" and

Re: [HACKERS] free space map and visibility map

2017-03-26 Thread Kyotaro HORIGUCHI
At Sat, 25 Mar 2017 19:53:47 -0700, Jeff Janes wrote in > On Thu, Mar 23, 2017 at 7:01 PM, Kyotaro HORIGUCHI < > horiguchi.kyot...@lab.ntt.co.jp> wrote: > > > At Wed, 22 Mar 2017 02:15:26 +0900, Masahiko Sawada > > wrote in > gmail.com> > > > On

Re: [HACKERS] free space map and visibility map

2017-03-23 Thread Kyotaro HORIGUCHI
much, HEAP2_FREEZE_PAGE would be the next way to go. (I don't understand the reason for skipping updating FSM only for FPI. This seems introduced by f8f42279) regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Radix tree for character conversion

2017-03-22 Thread Kyotaro HORIGUCHI
At Tue, 21 Mar 2017 13:10:48 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170321.131048.150321071.horiguchi.kyot...@lab.ntt.co.jp> > At Fri, 17 Mar 2017 13:03:35 +0200, Heikki Linnakangas > wrote in <01efd334-b839-0450-1b63-f2dea9326...@iki.fi> > >

Re: [HACKERS] Create replication slot in pg_basebackup if requested and not yet present

2017-03-22 Thread Kyotaro HORIGUCHI
TE SUBSCRIPTION. It implicitly creates a slot on publisher and subscriber fails to have the same subscription after re-initialization. Of couse DROP SUBSCRIPTION doesn't help the case. Users don't have a clue to solution, I suppose. But this would be another topic. regards, -- K

Re: [HACKERS] Logical Replication and Character encoding

2017-03-21 Thread Kyotaro HORIGUCHI
threads. The logical > replication launcher is needed only to start subscriptions and > subscriptions don't need wal_level to be logical, only publication needs > that. I understand, thanks. Anyway the message seems to have hidden from startup message:) -- Kyotaro Horiguchi NTT Open

Re: [HACKERS] Logical Replication and Character encoding

2017-03-21 Thread Kyotaro HORIGUCHI
non-null-terminated string is not converted. And the comment is edited to reflect the new behavior. > > By the way, I noticed that postmaster launches logical > > replication launcher even if wal_level < logical. Is it right? > > Yes, that came up couple of times in various thre

Re: [HACKERS] extended statistics: n-distinct

2017-03-21 Thread Kyotaro HORIGUCHI
scussion on the topic of cross-column statistics: > https://wiki.postgresql.org/wiki/Cross_Columns_Stats > > This problem is important enough that Kyotaro Horiguchi submitted > another patch that does the same thing: > https://www.postgresql.org/message-id/flat/20150828.173334.1

Re: [HACKERS] Radix tree for character conversion

2017-03-20 Thread Kyotaro HORIGUCHI
Hello, At Fri, 17 Mar 2017 13:03:35 +0200, Heikki Linnakangas wrote in <01efd334-b839-0450-1b63-f2dea9326...@iki.fi> > On 03/17/2017 07:19 AM, Kyotaro HORIGUCHI wrote: > > I would like to use convert() function. It can be a large > > PL/PgSQL function or a series of "

Re: [HACKERS] asynchronous execution

2017-03-20 Thread Kyotaro HORIGUCHI
Hello. This is the final report in this CF period. At Fri, 17 Mar 2017 17:35:05 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170317.173505.152063931.horiguchi.kyot...@lab.ntt.co.jp> > Async-capable plan is generated in planner. An Append contains at > least one a

Re: [HACKERS] asynchronous execution

2017-03-17 Thread Kyotaro HORIGUCHI
on.I SELECT sum(a) FROM (SELECT a FROM ft10 UNION ALL SELECT a FROM ft20 UNION ALL SELECT a FROM ft30 UNION ALL SELECT a FROM ft40) as ft; I'll measure the performance for the case next week. regards, -- Kyotaro Horiguchi NTT Open Source Software Center >From f049f01a92e91f4185f12f814dd90bb16d

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-03-17 Thread Kyotaro HORIGUCHI
nahancements other than refactoring in other shape, in the next commitfest. Thanks. -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-17 Thread Kyotaro HORIGUCHI
Hello, At Mon, 13 Mar 2017 11:06:00 +1100, Venkata B Nagothi wrote in > On Tue, Jan 17, 2017 at 9:36 PM, Kyotaro HORIGUCHI < > horiguchi.kyot...@lab.ntt.co.jp> wrote: > > I managed to reproduce this. A little tweak as the first patch > > lets the standby to suicide as

Re: [HACKERS] [PATCH]: fix bug in SP-GiST box_ops

2017-03-16 Thread Kyotaro HORIGUCHI
> I still don't know how to force SP-GiST to create inner leaves without > inserting hundreds of rows. I admit that the case is quite unstable, or environment-dependent and the minimal bad case no longer replays even for me. On the other hand, inserting some hundreds of boxes makes it mor

Re: [HACKERS] Protect syscache from bloating with negative cache entries

2017-03-16 Thread Kyotaro HORIGUCHI
At Tue, 7 Mar 2017 19:23:14 -0800, David Steele wrote in <3b7b7f90-db46-8c37-c4f7-443330c3a...@pgmasters.net> > On 3/3/17 4:54 PM, David Steele wrote: > > > On 2/1/17 1:25 AM, Kyotaro HORIGUCHI wrote: > >> Hello, thank you for moving this to the next CF. > >&

Re: [HACKERS] Radix tree for character conversion

2017-03-16 Thread Kyotaro HORIGUCHI
F-8'); -- results in error | ... | SELECT convert('\897e', 'SJIS', 'UTF-8'); > You could then run those SQL statements against old and new server > version, and verify that you get the same results. Including the result files in the repository will make this easy but

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-08 Thread Kyotaro HORIGUCHI
cases together. RequestNamedLWLockTranche'd tranches are registerd in the main tranche array. Sorry for the noise and thanks a lot for kindly answering me. regards. -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes t

Re: [HACKERS] Logical Replication and Character encoding

2017-03-06 Thread Kyotaro HORIGUCHI
At Fri, 3 Mar 2017 21:31:24 -0500, Peter Eisentraut wrote in <88397afa-a8ec-8d8a-1c94-94a4795a3...@2ndquadrant.com> > On 3/3/17 14:51, Petr Jelinek wrote: > > On 03/03/17 20:37, Peter Eisentraut wrote: > >> On 2/27/17 00:23, Kyotaro HORIGUCHI wrote: > >>> Ye

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-06 Thread Kyotaro HORIGUCHI
Thank you for the comment. At Fri, 3 Mar 2017 14:47:20 -0500, Peter Eisentraut wrote in > On 3/1/17 19:54, Kyotaro HORIGUCHI wrote: > >> Please measure it in size, not in number of segments. > > It was difficult to dicide which is reaaonable but I named it > > after w

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-06 Thread Kyotaro HORIGUCHI
By the way, At Mon, 06 Mar 2017 17:07:55 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170306.170755.68410634.horiguchi.kyot...@lab.ntt.co.jp> > Ok, I think I understand the complete picture. > > At Mon, 06 Mar 2017 15:58:56 +0900 (Tokyo Standard Time), Ky

Re: [HACKERS] Radix tree for character conversion

2017-03-06 Thread Kyotaro HORIGUCHI
Hello, At Fri, 3 Mar 2017 12:53:04 +0900, Michael Paquier wrote in > On Thu, Mar 2, 2017 at 2:20 PM, Kyotaro HORIGUCHI > wrote: > > 5) Just remove plain map files and all related code. Addition to > >that, Makefile stores hash digest of authority files

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-06 Thread Kyotaro HORIGUCHI
Ok, I think I understand the complete picture. At Mon, 06 Mar 2017 15:58:56 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170306.155856.198084190.horiguchi.kyot...@lab.ntt.co.jp> > > I can guess two ways to fix this. One is change the definition of > > T_NAME.

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-05 Thread Kyotaro HORIGUCHI
At Mon, 06 Mar 2017 15:44:52 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170306.154452.254472341.horiguchi.kyot...@lab.ntt.co.jp> > Hello, > > At Sat, 4 Mar 2017 10:07:50 +0530, Amit Kapila > wrote in > > On Fri, Mar 3, 2017 at 3:49 PM, Kyot

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-05 Thread Kyotaro HORIGUCHI
Hello, At Sat, 4 Mar 2017 10:07:50 +0530, Amit Kapila wrote in > On Fri, Mar 3, 2017 at 3:49 PM, Kyotaro HORIGUCHI > wrote: > >> You can read about usage of LWLocks in extensions from below location: > >> https://www.postgresql.org/docs/devel/static/xfunc-c.html#idp86

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-03 Thread Kyotaro HORIGUCHI
check in LWLockInitialize would be useless if it is not used by extensions) I'll continue considering this next week regards, --- Kyotaro Horiguchi

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-03 Thread Kyotaro HORIGUCHI
I should be very tired. This is the last mail today. At Fri, 03 Mar 2017 17:26:27 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170303.172627.225604431.horiguchi.kyot...@lab.ntt.co.jp> > > > Hello, some of my collegues found that orafce crashes with > > &

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-03 Thread Kyotaro HORIGUCHI
Sorry for frequent mails.. At Fri, 03 Mar 2017 17:21:21 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170303.172121.140674354.horiguchi.kyot...@lab.ntt.co.jp> > At Fri, 03 Mar 2017 17:13:42 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI > wrote in > <2017030

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-03 Thread Kyotaro HORIGUCHI
At Fri, 03 Mar 2017 17:13:42 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170303.171342.134582021.horiguchi.kyot...@lab.ntt.co.jp> > Hello, some of my collegues found that orafce crashes with > postgresql compliled with dtrace. > > === The cause > > T

[HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-03 Thread Kyotaro HORIGUCHI
ackpatched at least to the version. I haven't tested PG9.5 and 9.4 but it seems to need different amendment. 9.3 doesn't has tranche. regards, -- Kyotaro Horiguchi NTT Open Source Software Center >From e2c4619df6c51dd5b71630de7467b332f7449fc5 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguch

Re: [HACKERS] SCRAM authentication, take three

2017-03-02 Thread Kyotaro HORIGUCHI
he case of "lastClass < chClass". Something like this. (This still calls recompose_code for the case that ch is the same position with starterChar so there still be room for more improvement.) > if (lastClass < chClass && > recompose_code(starterCh, ch, &composite)) > recomp_chars[starterPos] = composite; > starterCh = composite; > } > else if (chClass == 0) If I read the TR correctly, "6 Composition Exclusion Table" says that there some characters not to be composed. But I don't find the corresponding code. (or comments) regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] multivariate statistics (v24)

2017-03-01 Thread Kyotaro HORIGUCHI
es might be needed (to prevent future trouble). Or any defined behavior on overflow of them might be enough. I belive all (or most) of overflow-able data has such behavior. > The renames/changes were quite widespread, but I've done my best to > fix all the comments and various other places. > > regards regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Radix tree for character conversion

2017-03-01 Thread Kyotaro HORIGUCHI
At Wed, 1 Mar 2017 14:34:23 +0900, Michael Paquier wrote in > On Tue, Feb 28, 2017 at 5:34 PM, Kyotaro HORIGUCHI > wrote: > > At Tue, 28 Feb 2017 15:20:06 +0900, Michael Paquier > > wrote in > > > >> +conv.o: conv.c char_converter.c > >&g

Re: [HACKERS] \h tab-completion

2017-03-01 Thread Kyotaro HORIGUCHI
umentation. | - Documentation for "CREATE TABLE" | Define a table | | You might want to see the following commands. | CREATE TABLE AS - Define a new table from the result of a query | CREATE TABLESPACE - Define a new tablespace. | | Syntax: | CREATE [ [ GLOBAL | LOCAL ] { TEMPOR

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-03-01 Thread Kyotaro HORIGUCHI
Hello, At Tue, 28 Feb 2017 10:39:01 -0500, Stephen Frost wrote in <20170228153901.gh9...@tamriel.snowman.net> > * David Fetter (da...@fetter.org) wrote: > > On Mon, Feb 27, 2017 at 11:53:17PM -0500, Stephen Frost wrote: > > > * Kyotaro HORIGUCHI (horiguchi.kyot

Re: [HACKERS] Wrong variable type in KeepLogSeg

2017-03-01 Thread Kyotaro HORIGUCHI
At Tue, 28 Feb 2017 12:21:01 +0100, Magnus Hagander wrote in magnus> > Hello, I found a variable definition with wrong type magnus> > specification in KeepLogSeg, which doesn't harm anything. magnus> magnus> Nice catch. Applied and backpatched. Thank you for committing.

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Kyotaro HORIGUCHI
At Wed, 1 Mar 2017 12:18:07 -0500, Peter Eisentraut wrote in <98538b00-42ae-6a6b-f852-50b3c937a...@2ndquadrant.com> > On 2/27/17 22:27, Kyotaro HORIGUCHI wrote: > > This patch adds a GUC to put a limit to the number of segments > > that replication slots can keep. > >

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Kyotaro HORIGUCHI
t. Like a "full" column in > pg_stat_replication_slot, and refusing connections to the slot until it > is cleared. Anyway, if preserving WAL to replicate has priority to the master's health, this doesn't nothing by leaving 'max_wal_keep_segments' to 0. regards, --

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-03-01 Thread Kyotaro HORIGUCHI
pLogSeg. - (These steps runs only when at least one slot exists) The another reason was, as Robert retold, I thought that this is a matter of system (or a DB cluster) wide health and works in a bit different way from what the name "max_wal_size_hard" suggests. regards, -- Kyotaro Horiguc

Re: [HACKERS] Radix tree for character conversion

2017-02-28 Thread Kyotaro HORIGUCHI
At Tue, 28 Feb 2017 15:20:06 +0900, Michael Paquier wrote in > On Mon, Feb 27, 2017 at 5:37 PM, Kyotaro HORIGUCHI > wrote: > > At Wed, 22 Feb 2017 16:06:14 +0900, Michael Paquier > > wrote in > > > >> In order to conduct sanity checks on the shape of the

Re: [HACKERS] Radix tree for character conversion

2017-02-27 Thread Kyotaro HORIGUCHI
Hello, At Tue, 28 Feb 2017 08:00:22 +0530, Robert Haas wrote in > On Mon, Feb 27, 2017 at 2:07 PM, Kyotaro HORIGUCHI > wrote: > >> +# make_charmap - convert charset table to charmap hash > >> +# with checking duplicate source code > >> Maybe this shoul

Re: [HACKERS] Wrong variable type in KeepLogSeg

2017-02-27 Thread Kyotaro HORIGUCHI
At Tue, 28 Feb 2017 12:17:07 +0900, Michael Paquier wrote in > On Tue, Feb 28, 2017 at 11:17 AM, Kyotaro HORIGUCHI > wrote: > > slotSegNo should be a XLogSegNo. Both types share the same > > intrinsic type so it doesn't harm anything. > > Nice catch! Thanks! -

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-02-27 Thread Kyotaro HORIGUCHI
first, max_wal_size_hard, that limits the wal size including extra (other than them for the two checkpoig cycles) segments. regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Restricting maximum keep segments by repslots

2017-02-27 Thread Kyotaro HORIGUCHI
. As we have already postponed some patches by the triage for the last commit fest, this might should be postponed to PG11. regards, -- Kyotaro Horiguchi NTT Open Source Software Center >From 367205d51ef471defd0f9df76840dee1c4cd4036 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date

[HACKERS] Wrong variable type in KeepLogSeg

2017-02-27 Thread Kyotaro HORIGUCHI
ation_slots > 0 && keep != InvalidXLogRecPtr) > { > XLogRecPtrslotSegNo; > > XLByteToSeg(keep, slotSegNo); slotSegNo should be a XLogSegNo. Both types share the same intrinsic type so it doesn't harm anything. This is back-patchable upto 9.4. regar

Re: [HACKERS] Radix tree for character conversion

2017-02-27 Thread Kyotaro HORIGUCHI
exit(1); > + } > Most likely a newline at the end of the error string is better here. map_checker.c is removed. > + $charmap{ ucs2utf($src) } = $dst; > + } > + > + } > Unnecessary newline here. removed in convutils.pm. Since Makefile ignores old .map fi

Re: [HACKERS] Logical Replication and Character encoding

2017-02-26 Thread Kyotaro HORIGUCHI
Sorry for the abesnse. At Fri, 24 Feb 2017 02:43:14 +, "Shinoda, Noriyoshi" wrote in > >From: Peter Eisentraut [mailto:peter.eisentr...@2ndquadrant.com] > >Sent: Friday, February 24, 2017 1:32 AM > >To: Petr Jelinek ; Kyotaro HORIGUCHI > > >

Re: [HACKERS] A typo in mcxt.c

2017-02-26 Thread Kyotaro HORIGUCHI
ur comments; cuts down on the boredom of reading totally > dry code. > > (But see commit d2783bee3 for one hazard of this sort of thing.) > > regards, tom lane -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-02-26 Thread Kyotaro HORIGUCHI
ames, say CREATE TABLE employee_x1, CREATE TABLE employee_x2. Just trying to complete existing *schema* is one more another possible objective. regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] A typo in mcxt.c

2017-02-23 Thread Kyotaro HORIGUCHI
27;tis" seems to me to be a typo of "it's". regards -- Kyotaro Horiguchi NTT Open Source Software Center >From 2eadf76829863e5ebbe7dbfa9b4fae2d48b5110f Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Wed, 22 Feb 2017 09:14:15 +0900 Subject: Fix a typo of mcxt.c -

Re: [HACKERS] asynchronous execution

2017-02-23 Thread Kyotaro HORIGUCHI
Hello, I totally reorganized the patch set to four pathces on the current master (9e43e87). At Wed, 22 Feb 2017 17:39:45 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170222.173945.262776579.horiguchi.kyot...@lab.ntt.co.jp> > Finally, I couldn't see the crash for th

Re: [HACKERS] asynchronous execution

2017-02-16 Thread Kyotaro HORIGUCHI
Thank you very much for testing this! At Tue, 7 Feb 2017 13:28:42 +0900, Amit Langote wrote in <9058d70b-a6b0-8b3c-091a-fe77ed0df...@lab.ntt.co.jp> > Horiguchi-san, > > On 2017/01/31 12:45, Kyotaro HORIGUCHI wrote: > > I noticed that this patch is conflicting

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-02-14 Thread Kyotaro HORIGUCHI
and others are described below. 0020-New-COMP_KEYWORD_CASE-mode-follow-first.patch - Add new COMP_KEYWORD_CASE mode "follow-first". The completion works with the case of the first word. (This doesn't rely on this patchset but works in more cases with 0002) 0021-Suggest-only-t

Re: [HACKERS] Logical Replication and Character encoding

2017-02-13 Thread Kyotaro HORIGUCHI
f involving physical replication but I think this is a matter of logical replication. regards, -- Kyotaro Horiguchi NTT Open Source Software Center >From e8233c47d174261a331718e9434d5fc825523305 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Tue, 14 Feb 2017 11:18:20 +0900 Subject:

Re: [HACKERS] Logical Replication and Character encoding

2017-02-03 Thread Kyotaro HORIGUCHI
Hello, At Fri, 3 Feb 2017 13:47:54 +0800, Craig Ringer wrote in > On 3 Feb. 2017 15:47, "Kyotaro HORIGUCHI" > wrote: > > Hello, > > At Fri, 3 Feb 2017 09:16:47 +0800, Craig Ringer > wrote in > > > On 2 February 2017 at 11:45, Euler Taveira wrote:

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-02-03 Thread Kyotaro HORIGUCHI
d the logs like the following will be printed. | completion performed at tab-complete.c:1146 for "do" - OR REPLACE suggestion (0019-Add-suggestion-of-OR-REPLACE.patch) At Wed, 1 Feb 2017 09:42:54 +0100, Pavel Stehule wrote in > 2017-02-01 9:37 GMT+01:00 Kyotaro HORIGUCHI the conte

Re: [HACKERS] Radix tree for character conversion

2017-02-02 Thread Kyotaro HORIGUCHI
Tnanks to that Heikki have pushed the first two patches and a part of the third, only one patch is remaining now. # Sorry for not separating KOI8 stuffs. At Tue, 31 Jan 2017 19:06:09 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170131.190609.254672218.horiguchi.k

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-02-02 Thread Kyotaro HORIGUCHI
o the primary that it flushed to the > next segment. Not sure which fix is better though. We could it as I said, with some refactoring ReadRecord involving reader plugin mechanism.. regards, -- Kyotaro Horiguchi NTT Open Source Software Center >From d835bf248e6869f7b843d339c9213a082e3322

Re: [HACKERS] Logical Replication and Character encoding

2017-02-02 Thread Kyotaro HORIGUCHI
supporting those and make them a > "later" problem. If the conversion is rejected for now, we should check the encoding identity instead. regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION

2017-02-02 Thread Kyotaro HORIGUCHI
At Fri, 3 Feb 2017 01:02:47 +0900, Fujii Masao wrote in > On Thu, Feb 2, 2017 at 2:36 PM, Michael Paquier > wrote: > > On Thu, Feb 2, 2017 at 2:13 PM, Tom Lane wrote: > >> Kyotaro HORIGUCHI writes: > >>> Then, the reason for the TRY-CATCH cluase is that

Re: [HACKERS] What is "index returned tuples in wrong order" for recheck supposed to guard against?

2017-02-02 Thread Kyotaro HORIGUCHI
I forgot to mention this.. At Thu, 02 Feb 2017 21:11:16 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170202.26.49572782.horiguchi.kyot...@lab.ntt.co.jp> > Hello, I digged this topic covered by a spiderweb.. > > # PostGIS requires so many libraries installed :

Re: [HACKERS] What is "index returned tuples in wrong order" for recheck supposed to guard against?

2017-02-02 Thread Kyotaro HORIGUCHI
blem of GIST or PostgreSQL. If set the distance() of libgeom as the base, box2df_distance might should return a very-very slightly smaller value (I don't know how much it should be.) so that it can conseal the error of its operation. regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Logical Replication and Character encoding

2017-02-01 Thread Kyotaro HORIGUCHI
wrote in > Thank you for creating patches. > I strongly hope that your patch will be merged into the new > version. Since all databases are not yet based on UTF - 8, I > think conversion of character codes is still necessary. Thanks. > -Original Message-

Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION

2017-02-01 Thread Kyotaro HORIGUCHI
op have ereport in its path. load_library apparently can throw exception. (walrcv_(libpq_) functions don't seeem to.) regards, -- Kyotaro Horiguchi NTT Open Source Software Center >From d0ca653bb2aa776742a2e7a697b02794b1ad66d9 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Thu, 2 Feb

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-02-01 Thread Kyotaro HORIGUCHI
nother problem and this is sure to happen. I'm not sure how much possibility is there for several contiguous segments are full of contpages. But I think it's worse that apply pause causes needless pg_wal flooding. regards, -- Kyotaro Horiguchi NTT Open Source Software Center --

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-02-01 Thread Kyotaro HORIGUCHI
version. > I didn't find any other issues - > > note: not necessary to implement (nice to have) - I miss a support for OR > REPLACE flag - it is related to LANGUAGE, TRANSFORMATION, FUNCTION and > RULE. regards, -- Kyotaro Horiguchi NTT Open Source Software Center --

[HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION

2017-02-01 Thread Kyotaro HORIGUCHI
DropSbuscription. It acquires LogicalRepLauncherLock but never releases. The attached patch fixes it. Most part of the fucntion is now enclosed by PG_TRY-CATCH since some functions can throw exceptions. regards, -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/backend

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-01-31 Thread Kyotaro HORIGUCHI
Hello, I'll add the rebased version to the next CF. At Fri, 20 Jan 2017 11:07:29 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170120.110729.107284864.horiguchi.kyot...@lab.ntt.co.jp> > > > > - Delaying recycling a segment until the last partial record on

Re: [HACKERS] [PATCH]: fix bug in SP-GiST box_ops

2017-01-31 Thread Kyotaro HORIGUCHI
At Tue, 31 Jan 2017 14:38:39 +0300, Nikita Glukhov wrote in <1622dc9f-cecf-cee3-b71e-b2bf34649...@postgrespro.ru> > On 31.01.2017 13:04, Kyotaro HORIGUCHI wrote: > > The following comment, > > > >> /* Can any range from range_box to be overlower than this argu

Re: [HACKERS] Logical Replication and Character encoding

2017-01-31 Thread Kyotaro HORIGUCHI
At Wed, 01 Feb 2017 12:13:04 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170201.121304.267734380.horiguchi.kyot...@lab.ntt.co.jp> > > > I tried a committed Logical Replication environment. I found > > > that replication between databases of different

Re: [HACKERS] Protect syscache from bloating with negative cache entries

2017-01-31 Thread Kyotaro HORIGUCHI
Hello, thank you for moving this to the next CF. At Wed, 1 Feb 2017 13:09:51 +0900, Michael Paquier wrote in > On Tue, Jan 24, 2017 at 4:58 PM, Kyotaro HORIGUCHI > wrote: > > Six new syscaches in 665d1fa was conflicted and 3-way merge > > worked correctly. The new syscache

Re: [HACKERS] asynchronous execution

2017-01-31 Thread Kyotaro HORIGUCHI
Thank you. At Wed, 1 Feb 2017 14:11:58 +0900, Michael Paquier wrote in > On Tue, Jan 31, 2017 at 12:45 PM, Kyotaro HORIGUCHI > wrote: > > I noticed that this patch is conflicting with 665d1fa (Logical > > replication) so I rebased this. Only executor/Makefile > > conf

<    1   2   3   4   5   6   7   8   9   10   >