Re: libpq debug log

2021-03-31 Thread 'alvhe...@alvh.no-ip.org'
On 2021-Mar-31, Tom Lane wrote: > While this may have little to do with drongo's issue, > I'm going to take exception to this bit that I see that > the patch added to PQtrace(): > > /* Make the trace stream line-buffered */ > setvbuf(debug_port, NULL, _IOLBF, 0); Mea culpa. I added

Re: using extended statistics to improve join estimates

2021-03-31 Thread Zhihong Yu
Hi, + * has_matching_mcv + * Check whether the list contains statistic of a given kind The method name is find_matching_mcv(). It seems the method initially returned bool but later the return type was changed. + StatisticExtInfo *found = NULL; found normally is associated with bool return

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2021-03-31 Thread David Rowley
On Wed, 31 Mar 2021 at 05:34, Zhihong Yu wrote: > > Hi, > In paraminfo_get_equal_hashops(), > > + /* Reject if there are any volatile functions */ > + if (contain_volatile_functions(expr)) > + { > > You can move the above code to just ahead of: > > + if (IsA(expr, Var)) > +

Re: Issue with point_ops and NaN

2021-03-31 Thread Kyotaro Horiguchi
At Wed, 31 Mar 2021 16:30:41 +0800, Julien Rouhaud wrote in > On Wed, Mar 31, 2021 at 03:48:16PM +0900, Kyotaro Horiguchi wrote: > > > > Thanks! However, Michael's suggestion is worth considering. What do > > you think about makeing NaN-involved comparison return NULL? If you > > agree to tha

Re: Issue with point_ops and NaN

2021-03-31 Thread Kyotaro Horiguchi
At Wed, 31 Mar 2021 12:01:08 +0200, Laurenz Albe wrote in > On Wed, 2021-03-31 at 15:48 +0900, Kyotaro Horiguchi wrote: > > > > > > > SELECT point('NaN','NaN') <@ polygon('(0,0),(1,0),(1,1),(0,0)'); > > > > > > > ?column? > > > > > > > -- > > > > > > > t > > > > > > > (1 row) > > >

Re: invalid data in file backup_label problem on windows

2021-03-31 Thread Michael Paquier
On Wed, Mar 31, 2021 at 09:33:25AM -0400, David Steele wrote: > Agreed. New patch attached. Thanks, David. > diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml > index c5557d5444..8c9186d277 100644 > --- a/doc/src/sgml/backup.sgml > +++ b/doc/src/sgml/backup.sgml > @@ -913,7 +913,8

Re: New IndexAM API controlling index vacuum strategies

2021-03-31 Thread Peter Geoghegan
On Wed, Mar 31, 2021 at 4:45 AM Masahiko Sawada wrote: > Both 0001 and 0002 patch refactors the whole lazy vacuum code. Can we > merge them? I basically agree with the refactoring made by 0001 patch > but I'm concerned a bit that having such a large refactoring at very > close to feature freeze co

Re: Refactor SSL test framework to support multiple TLS libraries

2021-03-31 Thread Michael Paquier
On Wed, Mar 31, 2021 at 10:43:00AM +0900, Michael Paquier wrote: > Jacob has just raised this as an issue for an integration with NLS, > because it may be possible that things fail with "SSL error" but a > different error pattern, causing false positives: > https://www.postgresql.org/message-id/e0f

Re: Crash in BRIN minmax-multi indexes

2021-03-31 Thread Zhihong Yu
Hi, - delta += (float8) addrb[i] - (float8) addra[i]; - delta /= 256; ... + delta /= 255; May I know why the divisor was changed ? Thanks On Wed, Mar 31, 2021 at 3:25 PM Tomas Vondra wrote: > Hi, > > I think I found the issue - it's kinda obvious, really. We need to > conside

Re: Proposal: Save user's original authenticated identity for logging

2021-03-31 Thread Michael Paquier
On Wed, Mar 31, 2021 at 04:42:32PM +0900, Michael Paquier wrote: > Attached is an updated patch, with a couple of comments tweaks, the > reworked tests and an indentation done. Jacob has mentioned me that v15 has some false positives in the SSL tests, as we may catch in the backend logs patterns t

Re: Crash in BRIN minmax-multi indexes

2021-03-31 Thread Tomas Vondra
On 4/1/21 3:22 AM, Zhihong Yu wrote: > Hi, > -       delta += (float8) addrb[i] - (float8) addra[i]; > -       delta /= 256; > ... > +       delta /= 255; > > May I know why the divisor was changed ? > Yeah, that's a mistake, it should remain 256. Consider two subtractions 1.1.2.255 - 1.1.1.0 =

Re: New IndexAM API controlling index vacuum strategies

2021-03-31 Thread Masahiko Sawada
On Thu, Apr 1, 2021 at 9:58 AM Peter Geoghegan wrote: > > On Wed, Mar 31, 2021 at 4:45 AM Masahiko Sawada wrote: > > Both 0001 and 0002 patch refactors the whole lazy vacuum code. Can we > > merge them? I basically agree with the refactoring made by 0001 patch > > but I'm concerned a bit that hav

Re: a misbehavior of partition row movement (?)

2021-03-31 Thread Masahiko Sawada
On Tue, Mar 23, 2021 at 6:27 PM Amit Langote wrote: > > Sawada-san, > > On Wed, Mar 10, 2021 at 4:51 PM Masahiko Sawada wrote: > > I looked at the 0001 patch and here are random comments. Please ignore > > a comment if it is already discussed. > > Thanks a lot for the review and sorry for the del

Re: making update/delete of inheritance trees scale better

2021-03-31 Thread Amit Langote
On Thu, Apr 1, 2021 at 12:58 AM Tom Lane wrote: > Amit Langote writes: > > On Tue, Mar 30, 2021 at 1:51 PM Tom Lane wrote: > >> Here's a v13 patchset that I feel pretty good about. > > > Thanks. After staring at this for a day now, I do too. > > Thanks for looking! Pushed after some more docs-

Re: multi-install PostgresNode fails with older postgres versions

2021-03-31 Thread Mark Dilger
> On Mar 31, 2021, at 1:07 PM, Mark Dilger wrote: > > > >> On Mar 31, 2021, at 1:05 PM, Andrew Dunstan wrote: >> >> >> On 3/31/21 3:48 PM, Alvaro Herrera wrote: >>> On 2021-Mar-31, Mark Dilger wrote: >>> PostgresNode::start() doesn't work for servers older than version 10, eithe

Re: Flaky vacuum truncate test in reloptions.sql

2021-03-31 Thread Masahiko Sawada
On Wed, Mar 31, 2021 at 10:39 PM Arseny Sher wrote: > > > On 3/31/21 4:17 PM, Masahiko Sawada wrote: > > > Is it better to add FREEZE to the first "VACUUM reloptions_test;" as > well? > > I don't think this matters much, as it tests the contrary and the > probability of > successful test passing

Re: Crash in BRIN minmax-multi indexes

2021-03-31 Thread Thomas Munro
On Thu, Apr 1, 2021 at 11:25 AM Tomas Vondra wrote: > As for why the regression tests did not catch this, it's most likely > because the data is likely generated in "nice" ordering, or something > like that. I'll see if I can tweak the ordering to trigger these issues > reliably, and I'll do a bit

Improve error matching patterns in the SSL tests

2021-03-31 Thread Michael Paquier
Hi all, It has been mentioned twice for the last couple of days that some of the SSL tests are not really picky with what they check, which can be annoying when it comes to the testing of other SSL implementations as we cannot really be sure if an error tells more than "SSL error": https://www.pos

Re: making update/delete of inheritance trees scale better

2021-03-31 Thread David Rowley
On Thu, 1 Apr 2021 at 15:09, Amit Langote wrote: > Note that the patch over there doesn't do anything about > AcquireExecutorLocks() bottleneck, as there are some yet-unsolved race > conditions that were previously discussed here: > > https://www.postgresql.org/message-id/flat/CAKJS1f_kfRQ3ZpjQyHC

Re: Flaky vacuum truncate test in reloptions.sql

2021-03-31 Thread Arseny Sher
Masahiko Sawada writes: >> I don't think this matters much, as it tests the contrary and the >> probability of >> successful test passing (in case of theoretical bug making vacuum to >> truncate >> non-empty relation) becomes stunningly small. But adding it wouldn't hurt >> either. > > I was co

Re: Flaky vacuum truncate test in reloptions.sql

2021-03-31 Thread Arseny Sher
Arseny Sher writes: > as currently the chance of its failure is close to 1. A typo, to 0 too, of course.

Re: [HACKERS] logical decoding of two-phase transactions

2021-03-31 Thread Amit Kapila
On Tue, Mar 30, 2021 at 5:34 AM Peter Smith wrote: > > Please find attached the latest patch set v68* > I think this patch is in much better shape than it was few versions earlier but I feel still some more work and testing is required. We can try to make it work with the streaming option and do

Re: [PATCH] add concurrent_abort callback for output plugin

2021-03-31 Thread Amit Kapila
On Wed, Mar 31, 2021 at 7:20 PM Markus Wanner wrote: > > On 31.03.21 15:18, Amit Kapila wrote: > > On Wed, Mar 31, 2021 at 11:55 AM Markus Wanner > >> The last sentences there now seems to relate to just the setting of > >> "concurrent_abort", rather than the whole reason to invoke the > >> prepar

Re: MultiXact\SLRU buffers configuration

2021-03-31 Thread Thomas Munro
On Thu, Apr 1, 2021 at 10:09 AM Andrey Borodin wrote: > > 29 марта 2021 г., в 11:26, Andrey Borodin написал(а): > > My TODO list: > > 1. Try to break patch set v13-[0001-0004] > > 2. Think how to measure performance of linear search versus hash search in > > SLRU buffer mapping. > > Hi Thomas! >

RE: Stronger safeguard for archive recovery not to miss data

2021-03-31 Thread osumi.takami...@fujitsu.com
Hi, On Wednesday, March 31, 2021 3:06 PM Kyotaro Horiguchi wrote: > At Wed, 31 Mar 2021 15:03:28 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Wed, 31 Mar 2021 02:11:48 +0900, Fujii Masao > > wrote in > > > > So, I would revert all the changes in xlog.c except changing the > > > > warning

Re: Flaky vacuum truncate test in reloptions.sql

2021-03-31 Thread Masahiko Sawada
On Thu, Apr 1, 2021 at 12:08 PM Arseny Sher wrote: > > > Masahiko Sawada writes: > > >> I don't think this matters much, as it tests the contrary and the > >> probability of > >> successful test passing (in case of theoretical bug making vacuum to > >> truncate > >> non-empty relation) becomes st

Re: Support for NSS as a libpq TLS backend

2021-03-31 Thread Michael Paquier
On Wed, Mar 31, 2021 at 10:15:15PM +, Jacob Champion wrote: > I think we're going to need some analogue to PQinitOpenSSL() to help > client applications cut through the mess, but I'm not sure what it > should look like, or how we would maintain any sort of API > compatibility between the two fl

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

2021-03-31 Thread Amit Kapila
On Mon, Mar 22, 2021 at 3:57 PM Greg Nancarrow wrote: > > On Mon, Mar 22, 2021 at 6:28 PM houzj.f...@fujitsu.com > wrote: > > > > > > > > Let me know if these changes seem OK to you. > > > > Yes, these changes look good to me. > > Posting an updated set of patches with these changes... > I have

Re: Flaky vacuum truncate test in reloptions.sql

2021-03-31 Thread Michael Paquier
On Thu, Apr 01, 2021 at 12:52:21PM +0900, Masahiko Sawada wrote: > Just to be clear the context, I’m mentioning the following test case: (Coming back a couple of emails later, where indeed I forgot about the business with lazy_check_needs_freeze() that could cause a page to be skipped even if DISA

Re: [HACKERS] logical decoding of two-phase transactions

2021-03-31 Thread Ajin Cherian
On Thu, Apr 1, 2021 at 2:29 PM Amit Kapila wrote: > On Tue, Mar 30, 2021 at 5:34 AM Peter Smith wrote: > > > > Please find attached the latest patch set v68* > > > > I think this patch is in much better shape than it was few versions > earlier but I feel still some more work and testing is requi

Re: Add client connection check during the execution of the query

2021-03-31 Thread Thomas Munro
On Tue, Mar 30, 2021 at 10:00 AM Thomas Munro wrote: > If we want to ship this in v14 we have to make a decision ASAP: > > 1. Ship the POLLHUP patch (like v9) that only works reliably on > Linux. Maybe disable the feature completely on other OSes? > 2. Ship the patch that tries to read (like v7

Re: [HACKERS] logical decoding of two-phase transactions

2021-03-31 Thread vignesh C
On Thu, Apr 1, 2021 at 8:59 AM Amit Kapila wrote: > > On Tue, Mar 30, 2021 at 5:34 AM Peter Smith wrote: > > > > Please find attached the latest patch set v68* > > > > I think this patch is in much better shape than it was few versions > earlier but I feel still some more work and testing is requ

Re: [HACKERS] logical decoding of two-phase transactions

2021-03-31 Thread Peter Smith
On Thu, Apr 1, 2021 at 4:58 PM Ajin Cherian wrote: > > > > On Thu, Apr 1, 2021 at 2:29 PM Amit Kapila wrote: >> >> On Tue, Mar 30, 2021 at 5:34 AM Peter Smith wrote: >> > >> > Please find attached the latest patch set v68* >> > >> >> I think this patch is in much better shape than it was few ver

Re: Crash in BRIN minmax-multi indexes

2021-03-31 Thread Jaime Casanova
On Wed, Mar 31, 2021 at 6:19 PM Jaime Casanova wrote: > > On Wed, Mar 31, 2021 at 5:25 PM Tomas Vondra > wrote: > > > > Hi, > > > > I think I found the issue - it's kinda obvious, really. We need to > > consider the timezone, because the "time" parts alone may be sorted > > differently. The attac

Re: DROP INDEX docs - explicit lock naming

2021-03-31 Thread Michael Paquier
On Tue, Mar 30, 2021 at 11:29:17PM -0400, Greg Rychlewski wrote: > Thanks for pointing that out. I've attached a new patch with several other > updates where I felt confident the docs were referring to an ACCESS > EXCLUSIVE lock. Thanks, applied! I have reviewed the whole and there is one place i

Re: Issue with point_ops and NaN

2021-03-31 Thread Kyotaro Horiguchi
At Thu, 01 Apr 2021 09:34:40 +0900 (JST), Kyotaro Horiguchi wrote in > I have to change almost all boolean-returning functions to > tri-state-boolean ones. I'll give it try a bit futther. The attached is a rush work of that, on top of the (rebased version of the) base patch. Disregarding its u

<    1   2