Re: trying again to get incremental backup

2023-10-30 Thread Andres Freund
Hi, On 2023-10-30 10:45:03 -0400, Robert Haas wrote: > On Tue, Oct 24, 2023 at 12:08 PM Robert Haas wrote: > > Note that whether to remove summaries is a separate question from > > whether to generate them in the first place. Right now, I have > > wal_summarize_mb controlling whether they get

Re: trying again to get incremental backup

2023-10-30 Thread Robert Haas
On Mon, Oct 30, 2023 at 2:46 PM Andres Freund wrote: > After playing with this for a while, I don't see a reason for wal_summarize_mb > from a memory usage POV at least. Cool! Thanks for testing. > I wonder if there are use cases that might like to consume WAL summaries > before the next

Re: Some performance degradation in REL_16 vs REL_15

2023-10-30 Thread Andres Freund
Hi, On 2023-10-30 15:28:53 +0300, Anton A. Melnikov wrote: > For REL_16_STABLE at 7cc2f59dd the average TPS was: 2020+-70, > for REL_10_STABLE at c18c12c98 - 2260+-70 > > The percentage difference was approximately 11%. > Please see the 16vs10.png picture with the graphical representation of the

Re: MERGE ... RETURNING

2023-10-30 Thread Jeff Davis
On Fri, 2023-10-27 at 15:46 +0100, Dean Rasheed wrote: > > One fiddly part is resolving the shift/reduce conflicts in the > grammar. Specifically, on seeing "RETURNING expr when ...", there is > ambiguity over whether the "when" is a column alias or the start of > the next merge action. I've

Re: always use runtime checks for CRC-32C instructions

2023-10-30 Thread Nathan Bossart
On Mon, Oct 30, 2023 at 12:39:23PM -0400, Tom Lane wrote: > On the one hand, I agree that we need to keep the complexity from > getting out of hand. On the other hand, I wonder if this approach > isn't optimizing for the wrong case. How many machines that PG 17 > will ever be run on in

Re: Trigger violates foreign key constraint

2023-10-30 Thread shihao zhong
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:tested, passed It seems like people have been talking about this problem since 2010

Re: Is this a problem in GenericXLogFinish()?

2023-10-30 Thread Amit Kapila
On Mon, Oct 30, 2023 at 7:13 PM Robert Haas wrote: > > On Sat, Oct 28, 2023 at 6:15 AM Amit Kapila wrote: > > > Hmm. So my question is: do we need the cleanup lock on the write > > > buffer even if there are no tuples, and even if primary bucket and the > > > write bucket are the same? > > > >

Re: Add new option 'all' to pg_stat_reset_shared()

2023-10-30 Thread Kyotaro Horiguchi
At Mon, 30 Oct 2023 14:15:53 +0530, Bharath Rupireddy wrote in > > > I imagine there are cases where people want to initialize all of them > > > at the same time in addition to initializing one at a time. > > > > FWIW, I fairly often wanted it, but forgot about that:p > > Isn't calling

Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)

2023-10-30 Thread Ashutosh Bapat
On Fri, Sep 8, 2023 at 3:22 PM Ashutosh Bapat wrote: > > On Fri, Jul 28, 2023 at 3:16 PM Ashutosh Bapat > wrote: > > > > Hi Tom, Richard, > > > > On Mon, Jul 24, 2023 at 8:17 AM Richard Guo wrote: > > > > > > Thanks for pushing it! > > > > With this fix, I saw a noticeable increase in the

Re: A performance issue with Memoize

2023-10-30 Thread Andrei Lepikhov
On 30/10/2023 14:55, Richard Guo wrote: On Thu, Oct 26, 2023 at 12:07 PM Andrei Lepikhov mailto:a.lepik...@postgrespro.ru>> wrote: Do you've thought about the case, fixed with the commit 1db5667? As I see, that bugfix still isn't covered by regression tests. Could your approach

Re: COPY TO (FREEZE)?

2023-10-30 Thread Zhang Mingli
HI, Zhang Mingli www.hashdata.xyz On Oct 31, 2023 at 03:55 +0800, Bruce Momjian , wrote: > > Sure, updated patch attached. LGTM.

Re: Not deleted mentions of the cleared path

2023-10-30 Thread Richard Guo
On Mon, Oct 30, 2023 at 7:31 PM Alena Rybakina wrote: > I have already written about the problem of InvalidPath [0] appearing. I > investigated this and found an error in the add_path() function, when we > reject a path, we free up the memory of the path, but do not delete various > mentions of

Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2023-10-30 Thread Ashutosh Bapat
On Thu, Sep 14, 2023 at 4:39 PM Ashutosh Bapat wrote: > > The patch set is thus > 0001 - patch used to measure memory used during planning > > 0002 - Patch to free intermediate Relids computed by > adjust_child_relids_multilevel(). I didn't test memory consumption for > multi-level partitioning.

Re: always use runtime checks for CRC-32C instructions

2023-10-30 Thread Nathan Bossart
On Mon, Oct 30, 2023 at 01:48:29PM -0700, Jeff Davis wrote: > I assume you are concerned about the call going through a function > pointer? If so, is it possible that setting a flag and then branching > would be better? > > Also, if it's a concern, should we also consider making an inlineable >

Re: small erreport bug over partitioned table pgrowlocks module

2023-10-30 Thread David Rowley
On Tue, 31 Oct 2023 at 13:18, David Rowley wrote: > Here's a patch that puts the relam check last. I've pushed that patch. David

Re: Synchronizing slots from primary to standby

2023-10-30 Thread Amit Kapila
On Tue, Oct 31, 2023 at 7:16 AM Hayato Kuroda (Fujitsu) wrote: > > > > 2. > > > Currently ctx->failover is set only in the pgoutput_startup(), but not > > > sure it is > > OK. > > > Can we change the parameter in CreateDecodingContext() or similar > > > functions? > > > > > > Because IIUC it

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 12:47:41PM -0700, Andres Freund wrote: > I think the problem with these variables is that they're a really messy state > machine - something this patch doesn't meaningfully improve IMO. Okay. Yes, this is my root issue as well. We're at the stage where we should reduce

Re: PGDOCS - add more links in the pub/sub reference pages

2023-10-30 Thread Peter Smith
Thanks for pushing! == Kind Regards, Peter Smith. Fujitsu Australia

Re: pgBufferUsage.blk_{read|write}_time are zero although there are pgBufferUsage.local_blks_{read|written}

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 03:14:16PM +0100, hubert depesz lubaczewski wrote: > some things will definitely break, but that's 100% OK. The change seems > needed, and I can update my parser to deal with it :) Thanks for the input. I was looking yesterday if this code was available somewhere, but

Re: Infinite Interval

2023-10-30 Thread jian he
On Mon, Oct 30, 2023 at 6:01 PM Ashutosh Bapat wrote: > > > Here's my version of commit message > > ``` > Support Infinite interval values > > Interval datatype uses the same input and output representation for > infinite intervals as other datatypes representing time that support > infinity. An

small erreport bug over partitioned table pgrowlocks module

2023-10-30 Thread jian he
hi. erreport bug over partitioned table in pgrowlocks. BEGIN; CREATE TABLE fk_parted_pk (a int PRIMARY KEY) PARTITION BY LIST (a); SELECT * FROM pgrowlocks('fk_parted_pk'); ERROR: only heap AM is supported error should be the following part: if (rel->rd_rel->relkind ==

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 04:10:17PM +0300, Aleksander Alekseev wrote: > I didn't like the commit message. Here is the corrected patch. Sorry > for the noise. Sounds pretty much OK to me. Thanks! -- Michael signature.asc Description: PGP signature

Re: Trigger violates foreign key constraint

2023-10-30 Thread David G. Johnston
On Mon, Oct 30, 2023 at 2:50 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tue, Oct 3, 2023 at 12:52 AM Laurenz Albe > wrote: > >> On Mon, 2023-10-02 at 09:49 -0400, Tom Lane wrote: >> > This is by design: triggers operate at a lower level than >> > foreign keys, so an

Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?

2023-10-30 Thread David Rowley
On Tue, 31 Oct 2023 at 03:01, Bruce Momjian wrote: > I think you just go and change it. Your number is better than what we > have, and if someone wants to suggest a better number, we can change it > later. I did some more experimentation on the actual costs of getting a tuple from a foreign

Re: Introduce a new view for checkpointer related stats

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 11:59:10AM +0530, Bharath Rupireddy wrote: > Oh, thanks for taking care of this. While at it, I noticed that > there's no coverage for pg_stat_reset_shared('recovery_prefetch') and > XLogPrefetchResetStats() >

Re: small erreport bug over partitioned table pgrowlocks module

2023-10-30 Thread David Rowley
On Tue, 31 Oct 2023 at 13:00, jian he wrote: > BEGIN; > CREATE TABLE fk_parted_pk (a int PRIMARY KEY) PARTITION BY LIST (a); > SELECT * FROM pgrowlocks('fk_parted_pk'); > ERROR: only heap AM is supported > > error should be the following part: > if (rel->rd_rel->relkind ==

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 01:55:13PM -0400, Robert Haas wrote: > I would encourage some caution here. Thanks for chiming here. > In a vacuum, I'm in favor of this, and for the same reasons as you, > namely, that the huge pile of Booleans that we use to control recovery > is confusing, and it's

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-30 Thread Andres Freund
Hi, On 2023-10-30 16:08:50 +0900, Michael Paquier wrote: > From 26a8432fe3ab8426e7797d85d19b0fe69d3384c9 Mon Sep 17 00:00:00 2001 > From: Michael Paquier > Date: Mon, 30 Oct 2023 16:02:52 +0900 > Subject: [PATCH v4] Require recovery.signal or standby.signal when reading a > backup_file > >

Re: Row pattern recognition

2023-10-30 Thread Jacob Champion
On Tue, Oct 24, 2023 at 7:49 PM Tatsuo Ishii wrote: > I am impressed the simple NFA implementation. Thanks! > It would be nicer if it > could be implemented without using recursion. Yeah. If for some reason we end up going with a bespoke implementation, I assume we'd just convert the algorithm

Re: always use runtime checks for CRC-32C instructions

2023-10-30 Thread Jeff Davis
On Mon, 2023-10-30 at 12:39 -0400, Tom Lane wrote: > It seems like a shame > to be burdening these instructions with a subroutine call for the > benefit of long-obsolete hardware versions. It's already doing a call to pg_comp_crc32c_sse42() regardless, right? I assume you are concerned about the

Re: Making aggregate deserialization (and WAL receive) functions slightly faster

2023-10-30 Thread David Rowley
On Mon, 30 Oct 2023 at 23:48, Amit Kapila wrote: > > On Fri, Oct 27, 2023 at 3:23 AM David Rowley wrote: > > * parallel.c in HandleParallelMessages(): > > * applyparallelworker.c in HandleParallelApplyMessages(): > > Both the above calls are used to handle ERROR/NOTICE messages from > parallel

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-30 Thread Michael Paquier
On Mon, Oct 30, 2023 at 10:32:28AM -0600, Roberto Mello wrote: > I realize the original use of "touch" is a valid shortcut for what I > suggest above, however that will be less clear for the not-so-un*x-inclined > users of Postgres, while for some it'll be downright confusing, IMHO. It > also

Re: Synchronizing slots from primary to standby

2023-10-30 Thread Ajin Cherian
On Thu, Oct 26, 2023 at 6:08 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Shveta, > > > PFA v25 patch set. The changes are: > > Thanks for making the patch! It seems that there are lots of comments, so > I can put some high-level comments for 0001. > Sorry if there are duplicated comments. > > 1. >

RE: Synchronizing slots from primary to standby

2023-10-30 Thread Hayato Kuroda (Fujitsu)
Dear Ajin, Thanks for your reply! > On Thu, Oct 26, 2023 at 6:08 PM Hayato Kuroda (Fujitsu) > wrote: > > > > Dear Shveta, > > > > > PFA v25 patch set. The changes are: > > > > Thanks for making the patch! It seems that there are lots of comments, so > > I can put some high-level comments for

Re: COPY TO (FREEZE)?

2023-10-30 Thread Bruce Momjian
On Mon, Oct 30, 2023 at 02:29:05PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > That is a good point. I reviewed more of the messages and added > > capitalization where appropriate, patch attached. > > This is starting to look pretty good. I have one more thought, > as long as we're

Adding ordering to list of available extensions

2023-10-30 Thread Greg Sabino Mullane
Please find attached a patch to provide some basic ordering to the system views pg_available_extensions and pg_available_extension_versions. It is sorely tempting to add ORDER BYs to many of the other views in that file, but I understand that would be contentious as there are reasons for not

Re: Trigger violates foreign key constraint

2023-10-30 Thread David G. Johnston
On Tue, Oct 3, 2023 at 12:52 AM Laurenz Albe wrote: > On Mon, 2023-10-02 at 09:49 -0400, Tom Lane wrote: > > This is by design: triggers operate at a lower level than > > foreign keys, so an ill-conceived trigger can break an FK constraint. > > That's documented somewhere, though maybe not

Re: Introduce a new view for checkpointer related stats

2023-10-30 Thread Bharath Rupireddy
On Mon, Oct 30, 2023 at 6:19 AM Michael Paquier wrote: > > On Fri, Oct 27, 2023 at 10:23:34AM +0530, Bharath Rupireddy wrote: > > +1. Changed in the attached v10-001. FWIW, having a test case in > > stats.sql emitting this error message and hint would have helped here. > > If okay, I can add one.

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-30 Thread Michael Paquier
On Fri, Oct 27, 2023 at 09:31:10AM -0400, David Steele wrote: > That sounds like the right plan to me. Nice and simple. I'll tackle that in a separate thread with a patch registered for the upcoming CF of November. > I'm still +1 for the patch as it stands. I have been reviewing the patch, and

Re: COPY TO (FREEZE)?

2023-10-30 Thread Kyotaro Horiguchi
At Sun, 29 Oct 2023 15:35:02 -0400, Bruce Momjian wrote in > You are 100% correct. Updated patch attached. -errmsg("COPY force not null only available using COPY FROM"))); +errmsg("COPY force not null cannot be used with COPY

Re: A recent message added to pg_upgade

2023-10-30 Thread Bharath Rupireddy
On Mon, Oct 30, 2023 at 8:51 AM Amit Kapila wrote: > > > This discussion seems like a bit off from my point. I suggested adding > > a check for that setting when IsBinaryUpgraded is true at the GUC > > level as shown in the attached patch. I believe Álvaro made a similar > > suggestion. While

Re: A recent message added to pg_upgade

2023-10-30 Thread Kyotaro Horiguchi
At Mon, 30 Oct 2023 03:36:41 +, "Zhijie Hou (Fujitsu)" wrote in > Thanks for the diff and I think the approach basically works. > > One notable behavior of this approach it will reject the GUC setting even if > there > are no slots on old cluster or user set the value to a big enough

Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2023-10-30 Thread Pavel Borisov
Hi, Alexander! On Wed, 25 Oct 2023 at 00:13, Alexander Korotkov wrote: > > On Wed, Sep 28, 2022 at 11:44 AM Aleksander Alekseev > wrote: > > > I think, this patch was marked as "Waiting on Author", probably, by > > > mistake. Since recent changes were done without any significant code > > >

Add BF member koel-like indentation checks to SanityCheck CI

2023-10-30 Thread Bharath Rupireddy
Hi, How about adding code indent checks (like what BF member koel has) to the SanityCheck CI task? This helps catch indentation problems way before things are committed so that developers can find them out in their respective CI runs and lets developers learn the postgres code indentation stuff.

Add new option 'all' to pg_stat_reset_shared()

2023-10-30 Thread torikoshia
Hi, After 96f052613f3, we have below 6 types of parameter for pg_stat_reset_shared(). "archiver", "bgwriter", "checkpointer", "io", "recovery_prefetch", "wal" How about adding a new option 'all' to delete all targets above? I imagine there are cases where people want to initialize all

Re: A recent message added to pg_upgade

2023-10-30 Thread Kyotaro Horiguchi
At Mon, 30 Oct 2023 08:51:18 +0530, Amit Kapila wrote in > I think we can simply change that error message to assert if we want > to go with the check hook idea of yours. BTW, can we add > GUC_check_errdetail() with a better message as some of the other check > function uses? Also, I guess we

Not deleted mentions of the cleared path

2023-10-30 Thread Alena Rybakina
Hi, hackers! I have already written about the problem of InvalidPath [0] appearing. I investigated this and found an error in the add_path() function, when we reject a path, we free up the memory of the path, but do not delete various mentions of it (for example, in the ancestor of relation,

Re: pg_resetwal tests, logging, and docs update

2023-10-30 Thread Aleksander Alekseev
Hi, > Here are updated versions of the remaining patches. I took out the > "FIXME" notes about the multipliers applying to the -c option and > replaced them by gentler comments. I don't intend to resolve those > issues here. The patch LGTM. However, postgresql:pg_resetwal test suite doesn't

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-30 Thread Aleksander Alekseev
Michael, On Fri, Oct 27, 2023 at 9:52 AM Michael Paquier wrote: > > On Tue, May 23, 2023 at 01:47:52PM +0300, Aleksander Alekseev wrote: > > That's me still talking to myself :) > > Let's be two then. Many thanks for your feedback. > + > +It is convenient to use shmem_startup_hook

Re: Open a streamed block for transactional messages during decoding

2023-10-30 Thread Amit Kapila
On Mon, Oct 30, 2023 at 2:17 PM Zhijie Hou (Fujitsu) wrote: > > On Monday, October 30, 2023 12:20 PM Amit Kapila > wrote: > > > > On Thu, Oct 26, 2023 at 2:01 PM Zhijie Hou (Fujitsu) > > > > wrote: > > > > > > On Thursday, October 26, 2023 12:42 PM Amit Kapila > > wrote: > > > > > > > > On

Re: DRAFT GIST support for ORDER BY

2023-10-30 Thread Matthias van de Meent
On Mon, 30 Oct 2023 at 09:04, Michał Kłeczek wrote: > > Hi All, > > Attached is a first attempt to implement GIST index (only) scans for ORDER BY > column clauses. Cool! > The solution is not ideal as it requires registering “<“ and “>” operators as > ordering operators in opfamily > (which

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-10-30 Thread Aleksander Alekseev
Hi, > PFA patch v4. I didn't like the commit message. Here is the corrected patch. Sorry for the noise. -- Best regards, Aleksander Alekseev v5-0001-Clarify-the-38.10.10.-Shared-Memory-and-LWLocks-s.patch Description: Binary data

Re: A performance issue with Memoize

2023-10-30 Thread Richard Guo
On Thu, Oct 26, 2023 at 12:07 PM Andrei Lepikhov wrote: > Do you've thought about the case, fixed with the commit 1db5667? As I > see, that bugfix still isn't covered by regression tests. Could your > approach of a PARAM_EXEC slot reusing break that case? Hm, I don't think so. The issue fixed

RE: Open a streamed block for transactional messages during decoding

2023-10-30 Thread Zhijie Hou (Fujitsu)
On Monday, October 30, 2023 12:20 PM Amit Kapila wrote: > > On Thu, Oct 26, 2023 at 2:01 PM Zhijie Hou (Fujitsu) > wrote: > > > > On Thursday, October 26, 2023 12:42 PM Amit Kapila > wrote: > > > > > > On Tue, Oct 24, 2023 at 5:27 PM Zhijie Hou (Fujitsu) > > > > > > wrote: > > > > > > > >

RE: PATCH: document for regression test forgets libpq test

2023-10-30 Thread Ryo Matsumura (Fujitsu)
Hi, > Wednesday, September 6, 2023 2:06 AM Bruce Momjian wrote: > Yes, good point. I modifed the patch, attached, and applied it to all > supported versions. Thank you. # I forgot to send mail. Best Regards Ryo Matsumura > -Original Message- > From: Bruce Momjian > Sent: Wednesday,

RE: A recent message added to pg_upgade

2023-10-30 Thread Hayato Kuroda (Fujitsu)
Dear Bharath, > Will the check_hook approach work correctly? I tested by using the first version and worked well (rejected). Please see the log which recorded the output and log. Below lines were copied from server log and found that max_slot_wal_keep_size must not be >= 0. ``` waiting for

Re: A recent message added to pg_upgade

2023-10-30 Thread Bharath Rupireddy
On Mon, Oct 30, 2023 at 2:31 PM Bharath Rupireddy wrote: > Never mind. Previous message was accidentally sent before I finished writing my comments. > Yeah. The check_hook is called even after the param is specified in > postgresql.conf during the upgrade, so I see no problem there. > > > The

DRAFT GIST support for ORDER BY

2023-10-30 Thread Michał Kłeczek
Hi All,Attached is a first attempt to implement GIST index (only) scans for ORDER BY column clauses.The idea is that it order by column for some datatypes is a special case of ordering by distance:ORDER BY a == ORDER BY a <-> MIN_VALUEandORDER BY a DESC == ORDER BY a <-> MAX_VALUEThis allows

Re: A recent message added to pg_upgade

2023-10-30 Thread Kyotaro Horiguchi
At Mon, 30 Oct 2023 12:38:47 +0530, Bharath Rupireddy wrote in > Will the check_hook approach work correctly? I haven't checked that by > myself, but I see InitializeGUCOptions() getting called before > IsBinaryUpgrade is set to true and the passed-in config options ('c') > are parsed. I'm not

Re: PGDOCS - add more links in the pub/sub reference pages

2023-10-30 Thread Amit Kapila
On Mon, Oct 16, 2023 at 6:15 AM Peter Smith wrote: > > Thanks for pushing the 0001 patch! I am unsure what the decision was > for the remaining patches, but anyway, here they are again (rebased). > To keep the link names the same in logical replication-related commands, I have pushed your patch.

Explicitly skip TAP tests under Meson if disabled

2023-10-30 Thread Peter Eisentraut
Under Meson, it is not very easy to see if TAP tests have been enabled or disabled, if you rely on the default auto setting. You either need to carefully study the meson setup output, or you notice, what a minute, didn't there use to be like 250 tests, not only 80? I think it would be better

Re: Is this a problem in GenericXLogFinish()?

2023-10-30 Thread Amit Kapila
On Sat, Oct 28, 2023 at 4:30 PM Michael Paquier wrote: > > On Sat, Oct 28, 2023 at 03:45:13PM +0530, Amit Kapila wrote: > > Yes, we need it to exclude any concurrent in-progress scans that could > > return incorrect tuples during bucket squeeze operation. > > Thanks. So I assume that we should

Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?

2023-10-30 Thread Ashutosh Bapat
Looks like the value goes long back to d0d75c402217421b691050857eb3d7af82d0c770. The comment there adds "above and beyond cpu_tuple_cost". So certainly it's expected to be higher than cpu_tuple_cost. I have no memories of this. But looking at the surrounding code, I think DEFAULT_FDW_STARTUP_COST

Re: Making aggregate deserialization (and WAL receive) functions slightly faster

2023-10-30 Thread Amit Kapila
On Fri, Oct 27, 2023 at 3:23 AM David Rowley wrote: > > On Thu, 26 Oct 2023 at 17:00, David Rowley wrote: > > Thanks for looking at this again. I fixed up each of those and pushed > > the result, mentioning the incompatibility in the commit message. > > > > Now that that's done, I've attached a

Re: Add new option 'all' to pg_stat_reset_shared()

2023-10-30 Thread Kyotaro Horiguchi
At Mon, 30 Oct 2023 16:35:19 +0900, torikoshia wrote in > Hi, > > After 96f052613f3, we have below 6 types of parameter for > pg_stat_reset_shared(). > > "archiver", "bgwriter", "checkpointer", "io", "recovery_prefetch", > "wal" > > How about adding a new option 'all' to delete all

Re: Add new option 'all' to pg_stat_reset_shared()

2023-10-30 Thread Bharath Rupireddy
On Mon, Oct 30, 2023 at 1:47 PM Kyotaro Horiguchi wrote: > > At Mon, 30 Oct 2023 16:35:19 +0900, torikoshia > wrote in > > Hi, > > > > After 96f052613f3, we have below 6 types of parameter for > > pg_stat_reset_shared(). > > > > "archiver", "bgwriter", "checkpointer", "io",

Re: A recent message added to pg_upgade

2023-10-30 Thread Bharath Rupireddy
On Mon, Oct 30, 2023 at 1:42 PM Kyotaro Horiguchi wrote: > > At Mon, 30 Oct 2023 12:38:47 +0530, Bharath Rupireddy > wrote in > > Will the check_hook approach work correctly? I haven't checked that by > > myself, but I see InitializeGUCOptions() getting called before > > IsBinaryUpgrade is set

Re: pg_upgrade and logical replication

2023-10-30 Thread vignesh C
On Fri, 27 Oct 2023 at 12:09, vignesh C wrote: > > On Thu, 21 Sept 2023 at 11:27, Michael Paquier wrote: > > > > On Fri, Sep 15, 2023 at 03:08:21PM +0530, vignesh C wrote: > > > On Tue, 12 Sept 2023 at 14:25, Hayato Kuroda (Fujitsu) > > > wrote: > > >> Is there a possibility that apply worker

Re: POC, WIP: OR-clause support for indexes

2023-10-30 Thread Robert Haas
On Thu, Oct 26, 2023 at 5:05 PM Peter Geoghegan wrote: > On Thu, Oct 26, 2023 at 12:59 PM Robert Haas wrote: > > Alexander's example seems to show that it's not that simple. If I'm > > reading his example correctly, with things like aid = 1, the > > transformation usually wins even if the number

Re: Is this a problem in GenericXLogFinish()?

2023-10-30 Thread Robert Haas
On Sat, Oct 28, 2023 at 6:15 AM Amit Kapila wrote: > > Hmm. So my question is: do we need the cleanup lock on the write > > buffer even if there are no tuples, and even if primary bucket and the > > write bucket are the same? > > Yes, we need it to exclude any concurrent in-progress scans that

Re: Not deleted mentions of the cleared path

2023-10-30 Thread Ashutosh Bapat
On Mon, Oct 30, 2023 at 5:01 PM Alena Rybakina wrote: > > Hi, hackers! > > I have already written about the problem of InvalidPath [0] appearing. I > investigated this and found an error in the add_path() function, when we > reject a path, we free up the memory of the path, but do not delete

Re: trying again to get incremental backup

2023-10-30 Thread Robert Haas
On Tue, Oct 24, 2023 at 12:08 PM Robert Haas wrote: > Note that whether to remove summaries is a separate question from > whether to generate them in the first place. Right now, I have > wal_summarize_mb controlling whether they get generated in the first > place, but as I noted in another recent

Re: Parallel query behaving different with custom GUCs

2023-10-30 Thread Robert Haas
On Thu, Oct 26, 2023 at 3:10 AM Rushabh Lathia wrote: > -- RESET the custom GUC and rerun the query. > postgres=> reset myapp.blah; > RESET > > -- Query should still run, but with forcing parallel plan, throwing an error. > postgres=> select count(*) from ptest2 where

Re: DRAFT GIST support for ORDER BY

2023-10-30 Thread Michał Kłeczek
> On 30 Oct 2023, at 13:31, Matthias van de Meent > wrote: > >> The solution is not ideal as it requires registering “<“ and “>” operators >> as ordering operators in opfamily >> (which in turn makes it possible to issue somewhat meaningless “ORDER BY a < >> ‘constant’) > > I don't quite

Including Doxyfile and Meson script for docs into main source tree

2023-10-30 Thread Bohdan Mart
Hello, Stefan! What do you think about this? See quoted message from John Morris. P.S. Also we would like you to provide currently used Doxyfile, as Postgres doxigen's home page no longer have link to download said file. Regards, Bohdan. On 14.10.23 21:54, John Morris wrote: Thank

Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?

2023-10-30 Thread Bruce Momjian
On Mon, Oct 30, 2023 at 02:22:08PM +1300, David Rowley wrote: > If I change STD_FUZZ_FACTOR to something like 1.001 then the plans > no longer change when I do: > > alter server loopback options (add fdw_tuple_cost '0.01'); > > alter server loopback options (drop fdw_tuple_cost); > > >

Re: Explicitly skip TAP tests under Meson if disabled

2023-10-30 Thread Tom Lane
Aleksander Alekseev writes: > Personally I like the change. It makes the output more explicit. In my > use cases not running TAP tests typically is not something I want . So > I would appreciate being warned with a long list of bright yellow > "SKIP" messages. If I really want to skip TAP tests

Re: Report planning memory in EXPLAIN ANALYZE

2023-10-30 Thread Ashutosh Bapat
> > > David challenged something at the begining, but IIUC he also agree the > value of patch 01 as the previous statement after discussion. Since the patch > is mild itself, so I will mark this commitfest entry as "Ready for committer". > Please correct me if anything is wrong. > Thanks Andy.

Remove obsolete check for TTSOpsVirtual from slot_compile_deform

2023-10-30 Thread Xing Guo
Hi hackers, While exploring the JIT support for tuple deforming process, I noticed that one check for TTSOpsVirtual in slot_compile_deform is obsolete. Since virtual tuples never need deforming and there's an assertion in llvm_compile_expr[1]. I simply replace it with an assertion in

Re: Explicitly skip TAP tests under Meson if disabled

2023-10-30 Thread Aleksander Alekseev
Hi, > Under Meson, it is not very easy to see if TAP tests have been enabled > or disabled, if you rely on the default auto setting. You either need > to carefully study the meson setup output, or you notice, what a minute, > didn't there use to be like 250 tests, not only 80? > > I think it

Re: COPY TO (FREEZE)?

2023-10-30 Thread Bruce Momjian
On Mon, Oct 30, 2023 at 03:16:58PM +0900, Kyotaro Horiguchi wrote: > At Sun, 29 Oct 2023 15:35:02 -0400, Bruce Momjian wrote in > > You are 100% correct. Updated patch attached. > > - errmsg("COPY force not null only available > using COPY FROM"))); > +

Re: POC, WIP: OR-clause support for indexes

2023-10-30 Thread Alexander Korotkov
On Mon, Oct 30, 2023 at 3:40 PM Robert Haas wrote: > On Thu, Oct 26, 2023 at 5:05 PM Peter Geoghegan wrote: > > On Thu, Oct 26, 2023 at 12:59 PM Robert Haas wrote: > > > Alexander's example seems to show that it's not that simple. If I'm > > > reading his example correctly, with things like aid

Re: pgBufferUsage.blk_{read|write}_time are zero although there are pgBufferUsage.local_blks_{read|written}

2023-10-30 Thread hubert depesz lubaczewski
On Mon, Oct 30, 2023 at 10:45:05AM +0900, Michael Paquier wrote: > On Fri, Oct 27, 2023 at 04:58:20PM +0300, Nazir Bilal Yavuz wrote: > > I think switching it to 'shared' makes sense. That shouldn't confuse > > existing monitoring queries much as the numbers won't change, right? > > Also, if we

Re: Fwd: Annoying corruption in PostgreSQL.

2023-10-30 Thread Stephen Frost
Greetings, Please don't top-post on these lists. * Kirill Reshke (reshkekir...@gmail.com) wrote: > We have physical backups and we can PITR. But restoring a cluster to some > point in the past is a bit of a different task: we need our client's > approval for these operations, since we are a

Re: trying again to get incremental backup

2023-10-30 Thread Robert Haas
While reviewing this thread today, I realized that I never responded to this email. That was inadvertent; my apologies. On Wed, Jun 14, 2023 at 4:34 PM Matthias van de Meent wrote: > Nice, I like this idea. Cool. > Skimming through the 7th patch, I see claims that FSM is not fully > WAL-logged

Re: Add semi-join pushdown to postgres_fdw

2023-10-30 Thread Alexander Korotkov
Hi, Alexander! Thank you for working on this. I believe this is a very interesting patch, which significantly improves our FDW-based distributed facilities. This is why I decided to review this. On Fri, Jan 20, 2023 at 11:00 AM Alexander Pyhalov wrote: > Tomas Vondra писал 2023-01-19 20:49: >

always use runtime checks for CRC-32C instructions

2023-10-30 Thread Nathan Bossart
This is an offshoot of the "CRC32C Parallel Computation Optimization on ARM" thread [0]. I intend for this to be a prerequisite patch set. Presently, for the SSE 4.2 and ARMv8 CRC instructions used in the CRC32C code for WAL records, etc., we first check if the intrinsics are available with the

Re: CRC32C Parallel Computation Optimization on ARM

2023-10-30 Thread Nathan Bossart
On Fri, Oct 27, 2023 at 07:01:10AM +, Xiang Gao wrote: > On Thu, 26 Oct, 2023 11:37:52AM -0500, Nathan Bossart wrote: >>> We consider that a runtime check needs to be done in any scenario. >>> Here we only confirm that the compilation can be successful. >> >A runtime check will be done when

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-30 Thread Roberto Mello
On Mon, Oct 30, 2023 at 1:09 AM Michael Paquier wrote: > > I have been reviewing the patch, and applied portions of it as of > dc5bd388 and 1ffdc03c and they're quite independent pieces. After > that, the remaining bits of the patch to change the behavior is now > straight-forward. I have

Re: always use runtime checks for CRC-32C instructions

2023-10-30 Thread Tom Lane
Nathan Bossart writes: > The aforementioned other thread [0] aims to further optimize this code by > using another instruction that requires additional configure and/or runtime > checks. $SUBJECT has been in the back of my mind for a while, but given > proposals to add further complexity to this

Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning

2023-10-30 Thread Ashutosh Bapat
Rebased patchset. No changes in actual patches. 0001 is squashed version of patches submitted at https://www.postgresql.org/message-id/CAExHW5sCJX7696sF-OnugAiaXS=Ag95=-m1csrjcmyyj8pd...@mail.gmail.com. On Tue, Oct 3, 2023 at 6:42 PM Ashutosh Bapat wrote: > > On Fri, Sep 29, 2023 at 8:36 AM Amit

Re: pg_rewind WAL segments deletion pitfall

2023-10-30 Thread Alexander Kukushkin
Hi, On Wed, 18 Oct 2023 at 08:50, torikoshia wrote: > > I have very minor questions on the regression tests mainly regarding the > consistency with other tests for pg_rewind: > Please find attached a new version of the patch. It addresses all your comments. Regards, -- Alexander Kukushkin

Re: POC, WIP: OR-clause support for indexes

2023-10-30 Thread Peter Geoghegan
On Mon, Oct 30, 2023 at 6:40 AM Robert Haas wrote: > I agree with that, with some caveats, mainly that the reverse is to > some extent also true. Maybe not completely, because arguably the > ANY() formulation should just be straight-up easier to deal with, but > in principle, the two are

Re: trying again to get incremental backup

2023-10-30 Thread Robert Haas
On Thu, Sep 28, 2023 at 6:22 AM Jakub Wartak wrote: > If that is still an area open for discussion: wouldn't it be better to > just specify LSN as it would allow resyncing standby across major lag > where the WAL to replay would be enormous? Given that we had > primary->standby where standby

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-10-30 Thread Robert Haas
On Mon, Oct 30, 2023 at 3:09 AM Michael Paquier wrote: > I have been reviewing the patch, and applied portions of it as of > dc5bd388 and 1ffdc03c and they're quite independent pieces. After > that, the remaining bits of the patch to change the behavior is now > straight-forward. I have written

Re: COPY TO (FREEZE)?

2023-10-30 Thread Tom Lane
Bruce Momjian writes: > That is a good point. I reviewed more of the messages and added > capitalization where appropriate, patch attached. This is starting to look pretty good. I have one more thought, as long as we're touching all these messages anyway: how about s/FOO available only in CSV