Re: speed up unicode normalization quick check

2020-10-11 Thread Masahiko Sawada
On Mon, 12 Oct 2020 at 15:27, Michael Paquier wrote: > > On Mon, Oct 12, 2020 at 02:43:06PM +0900, Masahiko Sawada wrote: > > The following warning recently started to be shown in my > > environment(FreeBSD clang 8.0.1). Maybe it is relevant with this > > commit: > > > > unicode_norm.c:478:12: war

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-11 Thread Amit Kapila
On Mon, Oct 12, 2020 at 9:01 AM Amit Kapila wrote: > > On Mon, Oct 12, 2020 at 6:51 AM Greg Nancarrow wrote: > > > > > Let me know your thoughts on how to deal with these issues. > > Can you see a problem with only having parallel-mode set for scope of > > Gather/GatherMerge, or do you have some

Re: speed up unicode normalization quick check

2020-10-11 Thread Michael Paquier
On Mon, Oct 12, 2020 at 02:43:06PM +0900, Masahiko Sawada wrote: > The following warning recently started to be shown in my > environment(FreeBSD clang 8.0.1). Maybe it is relevant with this > commit: > > unicode_norm.c:478:12: warning: implicit declaration of function > 'htonl' is invalid in C99

Re: Resetting spilled txn statistics in pg_stat_replication

2020-10-11 Thread Masahiko Sawada
On Thu, 8 Oct 2020 at 22:57, Amit Kapila wrote: > > On Thu, Oct 8, 2020 at 7:46 AM Masahiko Sawada > wrote: > > > > On Wed, 7 Oct 2020 at 17:52, Amit Kapila wrote: > > > > > > > > I think after we are done with this the next > > > step would be to finish the streaming stats work [1]. We probably

Re: speed up unicode normalization quick check

2020-10-11 Thread Masahiko Sawada
On Sun, 11 Oct 2020 at 19:27, Michael Paquier wrote: > > On Thu, Oct 08, 2020 at 06:22:39PM -0400, John Naylor wrote: > > Okay, thanks. > > And applied. The following warning recently started to be shown in my environment(FreeBSD clang 8.0.1). Maybe it is relevant with this commit: unicode_norm.

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-11 Thread Greg Nancarrow
On Mon, Oct 12, 2020 at 2:11 PM Thomas Munro wrote: > > On Mon, Oct 12, 2020 at 3:42 PM Greg Nancarrow wrote: > > On Sun, Oct 11, 2020 at 1:39 PM Thomas Munro wrote: > > > pathnode->path.total_cost += subpath->total_cost; > > > - pathnode->path.rows += subpath->rows

Re: Resetting spilled txn statistics in pg_stat_replication

2020-10-11 Thread Masahiko Sawada
On Thu, 8 Oct 2020 at 17:59, Amit Kapila wrote: > > On Thu, Oct 8, 2020 at 1:55 PM Masahiko Sawada > wrote: > > > > On Thu, 8 Oct 2020 at 14:10, Amit Kapila wrote: > > > > > > > > > We can write if we want but there are few things we need to do for > > > that like maybe a new function like wait_

Re: powerpc pg_atomic_compare_exchange_u32_impl: error: comparison of integer expressions of different signedness (Re: pgsql: For all ppc compilers, implement compare_exchange and) fetch_add

2020-10-11 Thread Noah Misch
On Sun, Oct 11, 2020 at 01:12:40PM -0400, Tom Lane wrote: > Noah Misch writes: > > The first attachment fixes the matter you've reported. While confirming > > that, > > I observed that gcc builds don't even use the 64-bit code in arch-ppc.h. > > Oops. The second attachment fixes that. > > I re

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-11 Thread Amit Kapila
On Mon, Oct 12, 2020 at 6:51 AM Greg Nancarrow wrote: > > On Sat, Oct 10, 2020 at 3:32 PM Amit Kapila wrote: > > > > > OK, for the minimal patch, just allowing INSERT with parallel SELECT, > > > you're right, neither of those additional "commandType == CMD_SELECT" > > > checks are needed, so I'll

Re: BUG #15858: could not stat file - over 4GB

2020-10-11 Thread Tom Lane
Michael Paquier writes: > Why are we forcing errno=ENOENT here? Wouldn't it be correct to use > _dosmaperr(GetLastError()) to get the correct errno? Fair question. Juan, was there some good reason not to look at GetLastError() in this step? regards, tom lane

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-11 Thread Thomas Munro
On Mon, Oct 12, 2020 at 3:42 PM Greg Nancarrow wrote: > On Sun, Oct 11, 2020 at 1:39 PM Thomas Munro wrote: > > pathnode->path.total_cost += subpath->total_cost; > > - pathnode->path.rows += subpath->rows; > > + if (returningLists != NIL) > > +

Re: [PATCH] Add `truncate` option to subscription commands

2020-10-11 Thread Amit Kapila
On Mon, Oct 12, 2020 at 3:44 AM David Christensen wrote: > > > On Oct 11, 2020, at 1:14 PM, Euler Taveira > wrote: > >  > On Fri, 9 Oct 2020 at 15:54, David Christensen wrote: >> >> >> Enclosed find a patch to add a “truncate” option to subscription commands. >> >> When adding new tables to a

Re: Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)

2020-10-11 Thread David G. Johnston
On Sun, Oct 11, 2020 at 6:27 PM Ranier Vilela wrote: > Em dom., 11 de out. de 2020 às 14:53, David G. Johnston < > david.g.johns...@gmail.com> escreveu: > >> On Sun, Oct 11, 2020 at 3:31 AM Ranier Vilela >> wrote: >> >>> Em sáb., 10 de out. de 2020 às 00:11, David G. Johnston < >>> david.g.johns

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-11 Thread Greg Nancarrow
On Sun, Oct 11, 2020 at 1:39 PM Thomas Munro wrote: > > Yeah, I think this is trying to fix the problem too late. Instead, we > should fix the incorrect row estimates so we don't have to fudge it > later like that. For example, this should be estimating rows=0: > > postgres=# explain analyze ins

Re: [PATCH] Keeps tracking the uniqueness with UniqueKey

2020-10-11 Thread Andy Fan
On Thu, Oct 8, 2020 at 12:12 PM Hou, Zhijie wrote: > Hi > > I have a look over this patch and find some typos in 0002. > > 1.Some typos about unique: > There are some spelling mistakes about "unique" in code comments and > README. > Such as: "+However we define the UnqiueKey as below." > > 2.func

Re: [PATCH] Keeps tracking the uniqueness with UniqueKey

2020-10-11 Thread Andy Fan
On Thu, Oct 8, 2020 at 6:39 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On Thu, Oct 08, 2020 at 09:34:51AM +0800, Andy Fan wrote: > > > > > Other than that I wanted to ask what are the plans to proceed with this > > > patch? It's been a while since the question was raised in which format >

Re: [HACKERS] Runtime Partition Pruning

2020-10-11 Thread Andy Fan
Hi Ashutosh: On Thu, Oct 8, 2020 at 7:25 PM Ashutosh Bapat wrote: > On Wed, Oct 7, 2020 at 7:00 PM Andy Fan wrote: > > > > > > > > On Wed, Oct 7, 2020 at 5:05 PM Andy Fan > wrote: > >> > >> > >> > >> On Sun, Oct 4, 2020 at 3:10 PM Andy Fan > wrote: > > > > Now, in my exper

RE: Transactions involving multiple postgres foreign servers, take 2

2020-10-11 Thread tsunakawa.ta...@fujitsu.com
From: Masahiko Sawada > I also doubt how useful the per-foreign-server timeout setting you > mentioned before. For example, suppose the transaction involves with > three foreign servers that have different timeout setting, what if the > backend failed to commit on the first one of the server due t

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-11 Thread Greg Nancarrow
On Sun, Oct 11, 2020 at 1:05 PM Amit Kapila wrote: > > On Sat, Oct 10, 2020 at 5:25 PM Amit Kapila wrote: > > > > 8. You have made changes related to trigger execution for Gather node, > > don't we need similar changes for GatherMerge node? > > > .. > > > > 10. Don't we need a change similar to c

Re: Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)

2020-10-11 Thread Ranier Vilela
Em dom., 11 de out. de 2020 às 14:53, David G. Johnston < david.g.johns...@gmail.com> escreveu: > On Sun, Oct 11, 2020 at 3:31 AM Ranier Vilela wrote: > >> Em sáb., 10 de out. de 2020 às 00:11, David G. Johnston < >> david.g.johns...@gmail.com> escreveu: >> >>> On Fri, Oct 9, 2020 at 6:41 PM Rani

Re: Parallel INSERT (INTO ... SELECT ...)

2020-10-11 Thread Greg Nancarrow
On Sat, Oct 10, 2020 at 3:32 PM Amit Kapila wrote: > > > OK, for the minimal patch, just allowing INSERT with parallel SELECT, > > you're right, neither of those additional "commandType == CMD_SELECT" > > checks are needed, so I'll remove them. > > >various > Okay, that makes sense. > For the min

Re: powerpc pg_atomic_compare_exchange_u32_impl: error: comparison of integer expressions of different signedness (Re: pgsql: For all ppc compilers, implement compare_exchange and) fetch_add

2020-10-11 Thread Michael Paquier
On Sun, Oct 11, 2020 at 08:35:13PM +0200, Christoph Berg wrote: > Re: Tom Lane >> Hmm, I'd argue for a back-patch. The issue of modern compilers >> warning about the incorrect code will apply to all supported branches. >> Moreover, even if we don't use these code paths today, who's to say >> that

Re: Wrong statistics for size of XLOG_SWITCH during pg_waldump.

2020-10-11 Thread Michael Paquier
On Sat, Oct 10, 2020 at 09:50:02AM +0800, movead...@highgo.ca wrote: >> I think that the length of the XLOG_SWITCH record is no other than 24 >> bytes. Just adding the padding? garbage bytes to that length doesn't >> seem the right thing to me. > > Here's the lookes: > rmgr: XLOGlen (rec/t

Re: BUG #15858: could not stat file - over 4GB

2020-10-11 Thread Michael Paquier
On Sat, Oct 10, 2020 at 08:34:48PM -0400, Tom Lane wrote: > Nah, I fixed that hours ago (961e07b8c). jacana must not have run again > yet. Indeed, thanks. I have missed one sync here. + hFile = CreateFile(name, + GENERIC_READ, + (FILE_SHARE_READ | FIL

Re: [PATCH] Add `truncate` option to subscription commands

2020-10-11 Thread David Christensen
> On Oct 11, 2020, at 1:14 PM, Euler Taveira > wrote: > >  >> On Fri, 9 Oct 2020 at 15:54, David Christensen wrote: > >> >> Enclosed find a patch to add a “truncate” option to subscription commands. >> >> When adding new tables to a subscription (either via `CREATE SUBSCRIPTION` >> or `RE

Re: powerpc pg_atomic_compare_exchange_u32_impl: error: comparison of integer expressions of different signedness (Re: pgsql: For all ppc compilers, implement compare_exchange and) fetch_add

2020-10-11 Thread Christoph Berg
Re: Tom Lane > > I plan not to back-patch either of these. > > Hmm, I'd argue for a back-patch. The issue of modern compilers > warning about the incorrect code will apply to all supported branches. > Moreover, even if we don't use these code paths today, who's to say > that someone won't back-pa

Re: [PATCH] Add `truncate` option to subscription commands

2020-10-11 Thread Euler Taveira
On Fri, 9 Oct 2020 at 15:54, David Christensen wrote: > > Enclosed find a patch to add a “truncate” option to subscription commands. > > When adding new tables to a subscription (either via `CREATE SUBSCRIPTION` > or `REFRESH PUBLICATION`), tables on the target which are being newly > subscribed

Re: Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)

2020-10-11 Thread David G. Johnston
On Sun, Oct 11, 2020 at 3:31 AM Ranier Vilela wrote: > Em sáb., 10 de out. de 2020 às 00:11, David G. Johnston < > david.g.johns...@gmail.com> escreveu: > >> On Fri, Oct 9, 2020 at 6:41 PM Ranier Vilela wrote: >> >>> The problem is not only in nodeIncrementalSort.c, but in several others >>> too

Re: powerpc pg_atomic_compare_exchange_u32_impl: error: comparison of integer expressions of different signedness (Re: pgsql: For all ppc compilers, implement compare_exchange and) fetch_add

2020-10-11 Thread Tom Lane
Noah Misch writes: > The first attachment fixes the matter you've reported. While confirming that, > I observed that gcc builds don't even use the 64-bit code in arch-ppc.h. > Oops. The second attachment fixes that. I reviewed these, and tested the first one on a nearby Apple machine. (I lack a

Re: Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)

2020-10-11 Thread Ranier Vilela
Em sáb., 10 de out. de 2020 às 00:11, David G. Johnston < david.g.johns...@gmail.com> escreveu: > On Fri, Oct 9, 2020 at 6:41 PM Ranier Vilela wrote: > >> The problem is not only in nodeIncrementalSort.c, but in several others >> too, where people are using TupIsNull with ExecCopySlot. >> I would

Re: speed up unicode normalization quick check

2020-10-11 Thread Michael Paquier
On Thu, Oct 08, 2020 at 06:22:39PM -0400, John Naylor wrote: > Okay, thanks. And applied. I did some more micro benchmarking with the quick checks, and the numbers are cool, close to what you mentioned for the quick checks of both NFC and NFKC. Just wondering about something in the same area, di

Re: public schema default ACL

2020-10-11 Thread Noah Misch
On Wed, Aug 05, 2020 at 10:05:28PM -0700, Noah Misch wrote: > On Mon, Aug 03, 2020 at 07:46:02PM +0200, Peter Eisentraut wrote: > > The important things in my mind are that you keep an easy onboarding > > experience (you can do SQL things without having to create and unlock a > > bunch of things fi