Re: psql - add SHOW_ALL_RESULTS option

2021-07-21 Thread Pavel Stehule
Hi čt 22. 7. 2021 v 7:52 odesílatel Fabien COELHO napsal: > > >>> The patch does not apply on Head anymore, could you rebase and post a > >>> patch. I'm changing the status to "Waiting for Author". > >> > >> Ok. I noticed. The patch got significantly broken by the watch pager > >> commit. I also

Re: Hook for extensible parsing.

2021-07-21 Thread vignesh C
On Sat, Jun 12, 2021 at 1:59 PM Julien Rouhaud wrote: > > On Tue, Jun 08, 2021 at 12:16:48PM +0800, Julien Rouhaud wrote: > > On Sun, Jun 06, 2021 at 02:50:19PM +0800, Julien Rouhaud wrote: > > > On Sat, May 01, 2021 at 03:24:58PM +0800, Julien Rouhaud wrote: > > > > > > > > I'm attaching some POC

Re: printf %s with NULL pointer (was Re: BUG #17098: Assert failed on composing an error message when adding a type to an extension being dropped)

2021-07-21 Thread Peter Eisentraut
On 14.07.21 18:26, Tom Lane wrote: Peter Eisentraut writes: In this particular case, I would for example be quite curious how those alternative minimal C libraries such as musl-libc handle this. Interesting question, so I took a look: https://git.musl-libc.org/cgit/musl/tree/src/stdio/vfprin

Re: Enhanced error message to include hint messages for redundant options error

2021-07-21 Thread vignesh C
On Thu, Jul 15, 2021 at 5:12 PM vignesh C wrote: > > On Thu, Jul 15, 2021 at 1:40 PM Dean Rasheed wrote: > > > > On Tue, 13 Jul 2021 at 15:30, vignesh C wrote: > > > > > > On Tue, Jul 13, 2021 at 4:25 PM Dean Rasheed > > > wrote: > > > > > > > > As it stands, the improvements from (3) seem qui

Re: dynamic result sets support in extended query protocol

2021-07-21 Thread vignesh C
On Tue, Jun 29, 2021 at 7:10 PM Peter Eisentraut wrote: > > Here is an updated patch with some merge conflicts resolved, to keep it > fresh. It's still pending in the commit fest from last time. > > My focus right now is to work on the "psql - add SHOW_ALL_RESULTS > option" patch (https://commitf

Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)

2021-07-21 Thread vignesh C
On Thu, Jul 1, 2021 at 9:42 PM Mark Dilger wrote: > > > > > On Jun 29, 2021, at 6:25 PM, Mark Dilger > > wrote: > > > > Please find attached a new set of patches. > > And again, this time attaching a fifth patch which includes the work to allow > users who belong to the right security role to S

Re: psql - add SHOW_ALL_RESULTS option

2021-07-21 Thread Fabien COELHO
The patch does not apply on Head anymore, could you rebase and post a patch. I'm changing the status to "Waiting for Author". Ok. I noticed. The patch got significantly broken by the watch pager commit. I also have to enhance the added tests (per Peter request). I wrote a test to check psql

Re: Incorrect usage of strtol, atoi for non-numeric junk inputs

2021-07-21 Thread Michael Paquier
On Thu, Jul 22, 2021 at 01:19:41AM +1200, David Rowley wrote: > On Thu, 22 Jul 2021 at 00:44, Michael Paquier wrote: >> >> On Thu, Jul 22, 2021 at 12:32:39AM +1200, David Rowley wrote: >> > I see both of these are limited to 64 on windows. Won't those fail on >> > Windows? >> >> Yes, thanks, they

Re: Automatic notification of top transaction IDs

2021-07-21 Thread vignesh C
On Thu, Jul 1, 2021 at 6:41 AM Gurjeet Singh wrote: > > The proposed patch is attached. There is one compilation warning: xid.c:165:1: warning: no previous prototype for ‘FullTransactionIdToStr’ [-Wmissing-prototypes] 165 | FullTransactionIdToStr(FullTransactionId fxid) | ^~~~

Re: Allow batched insert during cross-partition updates

2021-07-21 Thread vignesh C
On Fri, Jul 2, 2021 at 7:35 AM Amit Langote wrote: > > On Fri, Jul 2, 2021 at 1:39 AM Tom Lane wrote: > > > > Amit Langote writes: > > > [ v6-0001-Allow-batching-of-inserts-during-cross-partition-.patch ] > > > > Per the cfbot, this isn't applying anymore, so I'm setting it back > > to Waiting o

Re: Numeric x^y for negative x

2021-07-21 Thread Yugo NAGATA
On Wed, 21 Jul 2021 11:10:16 +0100 Dean Rasheed wrote: > On Tue, 20 Jul 2021 at 10:17, Yugo NAGATA wrote: > > > > This patch fixes numeric_power() to handle negative bases correctly and not > > to raise an error "cannot take logarithm of a negative number", as well as a > > bug that a result who

Re: Next Steps with Hash Indexes

2021-07-21 Thread Amit Kapila
On Tue, Jul 20, 2021 at 6:32 PM Simon Riggs wrote: > > On Tue, Jul 20, 2021 at 1:00 PM Amit Kapila wrote: > > > > On Thu, Jul 15, 2021 at 10:11 PM Simon Riggs > > wrote: > > > > I think the main thing to think about for uniqueness check during > > split (where we scan both the old and new bucket

Re: alter table set TABLE ACCESS METHOD

2021-07-21 Thread vignesh C
On Fri, Jul 16, 2021 at 9:19 AM Justin Pryzby wrote: > > rebased. > > Also, there were two redundant checks for multiple SET ACCESS METHOD commands. > But one of them wasn't hit if the ALTER was setting the current AM due to the > no-op test. > > I think it's better to fail in every case, and not

Re: proposal: enhancing plpgsql debug API - returns text value of variable content

2021-07-21 Thread Pavel Stehule
st 21. 7. 2021 v 22:23 odesílatel Pavel Stehule napsal: > Hi > > pá 16. 7. 2021 v 18:40 odesílatel Pavel Stehule > napsal: > >> Hi >> >> pá 16. 7. 2021 v 15:05 odesílatel Aleksander Alekseev < >> aleksan...@timescale.com> napsal: >> >>> Hi Pavel, >>> >>> > I would like to print content of variab

Re: Added schema level support for publication.

2021-07-21 Thread Greg Nancarrow
On Thu, Jul 22, 2021 at 1:42 PM houzj.f...@fujitsu.com wrote: > > Personally, the new name pg_publication_sch is not very easy to understand. > (Maybe it's because I am not a native english speaker. If others feel ok, > please ignore this comment) > I was actually thinking the same thing. I prefe

window build doesn't apply PG_CPPFLAGS correctly

2021-07-21 Thread Pavel Stehule
Hi I tried to write test for plpgsql debug API, where I need to access to plpgsql.h I have line PG_CPPFLAGS = -I$(top_srcdir)/src/pl/plpgsql/src that is working well on unix, but it do nothing on windows [00:05:14] Project "C:\projects\postgresql\pgsql.sln" (1) is building "C:\projects\postgre

[PATCH] support tab-completion for single quote input with equal sign

2021-07-21 Thread tanghy.f...@fujitsu.com
Hi I found a problem when using tab-completion as follows: CREATE SUBSCRIPTION my_subscription CONNECTION 'host=localhost port=5432 dbname=postgres' [TAB] The word 'PUBLICATION' couldn't be auto completed as expected. The reason is that the equal sign in a single quote is taken as WORD_BREAKS.

Re: [bug?] Missed parallel safety checks, and wrong parallel safety

2021-07-21 Thread Amit Kapila
On Wed, Jul 21, 2021 at 12:30 AM Robert Haas wrote: > > On Sun, Jul 4, 2021 at 1:44 AM Dilip Kumar wrote: > > In general, for the non-partitioned table, where we don't have much > > overhead of checking the parallel safety and invalidation is also not > > a big problem so I am tempted to provide

RE: Added schema level support for publication.

2021-07-21 Thread houzj.f...@fujitsu.com
On July 22, 2021 1:30 AM vignesh C wrote > > I think PubType in this case should be 't' instead of 'e'. Please have a > > look. > > Thanks for reporting this issue, this issue is fixed in the attached v13 > patch. > I have changed relation name pg_publication_schema to pg_publication_sch > so t

Re: [PATCH] Use optimized single-datum tuplesort in ExecSort

2021-07-21 Thread David Rowley
On Wed, 21 Jul 2021 at 22:09, David Rowley wrote: > > On Wed, 21 Jul 2021 at 13:39, James Coleman wrote: > > Thanks for doing the math measuring how much we could impact things. > > > > I'm +lots on getting this committed as is. > > Ok good. I plan on taking a final look at the v10 patch tomorrow

Re: Have I found an interval arithmetic bug?

2021-07-21 Thread Bruce Momjian
On Wed, Jul 21, 2021 at 06:39:26PM -0700, Bryn Llewellyn wrote: > Your statement > > > “months-to-days conversion is almost always an approximation, while the > days to seconds conversion is almost always accurate.” > > > is misleading. Any conversion like these (and also the “spill up

Re: Have I found an interval arithmetic bug?

2021-07-21 Thread Bryn Llewellyn
> On 21-Jul-2021, at 17:07, Bruce Momjian wrote: > > On Wed, Jul 21, 2021 at 01:29:49PM -0400, Tom Lane wrote: >> Bryn Llewellyn writes: >>> It was me that started the enormous thread with the title “Have I found an >>> interval arithmetic bug?” on 01-Apr-2021. I presented this testcase: >> >>

RE: [PATCH] Use optimized single-datum tuplesort in ExecSort

2021-07-21 Thread houzj.f...@fujitsu.com
On July 22, 2021 8:38 AM David Rowley > On Thu, 22 Jul 2021 at 12:27, houzj.f...@fujitsu.com > wrote: > > The above seems can be shorter like the following ? > > > > for (;;) > > { > > slot = ExecProcNode(outerNode); > > if (TupIsNull(slot)) > > break; > >

RE: Added schema level support for publication.

2021-07-21 Thread houzj.f...@fujitsu.com
On, July 22, 2021 1:38 AM vignesh C wrote: >On Wed, Jul 21, 2021 at 3:14 PM Rahila Syed >wrote: >> More broadly, I am not clear about the behaviour of the patch when a >> publication is created to publish only certain tables, and is later altered >> to publish >>

Re: [PATCH] Use optimized single-datum tuplesort in ExecSort

2021-07-21 Thread David Rowley
On Thu, 22 Jul 2021 at 12:27, houzj.f...@fujitsu.com wrote: > The above seems can be shorter like the following ? > > for (;;) > { > slot = ExecProcNode(outerNode); > if (TupIsNull(slot)) > break; > if (node->datumSort) > { > slot_get

RE: Added schema level support for publication.

2021-07-21 Thread houzj.f...@fujitsu.com
From: vignesh C Sent: Thursday, July 22, 2021 1:38 AM To: Rahila Syed Cc: Greg Nancarrow ; Tang, Haiying/唐 海英 ; Ajin Cherian ; PostgreSQL Hackers ; Bharath Rupireddy Subject: Re: Added schema level support for publication. On Wed, Jul 21, 2021 at 3:14 PM Rahila Syed mailto:rahilasye...@gm

RE: [PATCH] Use optimized single-datum tuplesort in ExecSort

2021-07-21 Thread houzj.f...@fujitsu.com
From: David Rowley > On Wed, 21 Jul 2021 at 13:39, James Coleman wrote: > > Thanks for doing the math measuring how much we could impact things. > > > > I'm +lots on getting this committed as is. > > Ok good. I plan on taking a final look at the v10 patch tomorrow morning NZ > time (about 12 hou

Re: Micro-optimizations to avoid some strlen calls.

2021-07-21 Thread Ranier Vilela
Em qua., 21 de jul. de 2021 às 09:28, Ranier Vilela escreveu: > Em qua., 21 de jul. de 2021 às 07:44, David Rowley > escreveu: > >> On Tue, 20 Jul 2021 at 10:49, Ranier Vilela wrote: >> > There are some places, where strlen can have an overhead. >> > This patch tries to fix this. >> >> I'm with

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread Ranier Vilela
Em qua., 21 de jul. de 2021 às 11:33, Ronan Dunklau escreveu: > Le mercredi 21 juillet 2021 15:45:15 CEST, vous avez écrit : > > On Thu, 22 Jul 2021 at 00:28, Ronan Dunklau > wrote: > > > The attached patch does the following: > > > - verify the opfamily is shippable to keep pathkeys > > > -

Re: [POC] verifying UTF-8 using SIMD instructions

2021-07-21 Thread Thomas Munro
On Thu, Jul 22, 2021 at 6:16 AM John Naylor wrote: > Neat! It's good to make it more architecture-agnostic, and I'm sure we can > use quite a bit of this. One question is whether this "one size fits all" approach will be extensible to wider SIMD. > to_bool(const pg_u8x16_t v) > { > +#if defin

Re: Have I found an interval arithmetic bug?

2021-07-21 Thread Bruce Momjian
On Wed, Jul 21, 2021 at 01:29:49PM -0400, Tom Lane wrote: > Bryn Llewellyn writes: > > It was me that started the enormous thread with the title “Have I found an > > interval arithmetic bug?” on 01-Apr-2021. I presented this testcase: > > >> select interval '-1.7 years';

Re: something is wonky with pgbench pipelining

2021-07-21 Thread Andres Freund
Hi, On 2021-07-20 14:57:15 -0400, Alvaro Herrera wrote: > On 2021-Jul-20, Andres Freund wrote: > > > I think what's happening is that the first recvfrom() actually gets all 7 > > connection results. The server doesn't have any queries to process at that > > point. But we ask the kernel whether th

Re: Using a stock openssl BIO

2021-07-21 Thread Andres Freund
Hi, On 2021-07-22 00:21:16 +0200, Daniel Gustafsson wrote: > > On 15 Jul 2021, at 04:17, Andres Freund wrote: > > > Thomas^WA bad person recently nerdsniped me (with the help of an accidental > > use > > of an SSL connection in a benchmark leading to poor results) into checking > > what > > wou

Re: POC: GROUP BY optimization

2021-07-21 Thread Tomas Vondra
Hi, after a bit more time spent on this, I found that the issue is due to this chunk of code in if (heapSort) { if (tuplesPerPrevGroup < output_tuples) /* comparing only inside output_tuples */ correctedNGroups = ceil(2.0 * output_tuples /

Re: Using a stock openssl BIO

2021-07-21 Thread Daniel Gustafsson
> On 15 Jul 2021, at 04:17, Andres Freund wrote: > Thomas^WA bad person recently nerdsniped me (with the help of an accidental > use > of an SSL connection in a benchmark leading to poor results) into checking > what > would be needed to benefit from SSL/TLS hardware acceleration (available wit

Re: Rename of triggers for partitioned tables

2021-07-21 Thread Alvaro Herrera
... now, thinking about how does pg_dump deal with this, I think this thread is all wrong, or at least mostly wrong. We cannot have triggers in partitions with different names from the triggers in the parents. pg_dump would only dump the trigger in the parent and totally ignore the ones in childre

Re: badly calculated width of emoji in psql

2021-07-21 Thread Jacob Champion
On Wed, 2021-07-21 at 00:08 +, Jacob Champion wrote: > I note that the doc comment for ucs_wcwidth()... > > > *- Spacing characters in the East Asian Wide (W) or East Asian > > * FullWidth (F) category as defined in Unicode Technical > > * Report #11 have a column widt

Re: WIP: Relaxing the constraints on numeric scale

2021-07-21 Thread Tom Lane
Dean Rasheed writes: > Attached is a more complete patch, with updated docs and tests. I took a brief look at this and have a couple of quick suggestions: * As you mention, keeping some spare bits in the typmod might come in handy some day, but as given this patch isn't really doing so. I think

Re: proposal: enhancing plpgsql debug API - returns text value of variable content

2021-07-21 Thread Pavel Stehule
Hi pá 16. 7. 2021 v 18:40 odesílatel Pavel Stehule napsal: > Hi > > pá 16. 7. 2021 v 15:05 odesílatel Aleksander Alekseev < > aleksan...@timescale.com> napsal: > >> Hi Pavel, >> >> > I would like to print content of variables - and now, I have to go some >> > deeper than I would like. I need to

Re: Git revision in tarballs

2021-07-21 Thread Tom Lane
Peter Eisentraut writes: > On 21.07.21 21:12, Daniel Gustafsson wrote: >>> Additionally the commit ID is stored in a global extended >>> pax header if the tar format is used; it can be extracted using git >>> get-tar-commit-id. In ZIP files it is stored as >>> a file comment. >> That does adds Gi

Re: psql - add SHOW_ALL_RESULTS option

2021-07-21 Thread Peter Eisentraut
On 15.07.21 17:46, Fabien COELHO wrote: The patch does not apply on Head anymore, could you rebase and post a patch. I'm changing the status to "Waiting for Author". Ok. I noticed. The patch got significantly broken by the watch pager commit. I also have to enhance the added tests (per Peter r

Re: Git revision in tarballs

2021-07-21 Thread Peter Eisentraut
On 21.07.21 21:12, Daniel Gustafsson wrote: Or we could do what git-archive does: Additionally the commit ID is stored in a global extended pax header if the tar format is used; it can be extracted using git get-tar-commit-id. In ZIP files it is stored as a file comment. That d

Re: Git revision in tarballs

2021-07-21 Thread Daniel Gustafsson
> On 21 Jul 2021, at 21:23, Tom Lane wrote: > FYI, the "put it into .gitrevision" solution is already implemented > in the new tarball-building script that Magnus and I have been > working on off-list. +1, I think that's the preferred option. -- Daniel Gustafsson https://vmware.co

Re: Git revision in tarballs

2021-07-21 Thread Tom Lane
Daniel Gustafsson writes: > On 21 Jul 2021, at 20:25, Peter Eisentraut > wrote: >> On 15.07.21 10:33, Magnus Hagander wrote: >>> I think it'd be useful to be able to identify exactly which git commit >>> was used to produce a tarball. >> Or we could do what git-archive does: >> Additionally the

Re: Git revision in tarballs

2021-07-21 Thread Daniel Gustafsson
> On 21 Jul 2021, at 20:25, Peter Eisentraut > wrote: > > On 15.07.21 10:33, Magnus Hagander wrote: >> I think it'd be useful to be able to identify exactly which git commit >> was used to produce a tarball. This would be especially useful when >> downloading snapshot tarballs where that's not e

Re: Git revision in tarballs

2021-07-21 Thread Peter Eisentraut
On 15.07.21 10:33, Magnus Hagander wrote: I think it'd be useful to be able to identify exactly which git commit was used to produce a tarball. This would be especially useful when downloading snapshot tarballs where that's not entirely clear, but can also be used to verify that the release tarba

Re: [POC] verifying UTF-8 using SIMD instructions

2021-07-21 Thread John Naylor
On Wed, Jul 21, 2021 at 11:29 AM Thomas Munro wrote: > Just for fun/experimentation, here's a quick (and probably too naive) > translation of those helper functions to NEON, on top of the v15 > patch. Neat! It's good to make it more architecture-agnostic, and I'm sure we can use quite a bit of t

Re: Have I found an interval arithmetic bug?

2021-07-21 Thread Bryn Llewellyn
> On 21-Jul-2021, at 01:23, Dean Rasheed wrote: > > On Wed, 21 Jul 2021 at 03:48, Bruce Momjian wrote: >> >> this example now gives me concern: >> >>SELECT INTERVAL '1.06 months 1 hour'; >> interval >>--- >> 1 mon 2 days 01:00:00 >> >>

Re: Added schema level support for publication.

2021-07-21 Thread vignesh C
On Wed, Jul 21, 2021 at 3:14 PM Rahila Syed wrote: > > > > On Mon, Jul 19, 2021 at 2:41 PM Greg Nancarrow wrote: >> >> On Fri, Jul 16, 2021 at 8:13 PM vignesh C wrote: >> > >> > Modified. >> > >> > Thanks for the comments, these issues are fixed as part of the v12 patch posted at [1]. >> > [1]

Re: Added schema level support for publication.

2021-07-21 Thread vignesh C
On Mon, Jul 19, 2021 at 2:41 PM Greg Nancarrow wrote: > > On Fri, Jul 16, 2021 at 8:13 PM vignesh C wrote: > > > > Modified. > > > > Thanks for the comments, these issues are fixed as part of the v12 patch > > posted at [1]. > > [1] - > > https://www.postgresql.org/message-id/CALDaNm3V9ny5dJM8

Re: Added schema level support for publication.

2021-07-21 Thread vignesh C
On Mon, Jul 19, 2021 at 9:32 AM tanghy.f...@fujitsu.com < tanghy.f...@fujitsu.com> wrote: > > On Friday, July 16, 2021 6:10 PM vignesh C > > On Wed, Jul 14, 2021 at 6:25 PM houzj.f...@fujitsu.com > > wrote: > > > > > > Wednesday, July 14, 2021 6:17 PM vignesh C wrote: > > > > On Tue, Jul 13, 202

Re: Have I found an interval arithmetic bug?

2021-07-21 Thread Tom Lane
Bryn Llewellyn writes: > On 21-Jul-2021, at 02:58, Tom Lane wrote: >> In general, considering that (most of?) the existing behavior has stood >> for decades, I think we need to tread VERY carefully about changing it. >> I don't want to see this patch changing any case that is not indisputably >>

Re: Printing backtrace of postgres processes

2021-07-21 Thread vignesh C
On Wed, Jul 21, 2021 at 3:52 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > > On Tue, Jul 13, 2021 at 9:03 PM vignesh C wrote: > > > > On Wed, May 12, 2021 at 2:27 AM Robert Haas wrote: > > > > > > Maybe we should have a role that is specifically for server debugging > >

Re: Have I found an interval arithmetic bug?

2021-07-21 Thread Bryn Llewellyn
> On 21-Jul-2021, at 02:58, Tom Lane wrote: > > Dean Rasheed writes: >> Hmm, looking at this whole thread, I have to say that I prefer the old >> behaviour of spilling down to lower units. > >> For example, with this patch: > >> SELECT '0.5 weeks'::interval; >> interval >> -- >> 4 days

Re: Case expression pushdown

2021-07-21 Thread Tom Lane
Gilles Darold writes: > I'm attaching the v5 patch again as it doesn't appears in the Latest > attachment list in the commitfest. So this has a few issues: 1. In foreign_expr_walker, you're failing to recurse to either the "arg" or "defresult" subtrees of a CaseExpr, so that it would fail to no

Re: speed up verifying UTF-8

2021-07-21 Thread John Naylor
On Wed, Jul 21, 2021 at 12:13 PM Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > It looks like the same utf8_advance function is good for both fast-path and for the slow path. > Then pg_utf8_verifychar could be removed altogether along with the corresponding IS_*_BYTE_LEAD macros. pg_utf

Re: refactoring basebackup.c

2021-07-21 Thread Robert Haas
On Wed, Jul 21, 2021 at 12:11 PM Mark Dilger wrote: > If you were going to support lots of formats, not just tar, you might want > the streamer class for each format to have a callback which sets up the > injector, rather than having CreateBackupStreamer do it directly. Even then, > having now

Re: Parallel scan with SubTransGetTopmostTransaction assert coredump

2021-07-21 Thread Robert Haas
On Wed, Jul 14, 2021 at 10:34 PM Greg Nancarrow wrote: > Unfortunately there is currently no test, code-comment, README or > developer-discussion that definitively determines which approach (v2 > vs v3/v4) is a valid fix for this issue. > We don't know if having both the transaction and active sn

Re: speed up verifying UTF-8

2021-07-21 Thread Vladimir Sitnikov
>I'm pretty confident this improvement is architecture-independent. Thanks for testing it with different architectures. It looks like the same utf8_advance function is good for both fast-path and for the slow path. Then pg_utf8_verifychar could be removed altogether along with the corresponding I

Re: refactoring basebackup.c

2021-07-21 Thread Mark Dilger
> On Jul 21, 2021, at 8:09 AM, Robert Haas wrote: > > A callback where? If you were going to support lots of formats, not just tar, you might want the streamer class for each format to have a callback which sets up the injector, rather than having CreateBackupStreamer do it directly. Even

Re: badly calculated width of emoji in psql

2021-07-21 Thread Jacob Champion
On Wed, 2021-07-21 at 00:08 +, Jacob Champion wrote: > On Mon, 2021-07-19 at 13:13 +0200, Laurenz Albe wrote: > > That could be adapted; the question is if the approach as such is > > desirable or not. This is necessarily a moving target, at the rate > > that emojis are created and added to Un

Re: shared-memory based stats collector

2021-07-21 Thread Andres Freund
Hi, On 2021-07-21 17:09:49 +0900, Kyotaro Horiguchi wrote: > At Mon, 19 Jul 2021 15:34:56 +0500, Ibrar Ahmed wrote > in > > The patch does not apply, and require rebase, > > Yeah, thank you very much for checking that. However, this patch is > now developed in Andres' GitHub repository. So I'

Re: [POC] verifying UTF-8 using SIMD instructions

2021-07-21 Thread Thomas Munro
On Sat, Mar 13, 2021 at 4:37 AM John Naylor wrote: > On Fri, Mar 12, 2021 at 9:14 AM Amit Khandekar wrote: > > I was not thinking about auto-vectorizing the code in > > pg_validate_utf8_sse42(). Rather, I was considering auto-vectorization > > inside the individual helper functions that you wrote

Re: refactoring basebackup.c

2021-07-21 Thread Robert Haas
On Tue, Jul 20, 2021 at 4:03 PM Mark Dilger wrote: > I was only imagining having a callback for injecting manifests or recovery > configurations. It is not necessary that this be done in the current patch > set, or perhaps ever. A callback where? I actually think the ideal scenario would be i

Re: postgresql.conf.sample missing units

2021-07-21 Thread John Naylor
On Mon, Jul 19, 2021 at 10:31 AM John Naylor wrote: > > On Mon, Jul 19, 2021 at 5:44 AM Pavel Luzanov wrote: > > > > Hello, > > > > I found that the start section of the postgresql.conf file is missing a > > description of two units: bytes (appeared in version 11) and > > microseconds (in version

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread Ronan Dunklau
Le mercredi 21 juillet 2021 15:45:15 CEST, vous avez écrit : > On Thu, 22 Jul 2021 at 00:28, Ronan Dunklau wrote: > > The attached patch does the following: > > - verify the opfamily is shippable to keep pathkeys > > - generate a correct order by clause using the actual operator. > > Thanks f

Re: Add proper planner support for ORDER BY / DISTINCT aggregates

2021-07-21 Thread Ronan Dunklau
Le mercredi 21 juillet 2021, 04:52:43 CEST David Rowley a écrit : > Thanks for finding this. I've made a few changes to make this case > work as you describe. Please see attached v6 patches. > > Because I had to add additional code to take the GROUP BY pathkeys > into account when choosing the be

Re: Bitmap reuse

2021-07-21 Thread David Rowley
On Thu, 22 Jul 2021 at 01:54, David Rowley wrote: > Maybe the planner would need to be involved in making the decision of > if the bitmap index scan should tuck away a carbon copy of the > resulting TIDBitmap after the first scan. That way on rescan we could > just make a copy of the cached versi

Re: Bitmap reuse

2021-07-21 Thread David Rowley
On Wed, 21 Jul 2021 at 13:32, Tom Lane wrote: > > David Rowley writes: > > I imagined Jeff was meaning the bitmap from the scan of foo_x_idx, not > > the combined ANDed bitmap from both indexes. > > To re-use that, you'd need a way to prevent the upper node from > destructively modifying the tidb

Re: add 'noError' to euc_tw_and_big5.c

2021-07-21 Thread John Naylor
On Tue, Jul 20, 2021 at 10:35 PM Michael Paquier wrote: > > On Wed, Jul 21, 2021 at 02:15:14AM +, wangyu...@fujitsu.com wrote: > > 'noError' argument was added at commit ea1b99a661, > > but it seems to be neglected in euc_tw_and_big5.c Line 289. > > please see the attachment. > > That sounds r

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread David Rowley
On Thu, 22 Jul 2021 at 00:28, Ronan Dunklau wrote: > The attached patch does the following: > - verify the opfamily is shippable to keep pathkeys > - generate a correct order by clause using the actual operator. Thanks for writing the patch. This is just a very superficial review. I've not

Re: Incorrect usage of strtol, atoi for non-numeric junk inputs

2021-07-21 Thread David Rowley
On Thu, 22 Jul 2021 at 00:44, Michael Paquier wrote: > > On Thu, Jul 22, 2021 at 12:32:39AM +1200, David Rowley wrote: > > I see both of these are limited to 64 on windows. Won't those fail on > > Windows? > > Yes, thanks, they would. I would just cut the range numbers from the > expected output

Re: when the startup process doesn't (logging startup delays)

2021-07-21 Thread Justin Pryzby
I think walkdir() should only call LogStartupProgress(FSYNC_IN_PROGRESS, path); when action == datadir_fsync_fname. ResetUnloggedRelations() is calling ResetUnloggedRelationsInTablespaceDir("base", op); before calling InitStartupProgress(). This shows StartupXLOG() calling ResetUnloggedRelations(

Re: Use extended statistics to estimate (Var op Var) clauses

2021-07-21 Thread Dean Rasheed
On Tue, 20 Jul 2021 at 19:28, Tomas Vondra wrote: > > > The new code in statext_is_compatible_clause_internal() is a little > > hard to follow because some of the comments aren't right > > I ended up doing something slightly different - examine_opclause_args > now "returns" a list of expressions,

Re: Incorrect usage of strtol, atoi for non-numeric junk inputs

2021-07-21 Thread Michael Paquier
On Thu, Jul 22, 2021 at 12:32:39AM +1200, David Rowley wrote: > I see both of these are limited to 64 on windows. Won't those fail on Windows? Yes, thanks, they would. I would just cut the range numbers from the expected output here. This does not matter in terms of coverage either. x> I also w

Re: Incorrect usage of strtol, atoi for non-numeric junk inputs

2021-07-21 Thread David Rowley
On Wed, 21 Jul 2021 at 23:50, Michael Paquier wrote: > Hacking on that, I am finishing with the attached. It is less > ambitious, still very useful as it removes a dozen of custom error > messages in favor of the two ones introduced in option_utils.c. On > top of that this reduces a bit the code

Re: Micro-optimizations to avoid some strlen calls.

2021-07-21 Thread Ranier Vilela
Em qua., 21 de jul. de 2021 às 07:44, David Rowley escreveu: > On Tue, 20 Jul 2021 at 10:49, Ranier Vilela wrote: > > There are some places, where strlen can have an overhead. > > This patch tries to fix this. > > I'm with Michael and David on this. > > I don't really feel like doing; > > - snpr

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread Ronan Dunklau
Le mercredi 21 juillet 2021, 11:05:14 CEST Ronan Dunklau a écrit : > Le mercredi 21 juillet 2021, 04:25:00 CEST David Rowley a écrit : > > Here the test claims that it wants to ensure that the order by using > > operator(public.<^) is not pushed down into the foreign scan. > > However, unless I'm m

Re: Incorrect usage of strtol, atoi for non-numeric junk inputs

2021-07-21 Thread Michael Paquier
On Wed, Jul 21, 2021 at 05:02:29PM +0900, Kyotaro Horiguchi wrote: > The difference is your suggestion is making the function output the > message within. I guess that the reason for the original proposal is > different style of message is required in several places. That's one step toward having

Re: add 'noError' to euc_tw_and_big5.c

2021-07-21 Thread John Naylor
On Tue, Jul 20, 2021 at 10:35 PM Michael Paquier wrote: > > On Wed, Jul 21, 2021 at 02:15:14AM +, wangyu...@fujitsu.com wrote: > > 'noError' argument was added at commit ea1b99a661, > > but it seems to be neglected in euc_tw_and_big5.c Line 289. > > please see the attachment. > > That sounds r

Re: when the startup process doesn't (logging startup delays)

2021-07-21 Thread Bharath Rupireddy
On Wed, Jul 21, 2021 at 12:52 PM Nitin Jadhav wrote: > Please find the v5 patch attached. Kindly let me know your comments. Thanks for the patch. Here are some comments on v5: 1) I still don't see the need for two functions LogStartupProgress and LogStartupProgressComplete. Most of the code is du

Re: CLUSTER on partitioned index

2021-07-21 Thread Laurenz Albe
On Tue, 2021-07-20 at 20:27 -0400, Alvaro Herrera wrote: > I have to wonder if there really *is* a use case for CLUSTER in the > first place on regular tables, let alone on partitioned tables, which > are likely to be large and thus take a lot of time. What justifies > spending so much time on thi

Re: logical replication empty transactions

2021-07-21 Thread Ajin Cherian
On Thu, Jul 15, 2021 at 3:50 PM osumi.takami...@fujitsu.com wrote: > I started to test this patch but will give you some really minor quick > feedbacks. > > (1) pg_logical_slot_get_binary_changes() params. > > Technically, looks better to have proto_version 3 & two_phase option for the > functio

Re: logical replication empty transactions

2021-07-21 Thread Ajin Cherian
On Mon, Jul 19, 2021 at 3:24 PM Peter Smith wrote: > 1a. Commit Comment - wording > updated. > > 1b. Commit Comment - wording > updated. > 2. doc/src/sgml/logicaldecoding.sgml - wording > > @@ -884,11 +884,19 @@ typedef void (*LogicalDecodePrepareCB) (struct > LogicalDecodingContext *ctx, >

Re: Micro-optimizations to avoid some strlen calls.

2021-07-21 Thread David Rowley
On Tue, 20 Jul 2021 at 10:49, Ranier Vilela wrote: > There are some places, where strlen can have an overhead. > This patch tries to fix this. I'm with Michael and David on this. I don't really feel like doing; - snprintf(buffer, sizeof(buffer), "E%s%s\n", + buflen = snprintf(buffer, sizeof(buf

Re: Printing backtrace of postgres processes

2021-07-21 Thread Bharath Rupireddy
On Tue, Jul 13, 2021 at 9:03 PM vignesh C wrote: > > On Wed, May 12, 2021 at 2:27 AM Robert Haas wrote: > > > > Maybe we should have a role that is specifically for server debugging > > type things. This kind of overlaps with Mark Dilger's proposal to try > > to allow SET for security-sensitive G

Re: postgres_fdw - make cached connection functions tests meaningful

2021-07-21 Thread Bharath Rupireddy
On Sat, Jul 17, 2021 at 9:37 PM Tom Lane wrote: > > Bharath Rupireddy writes: > > On Thu, Jul 15, 2021 at 3:48 AM Tom Lane wrote: > >> More generally, though, I am not sure that I believe the premise of > >> this patch. AFAICS it's assuming that forcing debug_discard_caches > >> off guarantees

Re: Numeric x^y for negative x

2021-07-21 Thread Dean Rasheed
On Tue, 20 Jul 2021 at 10:17, Yugo NAGATA wrote: > > This patch fixes numeric_power() to handle negative bases correctly and not > to raise an error "cannot take logarithm of a negative number", as well as a > bug that a result whose values is almost zero is incorrectly returend as 1. > The previo

Re: [PATCH] Use optimized single-datum tuplesort in ExecSort

2021-07-21 Thread David Rowley
On Wed, 21 Jul 2021 at 13:39, James Coleman wrote: > Thanks for doing the math measuring how much we could impact things. > > I'm +lots on getting this committed as is. Ok good. I plan on taking a final look at the v10 patch tomorrow morning NZ time (about 12 hours from now) and if all is well, I

Re: Have I found an interval arithmetic bug?

2021-07-21 Thread Tom Lane
Dean Rasheed writes: > Hmm, looking at this whole thread, I have to say that I prefer the old > behaviour of spilling down to lower units. > For example, with this patch: > SELECT '0.5 weeks'::interval; > interval > -- > 4 days > which I don't think is really an improvement. My expect

Re: Added schema level support for publication.

2021-07-21 Thread Rahila Syed
On Mon, Jul 19, 2021 at 2:41 PM Greg Nancarrow wrote: > On Fri, Jul 16, 2021 at 8:13 PM vignesh C wrote: > > > > Modified. > > > > Thanks for the comments, these issues are fixed as part of the v12 patch > posted at [1]. > > [1] - > https://www.postgresql.org/message-id/CALDaNm3V9ny5dJM8nofLGJ3

Re: Using each rel as both outer and inner for JOIN_ANTI

2021-07-21 Thread Richard Guo
On Fri, Jul 2, 2021 at 11:59 AM Zhihong Yu wrote: > > > On Thu, Jul 1, 2021 at 8:24 PM Richard Guo wrote: > >> >> On Thu, Jul 1, 2021 at 3:18 PM Ronan Dunklau >> wrote: >> >>> Le jeudi 1 juillet 2021, 09:09:38 CEST Ronan Dunklau a écrit : >>> > > Yes, thanks! I was making a big mistake here thi

Re: ORDER BY pushdowns seem broken in postgres_fdw

2021-07-21 Thread Ronan Dunklau
Le mercredi 21 juillet 2021, 04:25:00 CEST David Rowley a écrit : > Here the test claims that it wants to ensure that the order by using > operator(public.<^) is not pushed down into the foreign scan. > However, unless I'm mistaken, it seems there's a completely wrong > assumption there that the pl

Re: A problem about partitionwise join

2021-07-21 Thread Richard Guo
On Fri, Nov 27, 2020 at 8:05 PM Ashutosh Bapat wrote: > On Tue, Nov 10, 2020 at 2:43 PM Richard Guo > wrote: > > Thanks Anastasia. I've rebased the patch with latest master. > > > > To recap, the problem we are fixing here is when generating join clauses > > from equivalence classes, we only sel

Re: Have I found an interval arithmetic bug?

2021-07-21 Thread Dean Rasheed
On Wed, 21 Jul 2021 at 03:48, Bruce Momjian wrote: > > this example now gives me concern: > > SELECT INTERVAL '1.06 months 1 hour'; >interval > --- > 1 mon 2 days 01:00:00 > > Notice that it rounds the '1.06 months' to '1 mon 2 days', ra

Re: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE

2021-07-21 Thread Kyotaro Horiguchi
Hello, Kuroda-san. At Mon, 12 Jul 2021 04:05:21 +, "kuroda.hay...@fujitsu.com" wrote in > > Similary, the following sequence doesn't yield an error, which is > > expected. > > > > > EXEC SQL AT conn1 DECLARE stmt STATEMENT; > > > EXEC SQL AT conn2 EXECUTE stmt INTO ..; > > > > In this cas

Re: shared-memory based stats collector

2021-07-21 Thread Kyotaro Horiguchi
At Mon, 19 Jul 2021 15:34:56 +0500, Ibrar Ahmed wrote in > The patch does not apply, and require rebase, Yeah, thank you very much for checking that. However, this patch is now developed in Andres' GitHub repository. So I'm at a loss what to do for the failure.. regards. -- Kyotaro Horiguch

Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups?

2021-07-21 Thread Kyotaro Horiguchi
At Wed, 21 Jul 2021 11:23:20 +0900, Fujii Masao wrote in > I slightly modified the comments and pushed the patch. Thanks! Thank you for commiting this! regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Incorrect usage of strtol, atoi for non-numeric junk inputs

2021-07-21 Thread Kyotaro Horiguchi
At Thu, 15 Jul 2021 16:19:07 +0900, Michael Paquier wrote in > On Wed, Jul 14, 2021 at 11:02:47AM -0400, Alvaro Herrera wrote: > > No, this doesn't work. When the first word is something that is > > not to be translated (a literal parameter name), let's use a %s (but of > > course the values mu

Re: Re: parallel distinct union and aggregate support patch

2021-07-21 Thread bu...@sohu.com
Sorry, this email was marked spam by sohu, so I didn't notice it, and last few months I work hard for merge PostgreSQL 14 to our cluster version(github.com/ADBSQL/AntDB). I have an idea how to make "Parallel Redistribute" work, even under "Parallel Append" and "Nestloop". but "grouping sets" ca

  1   2   >