Re: Clarify restriction on partitioned tables primary key / unique indexes

2022-09-04 Thread David Rowley
On Fri, 2 Sept 2022 at 22:06, David Rowley wrote: > Thanks. I ended up adjusting it to: > > "To create a unique or primary key constraint on a partitioned table," and pushed. Thanks for having a look at this Erik. David

Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2022-09-04 Thread Tomas Vondra
On 9/5/22 06:32, Amit Kapila wrote: > On Sun, Sep 4, 2022 at 7:38 PM Tomas Vondra > wrote: >> >> On 9/4/22 14:24, Tomas Vondra wrote: >>> As per my understanding, the problem I reported in the email [1] is the same and we have seen this in BF failures as well. I posted a way to >

Re: POC: GROUP BY optimization

2022-09-04 Thread Michael Paquier
On Mon, Sep 05, 2022 at 12:14:48AM +0200, Tomas Vondra wrote: > I've pushed the fix to 15+master. In the end I just used David's patches > that set parallel_setup_cost to 0. Thanks, Tomas! -- Michael signature.asc Description: PGP signature

Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2022-09-04 Thread Amit Kapila
On Sun, Sep 4, 2022 at 11:10 PM Tomas Vondra wrote: > > On 9/4/22 16:08, Tomas Vondra wrote: > > ... > > > > so in fact we *know* 849 is a subxact of 848, but we don't call > > ReorderBufferAssignChild in this case. In fact we can't even do the > > assignment easily in this case, because we create

Re: Asynchronous execution support for Custom Scan

2022-09-04 Thread Etsuro Fujita
On Fri, Sep 2, 2022 at 10:43 PM Kazutaka Onishi wrote: > The asynchronous version "ctidscan" plugin is ready. Thanks for that! I looked at the extended version quickly. IIUC, it uses the proposed APIs, but actually executes ctidscans *synchronously*, so it does not improve performance. Right?

Re: Refactoring postgres_fdw/connection.c

2022-09-04 Thread Etsuro Fujita
On Tue, Jul 26, 2022 at 4:25 PM Kyotaro Horiguchi wrote: > At Tue, 26 Jul 2022 00:54:47 +0900, Fujii Masao > wrote in > > There are two functions, pgfdw_get_result() and > > pgfdw_get_cleanup_result(), > > to get a query result. They have almost the same code, call > > PQisBusy(), > > WaitLatchO

Re: SQL/JSON features for v15

2022-09-04 Thread Amit Langote
On Fri, Sep 2, 2022 at 8:56 PM Justin Pryzby wrote: > On Wed, Aug 31, 2022 at 03:51:18PM +0900, Amit Langote wrote: > > Finally, I get this warning: > > > > execExprInterp.c: In function ‘ExecJsonCoerceCStringToText’: > > execExprInterp.c:4765:3: warning: missing braces around initializer > > [-Wm

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-04 Thread Michael Paquier
On Sun, Sep 04, 2022 at 06:52:37AM -0700, Zhihong Yu wrote: > Please take a look at patch v3. Fine as far as it goes. I would have put the initialization of search_message closer to ldap_search_s() for consistency with libpq. That's what we do with ldap_search_st(). -- Michael signature.asc Des

Re: pg15b3: recovery fails with wal prefetch enabled

2022-09-04 Thread Kyotaro Horiguchi
(the previous mail was crossing with yours..) At Mon, 05 Sep 2022 14:15:27 +0900 (JST), Kyotaro Horiguchi wrote in me> +1 for showing any message for the failure, but I think we shouldn't me> hide an existing message if any. At Mon, 5 Sep 2022 16:54:07 +1200, Thomas Munro wrote in > On refl

Re: pg15b3: recovery fails with wal prefetch enabled

2022-09-04 Thread Kyotaro Horiguchi
At Mon, 5 Sep 2022 13:28:12 +1200, Thomas Munro wrote in > I had this more or less figured out on Friday when I wrote last, but I > got stuck on a weird problem with 026_overwrite_contrecord.pl. I > think that failure case should report an error, no? I find it strange > that we end recovery in

Re: pg15b3: recovery fails with wal prefetch enabled

2022-09-04 Thread Thomas Munro
On Mon, Sep 5, 2022 at 1:28 PM Thomas Munro wrote: > I had this more or less figured out on Friday when I wrote last, but I > got stuck on a weird problem with 026_overwrite_contrecord.pl. I > think that failure case should report an error, no? I find it strange > that we end recovery in silence

Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2022-09-04 Thread Amit Kapila
On Sun, Sep 4, 2022 at 7:38 PM Tomas Vondra wrote: > > On 9/4/22 14:24, Tomas Vondra wrote: > > > >> As per > >> my understanding, the problem I reported in the email [1] is the same > >> and we have seen this in BF failures as well. I posted a way to > >> reproduce it in that email. It seems this

Re: Handle infinite recursion in logical replication setup

2022-09-04 Thread Peter Smith
Here are my review comments for v45-0001: == 1. doc/src/sgml/logical-replication.sgml To find which tables might potentially include non-local origins (due to other subscriptions created on the publisher) try this SQL query: SELECT DISTINCT N.nspname AS schemaname, C.relname AS tab

RE: Column Filtering in Logical Replication

2022-09-04 Thread shiy.f...@fujitsu.com
On Mon, Sep 5, 2022 8:28 AM Peter Smith wrote: > > I have rebased the remaining patch (v6-0001 is the same as v5-0002) > Thanks for updating the patch. Here are some comments. 1. + the will be successful but later + the WalSender on the publisher, or the subscriber may throw an error.

Re: Postmaster self-deadlock due to PLT linkage resolution

2022-09-04 Thread Thomas Munro
On Wed, Aug 31, 2022 at 1:34 AM Thomas Munro wrote: > On Wed, Aug 31, 2022 at 12:26 AM Robert Haas wrote: > > On Tue, Aug 30, 2022 at 8:17 AM Thomas Munro wrote: > > > FWIW I suspect FreeBSD can't break like this in a program linked with > > > libthr, because it has a scheme for deferring signal

Re: pg15b3: recovery fails with wal prefetch enabled

2022-09-04 Thread Thomas Munro
On Fri, Sep 2, 2022 at 6:20 PM Thomas Munro wrote: > ... The active ingredient here is a setting of > maintenance_io_concurency=0, which runs into a dumb accounting problem > of the fencepost variety and incorrectly concludes it's reached the > end early. Setting it to 3 or higher allows his syst

Re: POC: GROUP BY optimization

2022-09-04 Thread Jonathan S. Katz
On 9/4/22 6:14 PM, Tomas Vondra wrote: I've pushed the fix to 15+master. In the end I just used David's patches that set parallel_setup_cost to 0. Thanks! I have closed the open item. Jonathan OpenPGP_signature Description: OpenPGP digital signature

Re: Column Filtering in Logical Replication

2022-09-04 Thread Peter Smith
On Fri, Sep 2, 2022 at 11:40 PM Amit Kapila wrote: > > On Fri, Sep 2, 2022 at 8:45 AM Peter Smith wrote: > > > > On Thu, Sep 1, 2022 at 7:53 PM Amit Kapila wrote: > > > > > > On Fri, Aug 26, 2022 at 7:33 AM Peter Smith wrote: > > > > > > > > > > Few comments on both the patches: > > > v4-0001*

Re: Different compression methods for FPI

2022-09-04 Thread Justin Pryzby
On Fri, Sep 02, 2022 at 06:55:11AM -0500, Justin Pryzby wrote: > On Sun, Jun 13, 2021 at 08:24:12PM -0500, Justin Pryzby wrote: > > In this patch series, I added compression information to the errcontext from > > xlog_block_info(), and allow specifying compression levels like zlib-2. > > I'll > >

Re: POC: GROUP BY optimization

2022-09-04 Thread Tomas Vondra
On 9/1/22 16:05, Jonathan S. Katz wrote: > On 9/1/22 9:06 AM, Tomas Vondra wrote: >> >> >> On 8/30/22 15:15, Jonathan S. Katz wrote: >>> On 8/18/22 3:29 AM, Tomas Vondra wrote: On 8/18/22 03:32, David Rowley wrote: >>> > Here are a couple of patches to demo the idea. > >

Re: [RFC] building postgres with meson - v12

2022-09-04 Thread Andres Freund
Hi, On 2022-09-04 13:12:52 +0700, John Naylor wrote: > On Fri, Sep 2, 2022 at 11:35 PM Andres Freund wrote: > > > > Hi, > > > > On 2022-09-02 14:17:26 +0700, John Naylor wrote: > > > On Thu, Sep 1, 2022 at 1:12 AM Andres Freund wrote: > > > > [v12] > > > > > > +# Build a small utility static lib

Re: First draft of the PG 15 release notes

2022-09-04 Thread Nathan Bossart
I noticed that the v15 release notes still refer to pg_checkpointer, which was renamed to pg_checkpoint in b9eb0ff. diff --git a/doc/src/sgml/release-15.sgml b/doc/src/sgml/release-15.sgml index d432c2db44..362728753a 100644 --- a/doc/src/sgml/release-15.sgml +++ b/doc/src/sgml/release-15.sgml @@

Re: build remaining Flex files standalone

2022-09-04 Thread Andres Freund
Hi, On 2022-09-04 12:16:10 +0700, John Naylor wrote: > Pushed 01 and 02 separately, then squashed and pushed the rest. Thanks a lot! It does look a good bit cleaner to me now. I think, as a followup improvement, we should move gramparse.h to src/backend/parser, and stop installing gram.h, grampa

Re: First draft of the PG 15 release notes

2022-09-04 Thread Jonathan S. Katz
On 5/10/22 11:44 AM, Bruce Momjian wrote: I have completed the first draft of the PG 15 release notes I assume there will be major adjustments in the next few weeks based on feedback. I wanted to propose the "major enhancements" section to see if we can get an iteration in prior to Beta 4.

Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2022-09-04 Thread Tomas Vondra
On 9/4/22 16:08, Tomas Vondra wrote: > ... > > so in fact we *know* 849 is a subxact of 848, but we don't call > ReorderBufferAssignChild in this case. In fact we can't even do the > assignment easily in this case, because we create the subxact first, so > that the crash happens right when we atte

Re: failing to build preproc.c on solaris with sun studio

2022-09-04 Thread Noah Misch
On Sun, Sep 04, 2022 at 10:55:43AM -0400, Tom Lane wrote: > There'd need to be a separate discussion around how much to > encourage buildfarm owners to add --with-ecpg to their > configurations. One thing that would make that easier is > adding --with-ecpg as a no-op option to the back branches, >

Re: failing to build preproc.c on solaris with sun studio

2022-09-04 Thread Tom Lane
Andrew Dunstan writes: > On 2022-09-04 Su 09:56, Tom Lane wrote: >> You would need to make the ecpg-check step >> conditional, though, so it's moot: we'd have to fix the buildfarm >> first in any case, unless it's default-enabled which would seem >> a bit odd. > *nod* I guess we could proceed li

Re: failing to build preproc.c on solaris with sun studio

2022-09-04 Thread Andrew Dunstan
On 2022-09-04 Su 09:56, Tom Lane wrote: > Andrew Dunstan writes: >> On 2022-09-02 Fr 13:56, Tom Lane wrote: >>> ... However, those aren't arguments against >>> making it optional-to-build like the PLs are. >> That seems reasonable. Note that the buildfarm client would then need an >> extra build

Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2022-09-04 Thread Tomas Vondra
On 9/4/22 14:24, Tomas Vondra wrote: > > > On 9/4/22 13:49, Amit Kapila wrote: >> On Sun, Sep 4, 2022 at 4:34 PM Tomas Vondra >> wrote: >>> >>> I've been running some valgrind tests on rpi4/aarch64, and I get a crash >>> in test_decoding ddl test in ~50% runs. I don't see the same failure >>> wi

Re: failing to build preproc.c on solaris with sun studio

2022-09-04 Thread Tom Lane
Andrew Dunstan writes: > On 2022-09-02 Fr 13:56, Tom Lane wrote: >> ... However, those aren't arguments against >> making it optional-to-build like the PLs are. > That seems reasonable. Note that the buildfarm client would then need an > extra build step. Not sure why there'd be an extra build s

Re: failing to build preproc.c on solaris with sun studio

2022-09-04 Thread Andrew Dunstan
On 2022-09-02 Fr 13:56, Tom Lane wrote: > Andres Freund writes: >> I also wonder if we shouldn't just make ecpg optional at some point. Or even >> move it out of the tree. > The reason it's in the tree is to ensure its grammar stays in sync > with the core grammar, and perhaps more to the point,

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-04 Thread Zhihong Yu
On Sun, Sep 4, 2022 at 3:58 AM Zhihong Yu wrote: > > > On Sun, Sep 4, 2022 at 12:25 AM Michael Paquier > wrote: > >> On Sun, Sep 04, 2022 at 01:52:10AM -0400, Tom Lane wrote: >> > I can't get too excited about this. All of the error exit paths in >> > backend authentication code will lead immed

Re: Latest build fails

2022-09-04 Thread Ranier Vilela
Em dom., 4 de set. de 2022 às 09:58, Ranier Vilela escreveu: > > Now I have some trouble in c.h with one my tools: > Windows 10 64 bits > msvc 2019 64 bits > #error must have a working 64-bit integer datatype > Nevermind , found the cause. regards, Ranier Vilela

Latest build fails

2022-09-04 Thread Ranier Vilela
Hi, The latest build fails. https://github.com/postgres/postgres/runs/8176044869 In file included from /tmp/cpluspluscheck.ggpN3I/test.cpp:3:[11:12:13.290] /tmp/cirrus-ci-build/contrib/cube/cubeparse.h:77:19: error: ‘NDBOX’ was not declared in this scope[11:12:13.290]77 | int cube_yyparse (ND

Re: Fix typo function circle_same (src/backend/utils/adt/geo_ops.c)

2022-09-04 Thread Ranier Vilela
Em sáb., 3 de set. de 2022 às 19:39, Daniel Gustafsson escreveu: > > On 3 Sep 2022, at 09:36, Julien Rouhaud wrote: > > > Yeah, there are unfortunately a lot of problems around those and NaN, > with > > multiple reports in the past (I recall [1] and [2] but there were > others). > > NaNs are ind

Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2022-09-04 Thread Tomas Vondra
On 9/4/22 13:49, Amit Kapila wrote: > On Sun, Sep 4, 2022 at 4:34 PM Tomas Vondra > wrote: >> >> I've been running some valgrind tests on rpi4/aarch64, and I get a crash >> in test_decoding ddl test in ~50% runs. I don't see the same failure >> without valgrind or on 32-bit system (hundreds of

Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2022-09-04 Thread Amit Kapila
On Sun, Sep 4, 2022 at 4:34 PM Tomas Vondra wrote: > > I've been running some valgrind tests on rpi4/aarch64, and I get a crash > in test_decoding ddl test in ~50% runs. I don't see the same failure > without valgrind or on 32-bit system (hundreds of runs, no crashes), so > I suspect this is a rac

Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP.

2022-09-04 Thread Amit Kapila
On Sun, Sep 4, 2022 at 1:48 PM Alvaro Herrera wrote: > > On 2022-Mar-22, Amit Kapila wrote: > > > Add ALTER SUBSCRIPTION ... SKIP. > > There are two messages here that seem oddly worded. > > msgid "start skipping logical replication transaction finished at %X/%X" > msgid "done skipping logical rep

TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2022-09-04 Thread Tomas Vondra
Hi, I've been running some valgrind tests on rpi4/aarch64, and I get a crash in test_decoding ddl test in ~50% runs. I don't see the same failure without valgrind or on 32-bit system (hundreds of runs, no crashes), so I suspect this is a race condition, and with valgrind the timing changes in a wa

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-04 Thread Zhihong Yu
On Sun, Sep 4, 2022 at 12:25 AM Michael Paquier wrote: > On Sun, Sep 04, 2022 at 01:52:10AM -0400, Tom Lane wrote: > > I can't get too excited about this. All of the error exit paths in > > backend authentication code will lead immediately to process exit, so > > the possibility of some memory b

[BUG] Storage declaration in ECPG

2022-09-04 Thread Andrey Sokolov
Hi, The ECPG preprocessor converts the code"static VARCHAR str1[10], str2[20], str3[30];"into"static  struct varchar_1  { int len; char arr[ 10 ]; }  str1 ; struct varchar_2  { int len; char arr[ 20 ]; }  str2 ; struct varchar_3  { int len; char arr[ 30 ]; }  str3 ;".Storage declara

Re: Add 64-bit XIDs into PostgreSQL 15

2022-09-04 Thread Dilip Kumar
On Sun, Sep 4, 2022 at 9:53 AM Dilip Kumar wrote: > > On Mon, Jul 18, 2022 at 2:54 PM Pavel Borisov wrote: > >> > >> > I can agree with you that sending rebased patches too often can be a > >> > little annoying. On the other hand, otherwise, it's just red in Cfbot. I > >> > suppose it's much ea

Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP.

2022-09-04 Thread Alvaro Herrera
On 2022-Mar-22, Amit Kapila wrote: > Add ALTER SUBSCRIPTION ... SKIP. There are two messages here that seem oddly worded. msgid "start skipping logical replication transaction finished at %X/%X" msgid "done skipping logical replication transaction finished at %X/%X" Two complaints here. First,

Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

2022-09-04 Thread Ibrar Ahmed
On Sat, Sep 3, 2022 at 12:09 PM Julien Rouhaud wrote: > Hi, > > On Sat, Sep 03, 2022 at 10:36:37AM +0500, Ibrar Ahmed wrote: > > > > Hi Kyotaro Horiguchi, Fabien Coelho, Daniel Gustafsson, > > > > Since you haven't had time to write a review the last many days, the > author > > replied > > with a

Re: pgsql: Prefetch data referenced by the WAL, take II.

2022-09-04 Thread Alvaro Herrera
On 2022-Apr-07, Thomas Munro wrote: > Prefetch data referenced by the WAL, take II. I propose a small wording change in guc.c, diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 9fbbfb1be5..9803741708 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/m

Re: pgsql: pg_collation_actual_version() -> pg_collation_current_version().

2022-09-04 Thread Alvaro Herrera
On 2021-Feb-26, Thomas Munro wrote: > On Thu, Feb 25, 2021 at 10:49 PM Peter Eisentraut > wrote: > > Seeing that explanation, I think that's even more of a reason to avoid > > the name "current" and use something strikingly different. > > > > In any case, this function name has been around for s

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-04 Thread Michael Paquier
On Sun, Sep 04, 2022 at 01:52:10AM -0400, Tom Lane wrote: > I can't get too excited about this. All of the error exit paths in > backend authentication code will lead immediately to process exit, so > the possibility of some memory being leaked really has no consequences > worth worrying about. I