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

2022-12-12 Thread David Rowley
On Wed, 9 Nov 2022 at 14:58, David Rowley wrote: > v2 attached. I've been looking at this again and this time around understand why the * 1.5 pessimism factor was included in the incremental sort code. If we create a table with a very large skew in the number of rows per what will be our

Use get_call_result_type() more widely

2022-12-12 Thread Bharath Rupireddy
Hi, A review comment in another thread [1] by Michael Paquier about the usage of get_call_result_type() instead of explicit building of TupleDesc made me think about using it more widely. Actually, the get_call_result_type() looks at the function definitions to figure the column names and build

Re: Add sub-transaction overflow status in pg_stat_activity

2022-12-12 Thread Julien Rouhaud
On Tue, Dec 13, 2022 at 5:09 AM Dilip Kumar wrote: > > On Mon, Dec 12, 2022 at 11:21 PM Robert Haas wrote: > > > > On Mon, Dec 12, 2022 at 12:42 PM Justin Pryzby wrote: > > > diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml > > > index 4efa1d5fca0..ac15e2ce789 100644 > >

Re: refactor ExecGrant_*() functions

2022-12-12 Thread Peter Eisentraut
On 12.12.22 10:44, Antonin Houska wrote: Peter Eisentraut wrote: On 06.12.22 09:41, Antonin Houska wrote: Attached are my proposals for improvements. One is to avoid memory leak, the other tries to improve readability a little bit. I added the readability improvement to my v2 patch. The

Re: Force streaming every change in logical decoding

2022-12-12 Thread Peter Smith
On Tue, Dec 13, 2022 at 2:33 PM Peter Smith wrote: > > On Tue, Dec 6, 2022 at 5:23 PM shiy.f...@fujitsu.com > wrote: > > > > Hi hackers, > > > > In logical decoding, when logical_decoding_work_mem is exceeded, the > > changes are > > sent to output plugin in streaming mode. But there is a

Re: [PoC] Federated Authn/z with OAUTHBEARER

2022-12-12 Thread Andrey Chudnovsky
> The server hook is the right place to check the scopes, yes, but I think > the DBA should be able to specify what those scopes are to begin with. > The provider of the extension shouldn't be expected by the architecture > to hardcode those decisions, even if Azure AD chooses to short-circuit >

Remove SHA256_HMAC_B from scram-common.h

2022-12-12 Thread Michael Paquier
Hi all, While doing some hackery on SCRAM, I have noticed $subject giving the attached. I guess that this is not going to cause any objections, but feel free to comment just in case. Thanks, -- Michael diff --git a/src/include/common/scram-common.h b/src/include/common/scram-common.h index

RE: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Takamichi Osumi (Fujitsu)
On Tuesday, December 13, 2022 1:27 PM Kyotaro Horiguchi wrote: > At Tue, 13 Dec 2022 02:28:49 +, "Takamichi Osumi (Fujitsu)" > wrote in > > On Wednesday, December 7, 2022 12:00 PM Kyotaro Horiguchi > wrote: > > > > We couldn't reproduce this failure and find the same type of failure > > on

Re: Progress report of CREATE INDEX for nested partitioned tables

2022-12-12 Thread Justin Pryzby
On Mon, Dec 12, 2022 at 11:39:23PM +0400, Ilya Gladyshev wrote: > > > Could you check what I've written as a counter-proposal ? > > I think that this might be a good solution to start with, it gives us the > opportunity to improve the granularity later without any surprising changes > for the

Re: Add index scan progress to pg_stat_progress_vacuum

2022-12-12 Thread Imseih (AWS), Sami
Thanks for the feedback. I agree with the feedback, except for >need to have ParallelVacuumProgress. I see >parallel_vacuum_update_progress() uses this value but I think it's >better to pass ParallelVacuumState to via IndexVacuumInfo. I was trying to avoid passing a pointer to

Re: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Kyotaro Horiguchi
At Tue, 13 Dec 2022 02:28:49 +, "Takamichi Osumi (Fujitsu)" wrote in > On Wednesday, December 7, 2022 12:00 PM Kyotaro Horiguchi > wrote: > > We couldn't reproduce this failure and > find the same type of failure on the cfbot from the past failures. > It seems no subtests run in your

Re: Add sub-transaction overflow status in pg_stat_activity

2022-12-12 Thread Dilip Kumar
On Mon, Dec 12, 2022 at 11:21 PM Robert Haas wrote: > > On Mon, Dec 12, 2022 at 12:42 PM Justin Pryzby wrote: > > diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml > > index 4efa1d5fca0..ac15e2ce789 100644 > > --- a/doc/src/sgml/monitoring.sgml > > +++

Re: Force streaming every change in logical decoding

2022-12-12 Thread Peter Smith
On Tue, Dec 6, 2022 at 5:23 PM shiy.f...@fujitsu.com wrote: > > Hi hackers, > > In logical decoding, when logical_decoding_work_mem is exceeded, the changes > are > sent to output plugin in streaming mode. But there is a restriction that the > minimum value of logical_decoding_work_mem is 64kB.

Re: Support logical replication of DDLs

2022-12-12 Thread li jie
I noticed that the issue of ownership seems to have not been considered. For example, if a user 'a' from the publishing side creates a table t1, the owner of t1 is not user 'a' after it is replicated to the subscribing side. This is a situation that has not been encountered in previous DML

RE: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Takamichi Osumi (Fujitsu)
On Wednesday, December 7, 2022 12:00 PM Kyotaro Horiguchi wrote: > At Tue, 6 Dec 2022 11:08:43 -0800, Andres Freund wrote > in > > Hi, > > > > The tests fail on cfbot: > > https://cirrus-ci.com/task/4533866329800704 > > > > They only seem to fail on 32bit linux. > > > >

Re: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Kyotaro Horiguchi
At Mon, 12 Dec 2022 18:10:00 +0530, Amit Kapila wrote in > On Mon, Dec 12, 2022 at 1:04 PM Hayato Kuroda (Fujitsu) > wrote: > > once and apply later. Our basic design is as follows: > > > > * All transactions areserialized to files if min_apply_delay is set to > > non-zero. > > * After

Re: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Kyotaro Horiguchi
Hello. At Mon, 12 Dec 2022 07:42:30 +, "Takamichi Osumi (Fujitsu)" wrote in > On Monday, December 12, 2022 2:54 PM Kyotaro Horiguchi > wrote: > > I asked about unexpected walsender termination caused by this feature but I > > think I didn't received an answer for it and the behavior is

Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

2022-12-12 Thread Thomas Munro
On Mon, Dec 12, 2022 at 4:43 PM Thomas Munro wrote: > On Mon, Dec 12, 2022 at 4:07 PM Tom Lane wrote: > > I'm for "turn the warning off". Per previous discussion, adhering > > strictly to that rule would make our code worse (less legible AND > > less safe), not better. > > Alright, this seems

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-12 Thread Peter Geoghegan
On Mon, Dec 12, 2022 at 3:47 PM Jeff Davis wrote: > Freezing is driven by a need to keep the age of the oldest > transaction ID in a table to less than ~2B; and also the need to > truncate the clog (and reduce lookups of really old xids). It's fine to > give a brief explanation about why we can't

Re: slab allocator performance issues

2022-12-12 Thread David Rowley
Thanks for testing the patch. On Mon, 12 Dec 2022 at 20:14, John Naylor wrote: > v13-0001 to 0005: > 2.60% postgres postgres [.] SlabFree > + v4 slab: >4.98% postgres postgres [.] SlabFree > > While allocation is markedly improved, freeing looks worse here.

Re: Date-Time dangling unit fix

2022-12-12 Thread Joseph Koshakow
On Mon, Dec 12, 2022 at 10:55 AM Joseph Koshakow wrote: > > I just found another class of this bug that the submitted patch does > not fix. If the units are at the beginning of the string, then they are > also ignored. For example, `date 'm d y2020m11d3'` is also valid. I > think the fix here is

Re: [PATCH] Add native windows on arm64 support

2022-12-12 Thread Michael Paquier
On Mon, Dec 12, 2022 at 01:38:37PM +, Niyas Sait wrote: > On 05/12/2022 18:14, Andres Freund wrote: > I think the old build system specific part is really minimal in the patch. I > can strip out those if that's preferred. Removing all the changes from src/tools/msvc/ is an approach that works

Re: New strategies for freezing, advancing relfrozenxid early

2022-12-12 Thread Jeff Davis
On Sat, 2022-12-10 at 18:11 -0800, Peter Geoghegan wrote: > On Tue, Dec 6, 2022 at 1:45 PM Peter Geoghegan wrote: > > v9 will also address some of the concerns you raised in your review > > that weren't covered by v8, especially about the VM snapshotting > > infrastructure. But also your concerns

Re: Perform streaming logical transactions by background workers and parallel apply

2022-12-12 Thread Peter Smith
Some minor review comments for v58-0001 == .../replication/logical/applyparallelworker.c 1. pa_can_start + /* + * Don't start a new parallel worker if user has set skiplsn as it's + * possible that user want to skip the streaming transaction. For streaming + * transaction, we need to

Re: Perform streaming logical transactions by background workers and parallel apply

2022-12-12 Thread Peter Smith
FYI - a rebase is needed. This patch is currently failing in cfbot [1], probably due to recent logical replication documentation updates [2]. -- [1] cfbot failing for v59 - http://cfbot.cputube.org/patch_41_3621.log [2] PGDOCS updated -

Re: PGDOCS - Logical replication GUCs - added some xrefs

2022-12-12 Thread Peter Smith
On Tue, Dec 13, 2022 at 6:25 AM Alvaro Herrera wrote: > > On 2022-Dec-07, samay sharma wrote: > > > On Tue, Dec 6, 2022 at 11:12 PM Peter Smith wrote: > > > > OK. I copied the tablesync note back to config.sgml definition of > > > 'max_replication_slots' and removed the link as suggested.

Re: ALTER TABLE uses a bistate but not for toast tables

2022-12-12 Thread Nikita Malakhov
Hi! Found this discussion for our experiments with TOAST, I'd have to check it under [1]. I'm not sure, what behavior is expected when the main table is unpinned, bulk insert to the TOAST table is in progress, and the second query with a heavy bulk insert to the same TOAST table comes in? Thank

Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands

2022-12-12 Thread Tom Lane
Peter Eisentraut writes: > On 25.11.22 18:06, Tom Lane wrote: >> In my mind, this is waiting for Peter to opine on whether it satisfies >> his concern. > The case I was working on is the same as Israel's. He has confirmed > that this fixes the issue we have been working on. OK, I'll make this

Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX

2022-12-12 Thread Nathan Bossart
On Mon, Dec 12, 2022 at 12:04:27PM -0800, Nathan Bossart wrote: > Patch attached. I ended up reverting some parts of the VACUUM/ANALYZE > patch that were no longer needed (i.e., if the user doesn't have permission > to VACUUM, we don't need to separately check whether the user has > permission to

Re: Why does L Blink Tree need lock coupling?

2022-12-12 Thread Peter Geoghegan
On Mon, Dec 12, 2022 at 11:43 AM Oliver Yang wrote: > In a sense, this isn't a fundamental issue and L > paper could be easily tweaked to track downlink so that it > doesn't require coupling lock in moveright. I suppose that's true, but having 3 locks at a time is such a rare case for classic L

Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX

2022-12-12 Thread Nathan Bossart
On Sat, Dec 10, 2022 at 12:41:09PM -0800, Nathan Bossart wrote: > On Sat, Dec 10, 2022 at 12:07:12PM -0800, Jeff Davis wrote: >> It seems like the discussion on VACUUM/CLUSTER/REINDEX privileges is >> happening in the other thread. What would you like to accomplish in >> this thread? > > Given

Re: PGDOCS - Logical replication GUCs - added some xrefs

2022-12-12 Thread Alvaro Herrera
On 2022-Dec-11, Tom Lane wrote: > Ian is still working on closing out the November 'fest :-(. > I suspect that in a day or so that one will get moved, and > you will have duplicate entries in the January 'fest. I've marked both as committed. -- Álvaro Herrera 48°01'N 7°57'E —

Re: Why does L Blink Tree need lock coupling?

2022-12-12 Thread Oliver Yang
On Sun, Dec 11, 2022 at 6:01 PM Peter Geoghegan wrote: > > On Sun, Dec 11, 2022 at 5:38 PM Oliver Yang wrote: > > The README in nbtree mentions that L algorithm must couple > > locks when moving right during ascent for insertion. However, > > it's hard to see why that's necessary. > > You're

Re: Progress report of CREATE INDEX for nested partitioned tables

2022-12-12 Thread Ilya Gladyshev
> Could you check what I've written as a counter-proposal ? I think that this might be a good solution to start with, it gives us the opportunity to improve the granularity later without any surprising changes for the end user. We could use this patch for previous versions and make more

Re: PGDOCS - Logical replication GUCs - added some xrefs

2022-12-12 Thread Alvaro Herrera
On 2022-Dec-07, samay sharma wrote: > On Tue, Dec 6, 2022 at 11:12 PM Peter Smith wrote: > > OK. I copied the tablesync note back to config.sgml definition of > > 'max_replication_slots' and removed the link as suggested. Frankly, I > > also thought it is a bit strange that the

Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands

2022-12-12 Thread Peter Eisentraut
On 25.11.22 18:06, Tom Lane wrote: Israel Barth Rubio writes: It would be great if we can back-patch this to all supported versions, as the issue itself is currently affecting them all. In my mind, this is waiting for Peter to opine on whether it satisfies his concern. The case I was

Re: Re[2]: [PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2022-12-12 Thread Nikita Malakhov
Hi, Svetlana, yes, Tom means that CREATE OR REPLACE should always produce the same result no matter which branch actually worked - CREATE or REPLACE. REPLACE case must produce exactly the same result as you've mentioned - DROP and CREATE. As for IF NOT EXISTS option I agree, it seems a

Re: Add sub-transaction overflow status in pg_stat_activity

2022-12-12 Thread Robert Haas
On Mon, Dec 12, 2022 at 12:42 PM Justin Pryzby wrote: > diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml > index 4efa1d5fca0..ac15e2ce789 100644 > --- a/doc/src/sgml/monitoring.sgml > +++ b/doc/src/sgml/monitoring.sgml > @@ -5680,12 +5680,12 @@ FROM

Re: Minimal logical decoding on standbys

2022-12-12 Thread Robert Haas
On Sat, Dec 10, 2022 at 3:09 AM Drouvot, Bertrand wrote: > Attaching V30, mandatory rebase due to 66dcb09246. It's a shame that this hasn't gotten more attention, because the topic is important, but I'm as guilty of being too busy to spend a lot of time on it as everyone else. Anyway, while I'm

Re: Add sub-transaction overflow status in pg_stat_activity

2022-12-12 Thread Justin Pryzby
On Mon, Dec 12, 2022 at 09:33:51AM -0800, Nathan Bossart wrote: > On Mon, Dec 12, 2022 at 11:15:43AM -0500, Robert Haas wrote: > > Any strenuous objections? > > Nope. In fact, +1. Until more work is done to alleviate the performance > issues, this information will likely prove useful. The docs

Re: Add sub-transaction overflow status in pg_stat_activity

2022-12-12 Thread Nathan Bossart
On Mon, Dec 12, 2022 at 11:15:43AM -0500, Robert Haas wrote: > Any strenuous objections? Nope. In fact, +1. Until more work is done to alleviate the performance issues, this information will likely prove useful. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: generic plans and "initial" pruning

2022-12-12 Thread Alvaro Herrera
On 2022-Dec-12, Amit Langote wrote: > I started feeling like putting all the new logic being added > by this patch into plancache.c at the heart of GetCachedPlan() and > tweaking its API in kind of unintuitive ways may not have been such a > good idea to begin with. So I started thinking again

Re: add \dpS to psql

2022-12-12 Thread Nathan Bossart
On Mon, Dec 12, 2022 at 07:01:01AM -0500, Andrew Dunstan wrote: > On 2022-12-09 Fr 13:44, Nathan Bossart wrote: >> Any thoughts on $SUBJECT? > > Yeah, the discussion got way off into the weeds here. I think the > original proposal seems reasonable. Please add it to the next CF if you > haven't

Re: Allow parallel plan for referential integrity checks?

2022-12-12 Thread Frédéric Yhuel
On 12/11/22 06:29, Ian Lawrence Barwick wrote: 2022年7月26日(火) 20:58 Frédéric Yhuel : On 4/14/22 14:25, Frédéric Yhuel wrote: On 3/19/22 01:57, Imseih (AWS), Sami wrote: I looked at your patch and it's a good idea to make foreign key validation use parallel query on large relations. It

Re: Add sub-transaction overflow status in pg_stat_activity

2022-12-12 Thread Robert Haas
On Wed, Nov 30, 2022 at 11:01 AM Robert Haas wrote: > That's not responsive to the need that I have. I need users to be able > to figure out which backend(s) are overflowing their snapshots -- and > perhaps how badly and how often --- not which backends are incurring > an expense as a result.

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-12-12 Thread Masahiko Sawada
On Mon, Dec 12, 2022 at 7:14 PM John Naylor wrote: > > > On Fri, Dec 9, 2022 at 8:33 PM Masahiko Sawada wrote: > > > > On Fri, Dec 9, 2022 at 5:53 PM John Naylor > > wrote: > > > > > > > I don't think that'd be very controversial, but I'm also not sure why > > > we'd need 4MB -- can you

Re: Date-Time dangling unit fix

2022-12-12 Thread Joseph Koshakow
I just found another class of this bug that the submitted patch does not fix. If the units are at the beginning of the string, then they are also ignored. For example, `date 'm d y2020m11d3'` is also valid. I think the fix here is to check and make sure that ptype is 0 before reassigning the value

Re: sendFileWithContent() does not advance the source pointer

2022-12-12 Thread Robert Haas
On Thu, Dec 8, 2022 at 2:43 PM Antonin Houska wrote: > When checking something else in the base backup code, I've noticed that > sendFileWithContent() does not advance the 'content' pointer. The sink buffer > is large enough (32kB) so that the first iteration usually processes the whole > file

Re: Raising the SCRAM iteration count

2022-12-12 Thread Jonathan S. Katz
On 12/9/22 7:15 PM, Andres Freund wrote: Hi, On 2022-12-09 11:55:07 +0100, Daniel Gustafsson wrote: Our current hardcoded value for iteration count is 4096, which is based on a recommendation from RFC 7677. This is however the lower end of the scale, and is related to computing power in 2015

Re: Add PL/pgSQL extra check no_data_found

2022-12-12 Thread Pavel Stehule
po 12. 12. 2022 v 14:16 odesílatel Мельников Игорь napsal: > I know, know. > But ora2pg NOT convert source code in application tier anonymouse block > and dynamic SQL in server side pl/sql. > This part of application need to be rewrite manually. > > "no_data_found" for the plpgsql.extra_errors

Re: Order getopt arguments

2022-12-12 Thread Peter Eisentraut
On 05.12.22 18:04, Robert Haas wrote: On Mon, Dec 5, 2022 at 11:51 AM Tom Lane wrote: Robert Haas writes: I was only talking about the actual argument to getopt(), not the order of the code stanzas. I'm not sure what we ought to do about the latter. 100% agreed that the getopt argument

Re: [PATCH] Add native windows on arm64 support

2022-12-12 Thread Niyas Sait
Hi, On 05/12/2022 18:14, Andres Freund wrote: With meson gaining in maturity, perhaps that's not the most urgent thing as we will likely remove src/tools/msvc/ soon but I'd rather do that right anyway as much as I can to avoid an incorrect state in the tree at any time in its history. I'd

Re: Add PL/pgSQL extra check no_data_found

2022-12-12 Thread Мельников Игорь
I know, know. But ora2pg NOT convert source code in application tier anonymouse block and dynamic SQL in server side pl/sql. This part of application need to be rewrite manually.   "no_data_found" for the  plpgsql.extra_errors and plpgsql.extra_warnings will be reduce this part of work.   Also,

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-12-12 Thread Önder Kalacı
Hi, Thanks for the heads-up. > Needs another rebase, I think: > > https://cirrus-ci.com/task/559244463758 > > [05:44:22.102] FAILED: > src/backend/postgres_lib.a.p/replication_logical_worker.c.o > [05:44:22.102] ccache cc -Isrc/backend/postgres_lib.a.p -Isrc/include > -I../src/include

Re: Infinite Interval

2022-12-12 Thread Ashutosh Bapat
Hi Joseph, I stumbled upon this requirement a few times. So I started working on this support in my spare time as a hobby project to understand horology code in PostgreSQL. This was sitting in my repositories for more than an year. Now that I have someone else showing an interest, it's time for it

Re: Add PL/pgSQL extra check no_data_found

2022-12-12 Thread Pavel Stehule
Hi po 12. 12. 2022 v 13:37 odesílatel Мельников Игорь napsal: > Hi! > > This new feature will be in demand for customers who migrate their > largeapplications (having millions of lines of PL/SQL code) from Oracle to > PostreSQL. > It will reduce the amount of work on rewriting the code will

Re: Add PL/pgSQL extra check no_data_found

2022-12-12 Thread Мельников Игорь
Hi!   This new feature will be in demand for customers who migrate their largeapplications (having millions of lines of PL/SQL code) from Oracle to PostreSQL. It will reduce the amount of work on rewriting the code will provide an opportunity to reduce budgets for the migration project.   Yes,

Re: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Amit Kapila
On Mon, Dec 12, 2022 at 1:04 PM Hayato Kuroda (Fujitsu) wrote: > > This is a reply for later part of your e-mail. > > > > (2) About the timeout issue > > > > > > When having a look at the physical replication internals, > > > it conducts sending feedback and application of delay separately on >

Re: Support logical replication of DDLs

2022-12-12 Thread Ajin Cherian
On Tue, Nov 15, 2022 at 10:57 AM Peter Smith wrote: > > Here are some review comments for v32-0002 > > == > > 1. Commit message > > Comment says: > While creating a publication, we register a command end > trigger that deparses the DDL as a JSON blob, and WAL logs it. The event > trigger is

Re: Force streaming every change in logical decoding

2022-12-12 Thread Amit Kapila
On Sat, Dec 10, 2022 at 11:18 AM Dilip Kumar wrote: > > On Wed, Dec 7, 2022 at 5:16 AM Peter Smith wrote: > > +1 for the idea > > > > > There is potential for lots of developer GUCs for testing/debugging in > > the area of logical replication but IMO it might be better to keep > > them all

Re: add \dpS to psql

2022-12-12 Thread Andrew Dunstan
On 2022-12-09 Fr 13:44, Nathan Bossart wrote: > On Fri, Dec 09, 2022 at 10:40:55AM -0800, Nathan Bossart wrote: >> On Fri, Dec 09, 2022 at 01:36:03PM +0900, Michael Paquier wrote: >>> On Thu, Dec 08, 2022 at 09:15:03AM -0800, Nathan Bossart wrote: The main idea behind this work is breaking

RE: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Takamichi Osumi (Fujitsu)
Hi, On Saturday, December 10, 2022 12:08 AM Takamichi Osumi (Fujitsu) wrote: > On Friday, December 9, 2022 3:38 PM Kuroda, Hayato/黒田 隼人 > wrote: > > Thanks for reporting! I have analyzed the problem and found the root cause. > > > > This feature seemed not to work on 32-bit OSes. This was

Re: generic plans and "initial" pruning

2022-12-12 Thread Amit Langote
On Fri, Dec 9, 2022 at 8:37 PM Alvaro Herrera wrote: > On 2022-Dec-09, Amit Langote wrote: > > > Pruning will be done afresh on every fetch of a given cached plan when > > CheckCachedPlan() is called on it, so the part_prune_results_list part > > will be discarded and rebuilt as many times as the

RE: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Takamichi Osumi (Fujitsu)
On Friday, November 25, 2022 5:43 AM Peter Smith wrote: > On Fri, Nov 25, 2022 at 2:15 AM Takamichi Osumi (Fujitsu) > wrote: > > > > On Wednesday, October 5, 2022 6:42 PM Peter Smith > wrote: > ... > > > > > == > > > > > > 5. src/backend/commands/subscriptioncmds.c - SubOpts > > > > > > @@

RE: Time delayed LR (WAS Re: logical replication restrictions)

2022-12-12 Thread Takamichi Osumi (Fujitsu)
On Tuesday, December 6, 2022 5:00 PM Peter Smith wrote: > Here are some review comments for patch v9-0001: Hi, thank you for your reviews ! > > == > > GENERAL > > 1. min_ prefix? > > What's the significance of the "min_" prefix for this parameter? I'm guessing > the > background is that

Re: Checksum errors in pg_stat_database

2022-12-12 Thread Drouvot, Bertrand
On 12/12/22 8:15 AM, Drouvot, Bertrand wrote: On 12/12/22 5:09 AM, Michael Paquier wrote: On Sun, Dec 11, 2022 at 08:48:15PM -0500, Tom Lane wrote: I think a stats table indexed solely by relfilenode wouldn't be a great idea, because you'd lose all the stats about a table as soon as you

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-12-12 Thread John Naylor
On Fri, Dec 9, 2022 at 8:33 PM Masahiko Sawada wrote: > > On Fri, Dec 9, 2022 at 5:53 PM John Naylor wrote: > > > > I don't think that'd be very controversial, but I'm also not sure why we'd need 4MB -- can you explain in more detail what exactly we'd need so that the feature would work? (The

Re: A problem about ParamPathInfo for an AppendPath

2022-12-12 Thread Richard Guo
On Tue, Dec 6, 2022 at 5:00 PM Richard Guo wrote: > As we can see, MemoizePath can be generated for partitioned AppendPath > but not for union-all AppendPath. > > For the fix I think we can relax the check in create_append_path and > always use get_baserel_parampathinfo if the parent is a

Re: refactor ExecGrant_*() functions

2022-12-12 Thread Antonin Houska
Peter Eisentraut wrote: > On 06.12.22 09:41, Antonin Houska wrote: > > Attached are my proposals for improvements. One is to avoid memory leak, the > > other tries to improve readability a little bit. > > I added the readability improvement to my v2 patch. The pfree() calls aren't > necessary

Re: Checksum errors in pg_stat_database

2022-12-12 Thread Magnus Hagander
On Mon, Dec 12, 2022 at 12:40 AM Michael Paquier wrote: > On Sun, Dec 11, 2022 at 09:18:42PM +0100, Magnus Hagander wrote: > > It would be less of a concern yes, but I think it still would be a > concern. > > If you have a large amount of corruption you could quickly get to > millions > > of