Unwanted file mode modification?

2023-01-08 Thread Japin Li
Hi, Commit 216a784829 change the src/backend/replication/logical/worker.c file mode from 0644 to 0755, which is unwanted, right? [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=216a784829c2c5f03ab0c43e009126cbb819e9b2 -- Regrads, Japin Li. ChengDu WenWu Information

Re: doc: add missing "id" attributes to extension packaging page

2023-01-08 Thread Brar Piening
On 09.01.2023 at 03:38, vignesh C wrote: There are couple of commitfest entries for this: https://commitfest.postgresql.org/41/4041/ https://commitfest.postgresql.org/41/4042/ Can one of them be closed? I've split the initial patch into two parts upon Álvaro's request in [1] so that we can

Re: Logical replication timeout problem

2023-01-08 Thread Amit Kapila
On Fri, Jan 6, 2023 at 12:35 PM Ashutosh Bapat wrote: > > + > +/* > + * We don't want to try sending a keepalive message after processing each > + * change as that can have overhead. Tests revealed that there is no > + * noticeable overhead in doing it after continuously

Re: missing indexes in indexlist with partitioned tables

2023-01-08 Thread David Rowley
On Tue, 6 Dec 2022 at 13:43, Arne Roland wrote: > That being said, attached patch should fix the issue reported below. I took a look over the v10 patch and ended up making adjustments to the tests. I didn't quite see the need for the test to be as extensive as you had them in v10. Neither join

Re: MultiXact\SLRU buffers configuration

2023-01-08 Thread Andrey Borodin
On Tue, Jan 3, 2023 at 5:02 AM vignesh C wrote: > does not apply on top of HEAD as in [1], please post a rebased patch: > Thanks! Here's the rebase. Best regards, Andrey Borodin. v24-0001-Divide-SLRU-buffers-into-8-associative-banks.patch Description: Binary data

Re: Infinite Interval

2023-01-08 Thread jian he
On Sun, Jan 8, 2023 at 4:22 AM Joseph Koshakow wrote: > On Sat, Jan 7, 2023 at 3:05 PM Joseph Koshakow wrote: > > > > On Sat, Jan 7, 2023 at 3:04 PM Joseph Koshakow > wrote: > > > > > > I think this patch is just about ready for review, except for the > > > following two questions: > > > 1.

Re: Amcheck verification of GiST and GIN

2023-01-08 Thread Andrey Borodin
On Sun, Jan 8, 2023 at 8:05 PM Andrey Borodin wrote: > > Please find the attached new version. In this patchset heapallindexed > flag is removed from GIN checks. > Uh... sorry, git-formatted wrong branch. Here's the correct version. Double checked. Best regards, Andrey Borodin.

Re: Amcheck verification of GiST and GIN

2023-01-08 Thread Andrey Borodin
Hi Jose, thank you for review and sorry for so long delay to answer. On Wed, Dec 14, 2022 at 4:19 AM Jose Arthur Benetasso Villanova wrote: > > > On Sun, 27 Nov 2022, Andrey Borodin wrote: > > > On Sun, Nov 27, 2022 at 1:29 PM Andrey Borodin > > wrote: > >> > > I was wrong. GIN check does

Strengthen pg_waldump's --save-fullpage tests

2023-01-08 Thread Bharath Rupireddy
Hi, A recent commit [1] added --save-fullpage option to pg_waldump to extract full page images (FPI) from WAL records and save them into files (one file per FPI) under a specified directory. While it added tests to check the LSN from the FPI file name and the FPI file contents, it missed to

Re: Fixing a couple of buglets in how VACUUM sets visibility map bits

2023-01-08 Thread Peter Geoghegan
On Sun, Jan 8, 2023 at 4:27 PM Peter Geoghegan wrote: > We're vulnerable to allowing "all-frozen but not all-visible" > inconsistencies because of two factors: this business with not passing > VISIBILITYMAP_ALL_VISIBLE along with VISIBILITYMAP_ALL_FROZEN to > visibilitymap_set(), *and* the use of

Re: doc: add missing "id" attributes to extension packaging page

2023-01-08 Thread vignesh C
On Mon, 9 Jan 2023 at 08:01, vignesh C wrote: > > On Wed, 4 Jan 2023 at 04:13, Karl O. Pinc wrote: > > > > On Tue, 3 Jan 2023 21:35:09 +0100 > > Brar Piening wrote: > > > > > On 02.01.2023 at 21:53, Karl O. Pinc wrote: > > > > If the author will look over my version of the patch I believe it >

Re: doc: add missing "id" attributes to extension packaging page

2023-01-08 Thread vignesh C
On Wed, 4 Jan 2023 at 04:13, Karl O. Pinc wrote: > > On Tue, 3 Jan 2023 21:35:09 +0100 > Brar Piening wrote: > > > On 02.01.2023 at 21:53, Karl O. Pinc wrote: > > > If the author will look over my version of the patch I believe it > > > can be approved and sent on to the committers. > > > >

Re: [PATCH] random_normal function

2023-01-08 Thread Tom Lane
I wrote: > Also, I tried running the new random.sql regression cases over > and over, and found that the "not all duplicates" test fails about > one time in 10 or so. We could probably tolerate that given > that the random test is marked "ignore" in parallel_schedule, but > I thought it best

Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation

2023-01-08 Thread Peter Geoghegan
On Thu, Dec 29, 2022 at 7:01 PM Peter Geoghegan wrote: > Attached is v2, which is just to fix bitrot. Attached is v3. We no longer apply vacuum_failsafe_age when determining the cutoff for antiwraparound autovacuuming -- the new approach is a bit simpler. This is a fairly small change overall.

Re: Fixing a couple of buglets in how VACUUM sets visibility map bits

2023-01-08 Thread Peter Geoghegan
On Sun, Jan 8, 2023 at 3:53 PM Andres Freund wrote: > How? See the commit message for the scenario I have in mind, which involves a concurrent HOT update that aborts. We're vulnerable to allowing "all-frozen but not all-visible" inconsistencies because of two factors: this business with not

Re: [PATCH] random_normal function

2023-01-08 Thread Tom Lane
I wrote: > So the problem in this patch is that it's trying to include > utils/float.h in a src/common file, where we have not included > postgres.h. Question is, why did you do that? (Ah, for M_PI ... but our practice is just to duplicate that #define where needed outside the backend.) I spent

Re: Fixing a couple of buglets in how VACUUM sets visibility map bits

2023-01-08 Thread Andres Freund
Hi, On 2023-01-08 14:39:19 -0800, Peter Geoghegan wrote: > One of the calls to visibilitymap_set() during VACUUM's initial heap > pass could unset a page's all-visible bit during the process of setting > the same page's all-frozen bit. How? visibilitymap_set() just adds flags, it doesn't remove

Re: Missing update of all_hasnulls in BRIN opclasses

2023-01-08 Thread Tomas Vondra
Thanks Justin! I've applied all the fixes you proposed, and (hopefully) improved a couple other comments. I've been working on this over the past couple days, trying to polish and commit it over the weekend - both into master and backbranches. Sadly, the backpatching part turned out to be a bit

Re: Fixing a couple of buglets in how VACUUM sets visibility map bits

2023-01-08 Thread Peter Geoghegan
On Mon, Jan 2, 2023 at 10:31 AM Peter Geoghegan wrote: > Would be helpful if I could get a +1 on > v1-0002-Never-just-set-the-all-frozen-bit-in-VM.patch, which is > somewhat more substantial than the others. There has been no response on this thread for over a full week at this point. I'm CC'ing

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-08 Thread David Rowley
On Mon, 9 Jan 2023 at 06:17, Ankit Kumar Pandey wrote: > I have addressed all points 1-6 in the attached patch. A few more things: 1. You're still using the 'i' variable in the foreach loop. foreach_current_index() will work. 2. I think the "index" variable needs a better name.

Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

2023-01-08 Thread Alexander Korotkov
Hi, Mason! Thank you very much for your review. On Sun, Jan 8, 2023 at 9:33 PM Mason Sharp wrote: > On Fri, Jan 6, 2023 at 4:46 AM Pavel Borisov wrote: >> Besides, the new version has only some minor changes in the comments >> and the commit message. > It looks good, and the greater the

Re: on placeholder entries in view rule action query's range table

2023-01-08 Thread Tom Lane
Amit Langote writes: > I've attached just the patch that we should move forward with, as > Alvaro might agree. I've looked at this briefly but don't like it very much, specifically the business about retroactively adding an RTE and RTEPermissionInfo into the view's replacement subquery. That

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-08 Thread David Rowley
On Mon, 9 Jan 2023 at 05:06, Vik Fearing wrote: > +EXPLAIN (COSTS OFF) > +SELECT empno, > + depname, > + min(salary) OVER (PARTITION BY depname ORDER BY empno) depminsalary, > + sum(salary) OVER (PARTITION BY depname) depsalary, > + count(*) OVER (ORDER BY enroll_date

[PATCH] basebackup: support zstd long distance matching

2023-01-08 Thread Justin Pryzby
In-Reply-To: <20220327205020.gm28...@telsasoft.com> On Sun, Mar 27, 2022 at 03:50:20PM -0500, Justin Pryzby wrote: > Here's a patch for zstd --long mode. Rebased. I'll add this to the CF. >From 8385f278e95d7bce7e5eed6bb8fccc1e1db9483d Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sun, 27

Re: drop postmaster symlink

2023-01-08 Thread Karl O. Pinc
On Sat, 7 Jan 2023 22:29:35 -0600 "Karl O. Pinc" wrote: > The only way I could think of to review a patch > that removes something is to report all the places > I looked where a reference to the symlink might be. I forgot to report that I also tried a `make install` and 'make uninstall`, with

Re: MERGE ... RETURNING

2023-01-08 Thread Isaac Morland
On Sun, 8 Jan 2023 at 07:28, Dean Rasheed wrote: So playing around with it (and inspired by the WITH ORDINALITY syntax > for SRFs), I had the idea of allowing "WITH WHEN CLAUSE" at the end of > the returning list, which adds an integer column to the list, whose > value is set to the index of the

Re: [RFC] Add jit deform_counter

2023-01-08 Thread Pavel Stehule
Hi > > I'm not sure why, but pgss jit metrics are always nulls for explain >> > > analyze queries. I have noticed this with surprise myself, when >> recently >> > > was reviewing the lazy jit patch, but haven't yet figure out what is >> the >> > > reason. Anyway, without "explain analyze" you'll

Re: Fix gin index cost estimation

2023-01-08 Thread Alexander Korotkov
On Sun, Jan 8, 2023 at 7:08 PM Tom Lane wrote: > Alexander Korotkov writes: > > I'm going to push this and backpatch to all supported versions if no > > objections. > > Push yes, but I'd counsel against back-patching. People don't > generally like unexpected plan changes in stable versions,

Re: Add LZ4 compression in pg_dump

2023-01-08 Thread Justin Pryzby
On Thu, Dec 22, 2022 at 11:08:59AM -0600, Justin Pryzby wrote: > There's a couple of lz4 bits which shouldn't be present in 002: file > extension and comments. There were "LZ4" comments and file extension stuff in the preparatory commit. But now it seems like you *removed* them in the LZ4 commit

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-08 Thread Vik Fearing
On 1/8/23 18:05, Ankit Kumar Pandey wrote: On 08/01/23 21:36, Vik Fearing wrote: On 1/8/23 11:21, Ankit Kumar Pandey wrote: Please find attached patch with addressed issues mentioned before. I am curious about this plan: +-- ORDER BY's in multiple Window functions can be combined

Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

2023-01-08 Thread Mason Sharp
On Fri, Jan 6, 2023 at 4:46 AM Pavel Borisov wrote: > Hi, Alexander! > > On Thu, 5 Jan 2023 at 15:11, Alexander Korotkov > wrote: > > > > On Wed, Jan 4, 2023 at 5:05 PM Alexander Korotkov > wrote: > > > On Wed, Jan 4, 2023 at 3:43 PM Pavel Borisov > wrote: > > > > One more update of a

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-08 Thread Ankit Kumar Pandey
On 08/01/23 16:33, David Rowley wrote: On Sun, 8 Jan 2023 at 23:21, Ankit Kumar Pandey wrote: Please find attached patch with addressed issues mentioned before. Here's a quick review: 1. You can use foreach_current_index(l) to obtain the index of the list element. 2. I'd rather see you

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-08 Thread Ankit Kumar Pandey
On 08/01/23 21:36, Vik Fearing wrote: On 1/8/23 11:21, Ankit Kumar Pandey wrote: Please find attached patch with addressed issues mentioned before. I am curious about this plan: +-- ORDER BY's in multiple Window functions can be combined into one +-- if they are subset of QUERY's

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-01-08 Thread Justin Pryzby
On Sat, Dec 17, 2022 at 08:30:02AM -0600, Justin Pryzby wrote: > We have the common problem of too many patches. > > https://www.postgresql.org/message-id/a15f904a70924ffa4ca25c3c744cff31e0e6e143.camel%40gmail.com > This changes the progress reporting to show indirect children as > "total", and

Re: Fix gin index cost estimation

2023-01-08 Thread Tom Lane
Alexander Korotkov writes: > I'm going to push this and backpatch to all supported versions if no > objections. Push yes, but I'd counsel against back-patching. People don't generally like unexpected plan changes in stable versions, and that's what a costing change could produce. There's no

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-08 Thread Vik Fearing
On 1/8/23 11:21, Ankit Kumar Pandey wrote: Please find attached patch with addressed issues mentioned before. I am curious about this plan: +-- ORDER BY's in multiple Window functions can be combined into one +-- if they are subset of QUERY's ORDER BY +EXPLAIN (COSTS OFF) +SELECT empno, +

Re: [Commitfest 2023-01] has started

2023-01-08 Thread vignesh C
On Tue, 3 Jan 2023 at 13:13, vignesh C wrote: > > Hi All, > > Just a reminder that Commitfest 2023-01 has started. > There are many patches based on the latest run from [1] which require > a) Rebased on top of head b) Fix compilation failures c) Fix test > failure, please have a look and rebase

MERGE ... RETURNING

2023-01-08 Thread Dean Rasheed
I've been thinking about adding RETURNING support to MERGE in order to let the user see what changed. I considered allowing a separate RETURNING list at the end of each action, but rapidly dismissed that idea. Firstly, it introduces shift/reduce conflicts to the grammar. These can be resolved by

Re: Fix gin index cost estimation

2023-01-08 Thread Alexander Korotkov
On Tue, Dec 6, 2022 at 1:22 PM Ronan Dunklau wrote: > Le vendredi 2 décembre 2022, 13:58:27 CET Ronan Dunklau a écrit : > > Le vendredi 2 décembre 2022, 12:33:33 CET Alexander Korotkov a écrit : > > > Hi, Ronan! > > > Thank you for your patch. Couple of quick questions. > > > 1) What magic

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-08 Thread David Rowley
On Sun, 8 Jan 2023 at 23:21, Ankit Kumar Pandey wrote: > Please find attached patch with addressed issues mentioned before. Here's a quick review: 1. You can use foreach_current_index(l) to obtain the index of the list element. 2. I'd rather see you looping backwards over the list in the first

Re: [RFC] Add jit deform_counter

2023-01-08 Thread Pavel Stehule
ne 8. 1. 2023 v 11:57 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Sat, Jan 07, 2023 at 07:09:11PM +0100, Pavel Stehule wrote: > > so 7. 1. 2023 v 16:48 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > > napsal: > > > > > > On Fri, Jan 06, 2023 at 09:42:09AM +0100, Pavel

Re: [RFC] Add jit deform_counter

2023-01-08 Thread Dmitry Dolgov
> On Sat, Jan 07, 2023 at 07:09:11PM +0100, Pavel Stehule wrote: > so 7. 1. 2023 v 16:48 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > > > > On Fri, Jan 06, 2023 at 09:42:09AM +0100, Pavel Stehule wrote: > > > The explain part is working, the part of pg_stat_statements doesn't > > >

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-08 Thread Ankit Kumar Pandey
Hi David, Please find attached patch with addressed issues mentioned before. Things resolved: 1. Correct position of window function from where order by push down can happen is determined, this fixes issue mentioned in case #1. While writing test cases, I found that optimization do not