Re: Refactor compile-time assertion checks for C/C++

2020-03-12 Thread Michael Paquier
On Thu, Mar 12, 2020 at 12:33:21AM -0400, Tom Lane wrote: > I looked at this and tried it on an old (non HAVE__STATIC_ASSERT) > gcc version. Seems to work, but I have a couple cosmetic suggestions: Thanks for the review. > 1. The comment block above this was never updated to mention that > we're

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-12 Thread David Rowley
On Thu, 12 Mar 2020 at 19:50, Masahiko Sawada wrote: > The reason why you want to add new GUC parameters is to use different > default values for insert-update table case and insert-only table > case? Yes, but in particular so it can be completely disabled easily. > I think I understand the pros

Re: Add an optional timeout clause to isolationtester step.

2020-03-12 Thread Michael Paquier
On Wed, Mar 11, 2020 at 05:52:54PM -0300, Alvaro Herrera wrote: > On 2020-Mar-11, Tom Lane wrote: >> We could re-use Julien's ideas about the isolation spec syntax by >> making it be, roughly, >> >> step "" { } [ blocked if "" "" ] >> >> and then those items would need to be passed as parameters

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-12 Thread David Rowley
On Wed, 11 Mar 2020 at 17:23, Andy Fan wrote: > Now I am convinced that we should maintain UniquePath on RelOptInfo, > I would see how to work with "Index Skip Scan" patch. I've attached a very early proof of concept patch for unique keys. The NULL detection stuff is not yet hooked up, so it'll c

Re: Internal key management system

2020-03-12 Thread Bruce Momjian
On Fri, Mar 6, 2020 at 03:31:00PM +0900, Masahiko Sawada wrote: > On Fri, 6 Mar 2020 at 15:25, Moon, Insung wrote: > > > > Dear Sawada-san > > > > I don't know if my environment or email system is weird, but the V5 > > patch file is only include simply a changed list. > > and previous V4 patch fi

Additional size of hash table is alway zero for hash aggregates

2020-03-12 Thread Pengzhou Tang
Hi hacker, When reading the grouping sets codes, I find that the additional size of the hash table for hash aggregates is always zero, this seems to be incorrect to me, attached a patch to fix it, please help to check. Thanks, Pengzhou 0001-Set-numtrans-correctly-when-building-hash-aggregate-.p

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-12 Thread Kyotaro Horiguchi
At Thu, 12 Mar 2020 14:08:31 +0800, Craig Ringer wrote in > On Thu, 12 Mar 2020 at 03:43, Andres Freund wrote: > > > On 2020-03-11 11:25:28 +0800, Craig Ringer wrote: > > > I propose that per the attached patch PGXS should simply skip adding > > > the automatic dependency for .bc files if clan

RE: Planning counters in pg_stat_statements (using pgss_store)

2020-03-12 Thread imai.yoshik...@fujitsu.com
On Thu, Mar 12, 2020 at 6:31 AM, Julien Rouhaud wrote: > On Thu, Mar 12, 2020 at 05:28:38AM +, imai.yoshik...@fujitsu.com wrote: > > Hi Julien, > > > > On Mon, Mar 9, 2020 at 10:32 AM, Julien Rouhaud wrote: > > > On Thu, Mar 05, 2020 at 01:26:19PM -0700, legrand legrand wrote: > > > > Please co

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-12 Thread Dilip Kumar
On Wed, Mar 11, 2020 at 2:36 PM Amit Kapila wrote: > > On Tue, Mar 10, 2020 at 6:39 PM Robert Haas wrote: > > > > On Fri, Mar 6, 2020 at 11:27 PM Dilip Kumar wrote: > > > I think instead of the flag we need to keep the counter because we can > > > acquire the same relation extension lock multipl

Re: Use compiler intrinsics for bit ops in hash

2020-03-12 Thread John Naylor
On Thu, Mar 12, 2020 at 7:42 AM David Rowley wrote: > > I don't think Jesse's proposed solution is that great due to the > additional function call overhead for pg_count_leading_zeros_32(). The > (num & (num - 1)) == 0 I imagine will perform better, but I didn't > test it. Right, I believe we've

Re: [Proposal] Global temporary tables

2020-03-12 Thread 曾文旌(义从)
> 2020年3月12日 上午4:12,Robert Haas 写道: > > On Wed, Mar 11, 2020 at 9:07 AM 曾文旌(义从) wrote: >> reindex need change relfilenode, but GTT is not currently supported. > > In my view that'd have to be fixed somehow. Ok , I am working on it. > > -- > Robert Haas > EnterpriseDB: http://www.enterpr

Re: PATCH: add support for IN and @> in functional-dependency statistics use

2020-03-12 Thread Dean Rasheed
[ For the sake of the archives, some of the discussion on the other thread [1-3] should really have been on this thread. ] On Sun, 2 Feb 2020 at 18:41, Tomas Vondra wrote: > > I think the challenge here is in applying the functional dependency > computed for the whole array to individual elements

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-03-12 Thread Julien Rouhaud
On Thu, Mar 12, 2020 at 10:19 AM imai.yoshik...@fujitsu.com wrote: > > I'll summary code review of this thread. Thanks for the summary! I just have some minor comments > [Performance] > > If track_planning is not enabled, performance will drop 0.2-0.6% which can be > ignored. If track_planning

can i pass the transition tables to any function from hooks like ExecutorFinish?

2020-03-12 Thread Onur ALTUN
i want to audit dml changes to my audit table and i dont want to use trigger. i am trying to pass the transition table data to my function. (or another solution) i want to write an extension and my code is like above. if (queryDesc->operation == CMD_INSERT) { SPI_connect(); Oid

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-12 Thread Amit Kapila
On Thu, Mar 12, 2020 at 11:15 AM Dilip Kumar wrote: > > I have fixed this in the attached patch set. > I have modified your v4-0003-Conflict-Extension-Page-lock-in-group-member patch. The modifications are (a) Change src/backend/storage/lmgr/README to reflect new behaviour, (b) Introduce a new m

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-03-12 Thread Marco Slot
On Thu, Mar 12, 2020 at 11:31 AM Julien Rouhaud wrote: > There's at least the current version of IVM patchset that lacks the > querytext. Looking at various extensions, I see that pg_background > and pglogical call pg_plan_query internally but shouldn't have any > issue providing the query text.

Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction

2020-03-12 Thread Justin Pryzby
On Sun, Mar 08, 2020 at 04:30:44PM -0400, Tom Lane wrote: > BTW, another thing I noticed while looking around is that some of > the functions using SRF_RETURN_DONE() think they should clean up > memory beforehand. This is a waste of code/cycles, as long as the > memory was properly allocated in fu

Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction

2020-03-12 Thread Justin Pryzby
On Wed, Mar 11, 2020 at 03:32:38PM -0400, Tom Lane wrote: > > I patched this one to see what it looks like and to allow /hopefully/ moving > > forward one way or another with the pg_ls_tmpfile() patch set (or at least > > avoid trying to do anything there which is too inconsistent with this fix). >

Re: [Proposal] Global temporary tables

2020-03-12 Thread Prabhat Sahu
Hi Wenjing, Please check the below findings: After running "TRUNCATE" command, the "relfilenode" field is not changing for GTT whereas, for Simple table/Temp table "relfilenode" field is changing after TRUNCATE. *Case 1: Getting same "relfilenode" for GTT after and before "TRUNCATE"* postgres=# c

Re: range_agg

2020-03-12 Thread Alvaro Herrera
Hello Paul, thanks for the thorough response to all these points. Regarding the merge of multiranges with ranges, I had also thought of that at some point and was leaning towards doing that, but after the latest responses I think the arguments against it are sensible; and now there's a clear maj

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-12 Thread Masahiko Sawada
On Thu, 12 Mar 2020 at 16:28, David Rowley wrote: > > On Thu, 12 Mar 2020 at 19:50, Masahiko Sawada > wrote: > > The reason why you want to add new GUC parameters is to use different > > default values for insert-update table case and insert-only table > > case? > > Yes, but in particular so it c

Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction

2020-03-12 Thread Alvaro Herrera
Nitpick: please see c4dcd9144ba6. > From: Justin Pryzby > Date: Wed, 11 Mar 2020 10:09:18 -0500 > Subject: [PATCH] SRF: avoid leaking resources if not run to completion > > Change to return a tuplestore populated immediately and returned in full. > > Discussion: > https://www.postgresql.org/me

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-12 Thread Alexey Kondratov
On 12.03.2020 07:39, Michael Paquier wrote: I'd like to commit the refactoring piece in 0001 tomorrow, then let's move on with the rest as of 0002. If more comments and docs are needed for archive.c, let's continue discussing that. I just went through the both patches and realized that I canno

Re: DROP and ddl_command_end.

2020-03-12 Thread Robert Haas
On Mon, Mar 9, 2020 at 11:54 PM Kyotaro Horiguchi wrote: > Yes, right and I know. I intended the sample being simple, but sorry > for the bogus example. But the problem is not there. The problem is, > the trigger is called for DROP, the function returns no tuples. I'm > not sure DROP is the only c

Re: Parallel copy

2020-03-12 Thread vignesh C
I have got the execution breakdown for few scenarios with normal disk and RAM disk. *Execution breakup in Normal disk:* Test/ Time(In Seconds) Total TIme File Read Time copyreadline Time Remaining Execution Time Read line percentage Test1(3 index + 1 trigger) 2099.017 0.311 10.256 2088.45 0.488609

Re: SQL/JSON: functions

2020-03-12 Thread Pavel Stehule
čt 12. 3. 2020 v 0:09 odesílatel Nikita Glukhov napsal: > Attached 43rd version of the patches. > > The previous patch #4 ("Add function formats") was removed. > Instead, introduced new executor node JsonCtorExpr which is used to wrap > SQL/JSON constructor function calls (FuncExpr, Aggref, Windo

Re: Refactor compile-time assertion checks for C/C++

2020-03-12 Thread Tom Lane
Michael Paquier writes: > So, should we add a reference about both in the new comment? I would > actually not add them, so I have used your suggestion in the attached, > but the comment block above does that for _Static_assert(). Do you > think it is better to add some references to some of thos

Re: Add an optional timeout clause to isolationtester step.

2020-03-12 Thread Tom Lane
Michael Paquier writes: > +1. A patch does not seem to be that complicated. Now isn't it too > late for v13? I think we've generally given new tests more slack than new features so far as schedule goes. If the patch ends up being complicated/invasive, I might vote to hold it for v14, but let's

Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction

2020-03-12 Thread Tom Lane
Alvaro Herrera writes: > I wonder if this isn't saying that the whole value-per-call protocol is > bogus, in that it seems impossible to write a useful function with it. Only if you have a *very* narrow definition of "useful function". If you look through SRF_RETURN_DONE callers, only a small min

Re: [PATCH] Add schema and table names to partition error

2020-03-12 Thread Amit Kapila
On Wed, Mar 11, 2020 at 8:51 PM Chris Bandy wrote: > > On 3/11/20 6:29 AM, Amit Kapila wrote: > > > > I have tried with git am as well, but it failed. I am not sure what > > is the reason. Can you please once check at your end? > > Yes, sorry. This set (and v3 and v4) should work with -p0. Any f

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-12 Thread Kuntal Ghosh
On Thu, Mar 12, 2020 at 5:28 PM Amit Kapila wrote: > > On Thu, Mar 12, 2020 at 11:15 AM Dilip Kumar wrote: > > > > I have fixed this in the attached patch set. > > > > I have modified your > v4-0003-Conflict-Extension-Page-lock-in-group-member patch. The > modifications are (a) Change src/backen

Re: backup manifests

2020-03-12 Thread tushar
On 3/9/20 10:46 PM, Robert Haas wrote: Seems like expected behavior to me. We could consider providing a more descriptive error message, but there's now way for it to work. Right , Error message need to be more user friendly . -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The E

Re: [PATCH] Replica sends an incorrect epoch in its hot standby feedback to the Master

2020-03-12 Thread Palamadai, Eka
Thanks a lot for reviewing and pushing this. Eka On 3/12/20, 1:23 AM, "Thomas Munro" wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. On Wed, M

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-12 Thread Alvaro Herrera
On 2020-Mar-11, Michael Paquier wrote: > On Tue, Mar 10, 2020 at 12:39:53PM -0300, Alvaro Herrera wrote: > > Another option is to return the command as a palloc'ed string (per > > psprintf), instead of using a caller-stack-allocated variable. Passing > > the buffer len is widely used, but more er

Re: control max length of parameter values logged

2020-03-12 Thread Alvaro Herrera
On 2020-Mar-11, Tom Lane wrote: > Alvaro Herrera writes: > > Maybe it would make sense to always log complete parameters for error > > cases when that feature is enabled, and have the GUC only control the > > lengths logged for non-error cases? > > I could get behind that. It's a bit different

Re: control max length of parameter values logged

2020-03-12 Thread Tom Lane
Alvaro Herrera writes: > On 2020-Mar-11, Tom Lane wrote: >> Another way to slice this up would be to have a USERSET GUC that >> controls truncation of parameter values in errors, and a separate >> SUSET GUC that controls it for the non-error statement logging >> cases. I'm not sure how much that'

Re: A bug when use get_bit() function for a long bytea string

2020-03-12 Thread Ashutosh Bapat
Hi On Thu, Mar 12, 2020 at 9:21 AM movead...@highgo.ca wrote: > > Hello hackers, > > I found an issue about get_bit() and set_bit() function,here it is: > > postgres=# select > get_bit(pg_read_binary_file('/home/movead/temp/file_seek/f_512M'), 0); > 2020-03-12 10

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-12 Thread Tom Lane
I poked at this issue a bit more and realized that Hugh's patch flat-out breaks building --with-libxml in environments without pkg-config, because PKG_CHECK_MODULES just gives up and dies if there's no pkg-config (as we'd already found out in connection with ICU). That won't win us any friends, so

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-03-12 Thread Alexey Kondratov
Hi Justin, On 09.03.2020 23:04, Justin Pryzby wrote: On Sat, Feb 29, 2020 at 08:53:04AM -0600, Justin Pryzby wrote: On Sat, Feb 29, 2020 at 03:35:27PM +0300, Alexey Kondratov wrote: Anyway, new version is attached. It is rebased in order to resolve conflicts with a recent fix of REINDEX CONCUR

Re: ALTER tbl rewrite loses CLUSTER ON index

2020-03-12 Thread Tom Lane
Justin Pryzby writes: > @cfbot: resending with only Amit's 0001, since Michael pushed a variation on > 0002. Boy, I really dislike this patch. ATPostAlterTypeParse is documented as using the supplied definition string, and nothing else, to reconstruct the index. This breaks that without even th

Re: PATCH: add support for IN and @> in functional-dependency statistics use

2020-03-12 Thread Tomas Vondra
On Thu, Mar 12, 2020 at 10:25:41AM +, Dean Rasheed wrote: [ For the sake of the archives, some of the discussion on the other thread [1-3] should really have been on this thread. ] On Sun, 2 Feb 2020 at 18:41, Tomas Vondra wrote: I think the challenge here is in applying the functional de

Re: Planning counters in pg_stat_statements (using pgss_store)

2020-03-12 Thread Julien Rouhaud
On Thu, Mar 12, 2020 at 1:11 PM Marco Slot wrote: > > On Thu, Mar 12, 2020 at 11:31 AM Julien Rouhaud wrote: > > There's at least the current version of IVM patchset that lacks the > > querytext. Looking at various extensions, I see that pg_background > > and pglogical call pg_plan_query interna

Re: The flinfo->fn_extra question, from me this time.

2020-03-12 Thread Tom Lane
The cfbot is still not happy with this, because you're ignoring the project style rule against C99-like mixing of code and declarations. I went to fix that, and soon found that the code doesn't compile, much less pass regression tests, with --enable-cassert. That's really a serious error on your p

Re: Additional size of hash table is alway zero for hash aggregates

2020-03-12 Thread Andres Freund
Hi, On 2020-03-12 16:35:15 +0800, Pengzhou Tang wrote: > When reading the grouping sets codes, I find that the additional size of > the hash table for hash aggregates is always zero, this seems to be > incorrect to me, attached a patch to fix it, please help to check. Indeed, that's incorrect. C

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-12 Thread Andres Freund
Hi, On 2020-03-12 14:08:31 +0800, Craig Ringer wrote: > On Thu, 12 Mar 2020 at 03:43, Andres Freund wrote: > > > On 2020-03-11 11:25:28 +0800, Craig Ringer wrote: > > > I propose that per the attached patch PGXS should simply skip adding > > > the automatic dependency for .bc files if clang cann

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-12 Thread David Rowley
On Fri, 13 Mar 2020 at 01:43, Masahiko Sawada wrote: > > On Thu, 12 Mar 2020 at 16:28, David Rowley wrote: > > Laurenz highlighted a seemingly very valid reason that the current > > GUCs cannot be reused. Namely, say the table has 1 billion rows, if we > > use the current scale factor of 0.2, the

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-12 Thread Euler Taveira
On Thu, 12 Mar 2020 at 16:25, Andres Freund wrote: > Hi, > > On 2020-03-12 14:08:31 +0800, Craig Ringer wrote: > > > > I thought about that at first, but that'll only benefit people who're > > hand-compiling things, and it's already possible with > > > > make with_llvm=no ... > > Well, the di

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-12 Thread Andres Freund
Hi, On 2020-03-12 17:22:09 -0300, Euler Taveira wrote: > On Thu, 12 Mar 2020 at 16:25, Andres Freund wrote: > > > Hi, > > > > On 2020-03-12 14:08:31 +0800, Craig Ringer wrote: > > > > > > I thought about that at first, but that'll only benefit people who're > > > hand-compiling things, and it's a

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-12 Thread Daniel Gustafsson
> On 12 Mar 2020, at 17:39, Tom Lane wrote: > I also > concluded that if the user has set XML2_CONFIG, it's pretty clear > that her intent is to use whatever that is pointing at, so we should > not use pkg-config in that case either. +1 > I'd originally thought that we might back-patch this, bu

Re: Memory-Bounded Hash Aggregation

2020-03-12 Thread Justin Pryzby
On Wed, Mar 11, 2020 at 11:55:35PM -0700, Jeff Davis wrote: > * tweaked EXPLAIN output some more > Unless I (or someone else) finds something significant, this is close > to commit. Thanks for working on this ; I finally made a pass over the patch. +++ b/doc/src/sgml/config.sgml + enable_gr

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-03-12 Thread Alvaro Herrera
I gave this a very quick look; I don't claim to understand it or anything, but I thought these trivial cleanups worthwhile. The only non-cosmetic thing is changing order of arguments to the SOn_printf() calls in 0008; I think they are contrary to what the comment says. I don't propose to commit 0

Re: Additional size of hash table is alway zero for hash aggregates

2020-03-12 Thread Justin Pryzby
On Thu, Mar 12, 2020 at 12:16:26PM -0700, Andres Freund wrote: > On 2020-03-12 16:35:15 +0800, Pengzhou Tang wrote: > > When reading the grouping sets codes, I find that the additional size of > > the hash table for hash aggregates is always zero, this seems to be > > incorrect to me, attached a pa

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-03-12 Thread Justin Pryzby
Thanks for working on this. I have some minor comments. In 0005: + /* Restore the input path (we might have addes Sort on top). */ => added? There's at least two more of the same typo. + /* also ignore already sorted paths */ => Yo

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-12 Thread Michael Paquier
On Thu, Mar 12, 2020 at 12:50:17PM -0300, Alvaro Herrera wrote: > Thanks, looks good. I don't think we *need* the MAXPGPATH restriction > really -- I was thinking in a StringInfo kind of approach where you just > append the stuff you need without having to think about the buffer > length. Oh, OK.

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-12 Thread Laurenz Albe
On Fri, 2020-03-13 at 09:10 +1300, David Rowley wrote: > So you're suggesting we drive the insert-vacuums from existing > scale_factor and threshold? What about the 1 billion row table > example above? I am still not 100% certain if that is really realistic. Transactions that insert only a single

Re: Additional size of hash table is alway zero for hash aggregates

2020-03-12 Thread Andrew Gierth
> "Justin" == Justin Pryzby writes: > On Thu, Mar 12, 2020 at 12:16:26PM -0700, Andres Freund wrote: >> Indeed, that's incorrect. Causes the number of buckets for the >> hashtable to be set higher - the size is just used for that. I'm a >> bit wary of changing this in the stable branches

Re: Additional size of hash table is alway zero for hash aggregates

2020-03-12 Thread Andres Freund
Hi, On 2020-03-13 00:34:22 +, Andrew Gierth wrote: > > "Justin" == Justin Pryzby writes: > > > On Thu, Mar 12, 2020 at 12:16:26PM -0700, Andres Freund wrote: > >> Indeed, that's incorrect. Causes the number of buckets for the > >> hashtable to be set higher - the size is just used for

Re: v13 latest snapshot build error

2020-03-12 Thread Artur Zakirov
On 3/12/2020 11:52 AM, Tom Lane wrote: Artur Zakirov writes: I'm not familiar with the patch itself. But I think there is just a lack of the comma here, after ", /tmp" :-) [ blink... ] There definitely is a comma there in the version of the patch that's in the Fedora repo. Ah, I see. I jus

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-12 Thread Kyotaro Horiguchi
At Wed, 11 Mar 2020 12:43:22 -0700, Andres Freund wrote in > Hi, > > On 2020-03-11 11:25:28 +0800, Craig Ringer wrote: > > I propose that per the attached patch PGXS should simply skip adding > > the automatic dependency for .bc files if clang cannot be found. > > Extensions may still choose to

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-12 Thread Kyotaro Horiguchi
Sorry, that mail is almost duplicate with another one, which was sent by accident. At Thu, 12 Mar 2020 14:59:44 +0900 (JST), Kyotaro Horiguchi wrote in > +1 for requiring such options for the same reason. The current patch > disables LLVM for the enviroment where clang is installed but ccache >

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-12 Thread Andy Fan
Hi David: On Thu, Mar 12, 2020 at 3:51 PM David Rowley wrote: > On Wed, 11 Mar 2020 at 17:23, Andy Fan wrote: > > Now I am convinced that we should maintain UniquePath on RelOptInfo, > > I would see how to work with "Index Skip Scan" patch. > > I've attached a very early proof of concept patch

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-12 Thread Amit Kapila
On Thu, Mar 12, 2020 at 7:50 PM Kuntal Ghosh wrote: > > On Thu, Mar 12, 2020 at 5:28 PM Amit Kapila wrote: > > > > On Thu, Mar 12, 2020 at 11:15 AM Dilip Kumar wrote: > > > > > > I have fixed this in the attached patch set. > > > > > > > I have modified your > > v4-0003-Conflict-Extension-Page-l

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-12 Thread Dilip Kumar
On Thu, Mar 12, 2020 at 5:28 PM Amit Kapila wrote: > > On Thu, Mar 12, 2020 at 11:15 AM Dilip Kumar wrote: > > > > I have fixed this in the attached patch set. > > > > I have modified your > v4-0003-Conflict-Extension-Page-lock-in-group-member patch. The > modifications are (a) Change src/backen

RE: Conflict handling for COPY FROM

2020-03-12 Thread asaba.takan...@fujitsu.com
Hello Surafel, From: Surafel Temesgen >>On Fri, Mar 6, 2020 at 11:30 AM mailto:asaba.takan...@fujitsu.com >> wrote: >>I think we need regression test that constraint violating row is returned >>back to the caller. >>How about this? > >okay attached is a rebas

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-12 Thread Dilip Kumar
On Fri, Mar 13, 2020 at 8:29 AM Amit Kapila wrote: > > On Thu, Mar 12, 2020 at 7:50 PM Kuntal Ghosh > wrote: > > > > On Thu, Mar 12, 2020 at 5:28 PM Amit Kapila wrote: > > > > > > On Thu, Mar 12, 2020 at 11:15 AM Dilip Kumar > > > wrote: > > > > > > > > I have fixed this in the attached patch

Re: shared-memory based stats collector

2020-03-12 Thread Andres Freund
Hi, Thomas, could you look at the first two patches here, and my review questions? General comments about this series: - A lot of the review comments feel like I've written them before, a year or more ago. I feel this patch ought to be in a much better state. There's a lot of IMO fairly obvi

Re: Re: A bug when use get_bit() function for a long bytea string

2020-03-12 Thread movead...@highgo.ca
Thanks for the reply. >Why have you used size? Shouldn't we use int64? Yes, thanks for the point, I have changed the patch. >If get_bit()/set_bit() accept the second argument as int32, it can not >be used to set bits whose number does not fit 32 bits. I think we need >to change the type of the s

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-12 Thread David Rowley
On Fri, 13 Mar 2020 at 14:47, Andy Fan wrote: > 1. for pupulate_baserel_uniquekeys, we need handle the "pk = Const" as > well. > (relation_has_unqiue_for has a similar logic) currently the following > distinct path is still > there. Yeah, I left a comment in propagate_unique_keys_to_joinrel

Re: Add A Glossary

2020-03-12 Thread Jürgen Purtz
The statement that names of schema objects are unique isn't /strictly/ true, just /mostly/ true. Take the case of a unique constraints. Concerning CONSTRAINTS you are right. Constraints seems to be an exception: * Their name belongs to a schema, but are not necessarily unique within thi

Re: The flinfo->fn_extra question, from me this time.

2020-03-12 Thread Thomas Munro
On Fri, Mar 13, 2020 at 7:51 AM Tom Lane wrote: > ... (At least on the Linux side. I guess the cfbot's > Windows builds are sans cassert, which seems like an odd choice.) I tried turning that on by adding $config{asserts} = 1 in the build script and adding some scripting to dump all relevant lo

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-12 Thread Andy Fan
On Fri, Mar 13, 2020 at 11:46 AM David Rowley wrote: > On Fri, 13 Mar 2020 at 14:47, Andy Fan wrote: > > 1. for pupulate_baserel_uniquekeys, we need handle the "pk = Const" > as well. > > (relation_has_unqiue_for has a similar logic) currently the following > distinct path is still > > there

Re: pglz performance

2020-03-12 Thread Andrey M. Borodin
Hi Petr! > 4 авг. 2019 г., в 05:41, Petr Jelinek написал(а): > > Just so that we don't idly talk, what do you think about the attached? > It: > - adds new GUC compression_algorithm with possible values of pglz (default) > and lz4 (if lz4 is compiled in), requires SIGHUP > - adds --with-lz4 conf

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-12 Thread Amit Kapila
On Thu, Mar 12, 2020 at 3:04 PM Dilip Kumar wrote: > > On Wed, Mar 11, 2020 at 2:36 PM Amit Kapila wrote: > > > > > > If we have no other choice, then I see a few downsides of adding a > > special check in the LockRelease() call: > > > > 1. Instead of resetting/decrement the variable from specifi

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-12 Thread Dilip Kumar
On Fri, Mar 13, 2020 at 11:08 AM Amit Kapila wrote: > > On Thu, Mar 12, 2020 at 3:04 PM Dilip Kumar wrote: > > > > On Wed, Mar 11, 2020 at 2:36 PM Amit Kapila wrote: > > > > > > > > > If we have no other choice, then I see a few downsides of adding a > > > special check in the LockRelease() call

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-12 Thread Craig Ringer
On Fri, 13 Mar 2020 at 04:35, Andres Freund wrote: > > IMO only if the packager screwed up. The dependencies of the package > that includes pgxs, headers should have the dependencies to llvm. Which > e.g. debian's does: > Yes, I agree that the underlying issue is mainly with packaging. This pro

Re: Refactor compile-time assertion checks for C/C++

2020-03-12 Thread Michael Paquier
On Thu, Mar 12, 2020 at 09:43:54AM -0400, Tom Lane wrote: > I don't feel a need to expend a whole lot of sweat there. The existing > text is fine, it just bugged me that the code deals with three cases > while the comment block only acknowledged two. So I'd just go with > what you have in v3. Th

RE: Planning counters in pg_stat_statements (using pgss_store)

2020-03-12 Thread imai.yoshik...@fujitsu.com
On Thu, Mar 12, 2020 at 10:31 AM, Julien Rouhaud wrote: > > * bufusage still only counts the buffer usage during executor. > > > > Now we have the ability to count the buffer usage during planner but we > keep > > the bufusage count the buffer usage during executor for now. > > The bufusage sh

Re: logical replication empty transactions

2020-03-12 Thread Craig Ringer
On Tue, 10 Mar 2020 at 02:30, Andres Freund wrote: > Hi, > > On 2020-03-06 13:53:02 +0800, Craig Ringer wrote: > > On Mon, 2 Mar 2020 at 19:26, Amit Kapila > wrote: > > > > > One thing that is not clear to me is how will we advance restart_lsn > > > if we don't send any empty xact in a system wh

RE: Planning counters in pg_stat_statements (using pgss_store)

2020-03-12 Thread imai.yoshik...@fujitsu.com
On Thu, Mar 12, 2020 at 6:37 PM, Julien Rouhaud wrote: > On Thu, Mar 12, 2020 at 1:11 PM Marco Slot wrote: > > On Thu, Mar 12, 2020 at 11:31 AM Julien Rouhaud > wrote: > > > There's at least the current version of IVM patchset that lacks the > > > querytext. Looking at various extensions, I see