Re: Question on error code selection in conflict detection

2025-06-09 Thread Dilip Kumar
On Tue, Jun 10, 2025 at 11:39 AM Amit Kapila wrote: > > On Mon, Jun 9, 2025 at 7:14 PM Dilip Kumar wrote: > > > > I was reviewing the code for conflict reporting and became curious > > about the choice of ERRCODE_T_R_SERIALIZATION_FAILURE. This error code > > typically signifies a serialization f

Re: queryId constant squashing does not support prepared statements

2025-06-09 Thread Michael Paquier
On Mon, Jun 09, 2025 at 12:44:59PM +0200, Alvaro Herrera wrote: > I also added a recursive call in IsSquashableExpression to itself. The > check for stack depth can be done without throwing an error. I tested > this by adding stack bloat in that function. I also renamed it to > IsSquashableConst

Re: [BUG?] check_exclusion_or_unique_constraint false negative

2025-06-09 Thread Mihail Nikalayeu
Hello! Rebased\reworked to align with the changes of [0]. Best regards. [0]: https://www.postgresql.org/message-id/flat/CAH2-WznZBhWqDBDVGh1VhVBLgLqaYHEkPhmVV7mJCr1Y3ZQhQQ%40mail.gmail.com#d6f1debb1405d1b4a983cbb46b24f41b From 13934bd0b3588e71a96228f31395ab661e0e749d Mon Sep 17 00:00:00 2001 Fr

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Fujii Masao
On 2025/06/10 9:43, Shinya Kato wrote: However, a similar proposal was made earlier [1], and seemingly some hackers weren't in favor of it. It's probably worth reading that thread to understand the previous concerns. [1] https://postgr.es/m/calay4q8ngsxp0p5uf56vn-md7rewqzp5k6ps1cgum26x4fs...

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Shinya Kato
On Tue, Jun 10, 2025 at 2:34 PM Fujii Masao wrote: > > There are clear differences from the earlier proposal. My sole > > motivation is to skip multiple headers, and I don't believe a feature > > for skipping footers is necessary. To be clear, I think it's best to > > simply extend the current HEA

Re: macos exported symbols list not used for loadable modules

2025-06-09 Thread Peter Eisentraut
On 05.06.25 19:28, Jacob Champion wrote: On Tue, Jun 3, 2025 at 12:48 AM Peter Eisentraut wrote: On macOS, when building with the make system, the exported symbols list (SHLIB_EXPORTS) is ignored. I don't think that is intentional. It was probably just forgotten, since that combination has n

Re: Improve tab completion for COPY

2025-06-09 Thread Yugo Nagata
On Tue, 10 Jun 2025 11:15:09 +0900 torikoshia wrote: > On 2025-06-03 17:58, Yugo Nagata wrote: > > Thank you for updating the patch. > > It looks good and I confirmed that this works as expected. > > Thanks for your review! > > BTW this is a small patch, but it does two things: > > (1) adds ta

Re: Cleanup gcc trick with varattrib_1b_e in VARATT_EXTERNAL_GET_POINTER()

2025-06-09 Thread Michael Paquier
On Mon, Jun 09, 2025 at 04:17:25PM -0500, Nathan Bossart wrote: > The risk/reward ratio might not be favorable on this one. Presumably we'd > need some level of confidence that this is no longer an issue, and in the > end the patch only saves a few lines of code. > > [0] https://postgr.es/m/27632

Re: Improve tab completion for COPY

2025-06-09 Thread torikoshia
On 2025-06-03 17:58, Yugo Nagata wrote: Thank you for updating the patch. It looks good and I confirmed that this works as expected. Thanks for your review! BTW this is a small patch, but it does two things: (1) adds tab completion support for the REJECT_LIMIT option, which was introduced in

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-09 Thread Fabrízio de Royes Mello
On Mon, 9 Jun 2025 at 22:40 Steven Niu wrote: > LGTM. I have no more comments. > > The refactoring LGTM but do we really need two patches? IMHO you can just merge everything into a single patch. Fabrízio de Royes Mello

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-09 Thread Steven Niu
LGTM. I have no more comments. Regards, Steven Xiaoran Wang 于2025年6月9日周一 18:31写道: > Just upload all the patches together. > > Xiaoran Wang 于2025年6月9日周一 18:25写道: > >> >> >> Steven Niu 于2025年6月9日周一 14:46写道: >> >>> Hi, >>> >>> I like the idea of your change as it saves me out of >>> converting-i

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Shinya Kato
> > However, a similar proposal was made earlier [1], and seemingly > > some hackers weren't in favor of it. It's probably worth reading > > that thread to understand the previous concerns. > > > > [1] > > https://postgr.es/m/calay4q8ngsxp0p5uf56vn-md7rewqzp5k6ps1cgum26x4fs...@mail.gmail.com > > O

[WIP PATCH v2] Implement "pg_restore --data-only --clean" as a way to skip WAL

2025-06-09 Thread Dimitrios Apostolou
On Mon, 14 Apr 2025, Dimitrios Apostolou wrote: Hello list, I implemented --clean support for --data-only, in order to avoid logging to the WAL while populating the database. The attached patch issues a TRUNCATE before COPY on each worker process, and provides a significant speed advantage i

Re: add function for creating/attaching hash table in DSM registry

2025-06-09 Thread Sami Imseih
> It is not expected behavior IMO, and I still need to debug this a bit more, > but it may be something outside the scope of this patch that the patch just > surfaced. It seems I got it backward. If the tranch is registered, then the wait event name is the one of the tranche, in that case we will

[PATCH v2] parallel pg_restore: move offset-building phase to before forking

2025-06-09 Thread Dimitrios Apostolou
Rebased and attached new patch. Should I add it to July's commitfest? On Fri, 4 Apr 2025, Dimitrios Apostolou wrote: Hello list, based on the delays I experienced in pg_restore, as described at: https://www.postgresql.org/message-id/flat/6bd16bdb-aa5e-0512-739d-b84100596...@gmx.net I notice

Re: Feature: psql - display current search_path in prompt

2025-06-09 Thread Jelte Fennema-Nio
On Mon, 9 Jun 2025 at 17:54, Florents Tselai wrote: > Here’s a quick attempt that makes %S substitue for a search_path > Like > \set PROMPT1 'user:%n search_path: %S' + else + return PQuser(pset.db); That seems like a copy paste error. If we don't have data for it, we should either use

Re: Support tid range scan in parallel?

2025-06-09 Thread Cary Huang
Hi Junwang Thank you so much for the review! > + /* > + * if parallel mode is used, store startblock and numblocks in parallel > + * scan descriptor as well. > + */ > + if (scan->rs_base.rs_parallel != NULL) > + { > + ParallelBlockTableScanDesc bpscan = NULL; > + > + bpscan = (ParallelBl

Re: Batch TIDs lookup in ambulkdelete

2025-06-09 Thread Matheus Alcantara
On 06/06/25 18:34, Masahiko Sawada wrote: > > Thank you for the report. With the 0001 and 0002 patches, I got a > SEGV. I've fixed this issue in the attached updated version patches. > I've confirmed that the patches pass CI tests but I'm not sure it > fixes the shared memory segment leak problem y

Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.

2025-06-09 Thread Melanie Plageman
On Mon, Jun 2, 2025 at 8:15 PM Masahiko Sawada wrote: > > I think that this issue presents since commit c120550edb86 but this > commit optimized the vacuum work for tables with no indexes and wasn't > intended to change the FSM vacuum behavior for such tables. Therefore, > I think we can fix the F

Re: Proposal: Global Index for PostgreSQL

2025-06-09 Thread Bruce Momjian
On Mon, Jun 9, 2025 at 03:28:38PM +0530, Dilip Kumar wrote: > On Mon, Jun 9, 2025 at 2:03 PM Nikita Malakhov wrote: > > Global Indexes is a very interesting functionality that has both > > significant advantages > > and drawbacks, and the community seems not ready to accept it without very > >

Re: add function for creating/attaching hash table in DSM registry

2025-06-09 Thread Sami Imseih
> On Mon, Jun 09, 2025 at 03:10:30PM -0500, Sami Imseih wrote: > > One thing I noticed, and I´m not too fond of, is that the wait_event name > > shows > > up with the _dsh suffix: > > > > ``` > > postgres=# select query, wait_event, wait_event_type from pg_stat_activity ; > > query | wait_event >

Re: Cleanup gcc trick with varattrib_1b_e in VARATT_EXTERNAL_GET_POINTER()

2025-06-09 Thread Nathan Bossart
On Mon, Jun 09, 2025 at 05:21:19PM +0900, Michael Paquier wrote: > Back in b89e151054a0, the following macro has been introduced to > retrieve the varatt_external of an on-disk external TOAST Datum, stuff > now in detoast.h: > /* > * Macro to fetch the possibly-unaligned contents of an EXTERNAL da

Re: Cleaning up historical portability baggage

2025-06-09 Thread Thomas Munro
On Tue, Jun 10, 2025 at 2:25 AM Andres Freund wrote: > On 2025-06-09 15:25:22 +0200, Michael Banck wrote: > > On Thu, Aug 11, 2022 at 10:02:29PM +1200, Thomas Munro wrote: > > > Remove configure probe for sys/uio.h. > > > > Removing the configure probe is fine, but the patch also changes > > behav

Re: Improve tab completion for various SET/RESET forms

2025-06-09 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Hi hackers, > > I noticed that psql tab-completes every possible session-settable > variable after RESET, not just the ones that have actually been set in > the current session. However, as I was fixing that I noticed several > other deficiencies around other f

Improve tab completion for various SET/RESET forms

2025-06-09 Thread Dagfinn Ilmari Mannsåker
Hi hackers, I noticed that psql tab-completes every possible session-settable variable after RESET, not just the ones that have actually been set in the current session. However, as I was fixing that I noticed several other deficiencies around other forms of SET/RESET. So, here's the resulting y

Re: add function for creating/attaching hash table in DSM registry

2025-06-09 Thread Nathan Bossart
On Mon, Jun 09, 2025 at 03:10:30PM -0500, Sami Imseih wrote: > One thing I noticed, and I´m not too fond of, is that the wait_event name > shows > up with the _dsh suffix: > > ``` > postgres=# select query, wait_event, wait_event_type from pg_stat_activity ; > query | wait_event > | wait_event_ty

Re: add function for creating/attaching hash table in DSM registry

2025-06-09 Thread Sami Imseih
Thanks, I tested v2 a bit more and did a quick hack of pg_stat_statements just to get a feel for what it would take to use the new API to move the hash table from static to dynamic. One thing I noticed, and I’m not too fond of, is that the wait_event name shows up with the _dsh suffix: ``` postgr

Re: [PING] [PATCH v2] parallel pg_restore: avoid disk seeks when jumping short distance forward

2025-06-09 Thread Dimitrios Apostolou
Attached now... On Mon, 9 Jun 2025, Dimitrios Apostolou wrote: On Mon, 14 Apr 2025, Tom Lane wrote: You should add your patch to the July commitfest [1] to make sure we don't lose track of it. I rebased the patch (attached) and created an entry in the commitfest: https://commitfest.po

Re: [PING] [PATCH v2] parallel pg_restore: avoid disk seeks when jumping short distance forward

2025-06-09 Thread Dimitrios Apostolou
On Mon, 14 Apr 2025, Tom Lane wrote: You should add your patch to the July commitfest [1] to make sure we don't lose track of it. I rebased the patch (attached) and created an entry in the commitfest: https://commitfest.postgresql.org/patch/5809/ Thanks! Dimitris

Re: Question on error code selection in conflict detection

2025-06-09 Thread Robert Haas
On Mon, Jun 9, 2025 at 9:45 AM Dilip Kumar wrote: > I was reviewing the code for conflict reporting and became curious > about the choice of ERRCODE_T_R_SERIALIZATION_FAILURE. This error code > typically signifies a serialization failure within a transaction under > serializable isolation, so its

Re: pg_rewind: Doc update for PostgreSQL 18

2025-06-09 Thread Jesper Pedersen
Hi Nathan, On 6/9/25 3:15 PM, Nathan Bossart wrote: + the cluster was initialized with initdb. Data checksums + are enabled by default starting from PostgreSQL 18. must also be set to on, but is enabled by default. +1 for fixing this, but I'd like to bikeshed on the wording a bit.

Re: dsm_registry: Add detach and destroy features

2025-06-09 Thread Nathan Bossart
On Tue, Mar 18, 2025 at 10:05:07AM +0900, Sungwoo Chang wrote: > +/* > + * Attempt to destroy a named DSM segment > + * > + * This routine attempts to destroy the DSM segment. We unpin the dsm_segment > + * and delete the entry from dsm_registry_table. This may not destroy the > + * dsm_segment ins

Re: Batch TIDs lookup in ambulkdelete

2025-06-09 Thread Masahiko Sawada
On Fri, Jun 6, 2025 at 4:28 PM Peter Geoghegan wrote: > > On Fri, Jun 6, 2025 at 6:58 PM Masahiko Sawada wrote: > > Agreed. Given the above test results, it's unlikely always sorting the > > array helps speedups. > > Did you try specializing the sort? In my experience, it makes a big > differenc

Re: pg_rewind: Doc update for PostgreSQL 18

2025-06-09 Thread Nathan Bossart
On Mon, Jun 09, 2025 at 01:38:09PM -0400, Jesper Pedersen wrote: > pg_rewind requires that the target server > either has > the option enabled > in postgresql.conf or data checksums enabled when > - the cluster was initialized with initdb. > Neither of these > - are currently on

Re: strange perf regression with data checksums

2025-06-09 Thread Peter Geoghegan
On Mon, Jun 9, 2025 at 10:47 AM Peter Geoghegan wrote: > I've always thought that the whole idiom of testing > BTScanPosIsPinned() in a bunch of places was very brittle. I wonder if > it makes sense to totally replace those calls/tests with similar tests > of the new so->dropPin field. It's defin

Re: using extended statistics to improve join estimates

2025-06-09 Thread Ilia Evdokimov
Hi hackers Еhank you for your work. Let me start my review from the top — specifically, in clausesel.c, the function clauselist_selectivity_ext(): 1. About check clauses == NULL. In my opinion, this check should be kept. This issue has already been discussed previously[0], and I think it's

Re: CREATE DATABASE command for non-libc providers

2025-06-09 Thread Jeff Davis
On Fri, 2025-06-06 at 15:47 -0700, Jeff Davis wrote: > > > * Force the environment variables LC_COLLATE=C and LC_CTYPE=C > > > unconditionally, and pg_perm_setlocale() them > > > > Currently that would be a regression for some people, because > > when LC_CTYPE=C, the FTS parser produces substandar

pg_rewind: Doc update for PostgreSQL 18

2025-06-09 Thread Jesper Pedersen
Hi, Attached is a documentation update for pg_rewind since data checksums are enabled by default starting from PostgreSQL 18. Feedback welcome ! Best regards, Jesper diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml index 5485033ed8c..b305d788a6e 100644 --- a/doc

Re: Unnecessary connection overhead due copy-on-write (mainly openssl)

2025-06-09 Thread Jacob Champion
On Fri, Jun 6, 2025 at 1:18 PM Nico Williams wrote: > However no one will be using a discrete or firmware TPM for TLS server > certificate private key usage: discrete TPMs are way way too slow for > that, and firmware TPMs are... also way too slow. You wouldn't bother > with a software TPM for th

Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX

2025-06-09 Thread Robert Treat
On Sun, Jun 8, 2025 at 9:37 PM David Rowley wrote: > On Mon, 9 Jun 2025 at 06:53, Robert Treat wrote: > > On Sat, Jun 7, 2025 at 9:17 PM David Rowley wrote: > > > What are your thoughts on cached plans? In this scenario, do you > > > assume that waiting a few days means that connections get rese

Re: Amcheck verification of GiST and GIN

2025-06-09 Thread Arseniy Mukhin
On Mon, Jun 9, 2025 at 6:34 PM Tomas Vondra wrote: > > On 6/9/25 00:14, Tomas Vondra wrote: > > ... > > > > I propose to split it like this, into three parts, each addressing a > > particular type of mistake: > > > > 1) gin_check_posting_tree_parent_keys_consistency > > > > 2) gin_check_parent_key

Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

2025-06-09 Thread Vitaly Davydov
Hi Amit, > I think we can use this approach for HEAD and probably keep the > previous idea for backbranches. Keeping some value in shared_memory > per slot sounds risky to me in terms of introducing new bugs. Not sure, what kind of problems may occur. I propose to allocate in shmem an array of la

Re: Feature: psql - display current search_path in prompt

2025-06-09 Thread Florents Tselai
> On 8 Jun 2025, at 2:36 AM, Jelte Fennema-Nio wrote: > > On Sat, 7 Jun 2025 at 20:52, Lauri Siltanen wrote: >> I need to switch search_paths often. It would be tremendously helpful to see >> the current search_path in the prompt. > > That feature should be pretty easy to implement, now that

Re: Cleaning up historical portability baggage

2025-06-09 Thread Michael Banck
Hi, On Mon, Jun 09, 2025 at 10:25:23AM -0400, Andres Freund wrote: > I think our policy basically is that if it doesn't exist on the BF, it's > unsupported. Also note that Hurd is not listed as a supported OS: > https://www.postgresql.org/docs/devel/supported-platforms.html > > We can't design fo

Re: Amcheck verification of GiST and GIN

2025-06-09 Thread Tomas Vondra
On 6/9/25 00:14, Tomas Vondra wrote: > ... > > I propose to split it like this, into three parts, each addressing a > particular type of mistake: > > 1) gin_check_posting_tree_parent_keys_consistency > > 2) gin_check_parent_keys_consistency / att comparisons > > 3) gin_check_parent_keys_consiste

Re: queryId constant squashing does not support prepared statements

2025-06-09 Thread Sami Imseih
> I've spent a bunch of time looking at this series and here's my take on > the second one. Thanks! > I realized that the whole in_expr production in gram.y is pointless, and > the whole private struct that was added was unnecessary. A much simpler > solution is to remove in_expr, expand its use

Re: strange perf regression with data checksums

2025-06-09 Thread Peter Geoghegan
On Mon, Jun 9, 2025 at 8:48 AM Mihail Nikalayeu wrote: > I was rebasing [0] and noticed dropPin is not initialized in > btbeginscan, which seems to be suspicious for me. > Is it intended? That's pretty normal. We don't have access to the scan descriptor within btbeginscan. This is also why we do

Re: strange perf regression with data checksums

2025-06-09 Thread Peter Geoghegan
Hi Alexander, On Mon, Jun 9, 2025 at 2:00 AM Alexander Lakhin wrote: > Please look at the following script, which falsifies an assertion > TRAP: failed Assert("!BTScanPosIsPinned(so->currPos)"), File: "nbtutils.c", > Line: 3379, PID: 1621028 I can reproduce this. I think that it's an old bug.

Re: doc pg_constraint.convalidated column description need update

2025-06-09 Thread Robert Treat
On Mon, Jun 9, 2025 at 12:00 AM jian he wrote: > > On Thu, Jun 5, 2025 at 4:47 AM Robert Treat wrote: > > > > I think some of those changes are worth a second stab, so here is an > > updated patch which removes the ancillary tagging and corresponding > > line wrappings and focuses just on the wor

Re: Cleaning up historical portability baggage

2025-06-09 Thread Andres Freund
Hi, On 2025-06-09 15:25:22 +0200, Michael Banck wrote: > Hi Thomas, > > On Thu, Aug 11, 2022 at 10:02:29PM +1200, Thomas Munro wrote: > > Remove configure probe for sys/uio.h. > > Removing the configure probe is fine, but the patch also changes > behavior in the sense that IOV_MAX is now conside

Re: Add new wait event to XactLockTableWait

2025-06-09 Thread Dilip Kumar
On Mon, Jun 9, 2025 at 6:55 PM Xuneng Zhou wrote: > > Hi Dilip, > > Thanks for looking into this! > > On Mon, Jun 9, 2025 at 6:56 PM Dilip Kumar wrote: >> >> > Thanks for updating the patch! It looks good to me. >> > >> > I think we can mark it as "Ready for Committer" in the CommitFest. >> > Unl

Question on error code selection in conflict detection

2025-06-09 Thread Dilip Kumar
Hi, I was reviewing the code for conflict reporting and became curious about the choice of ERRCODE_T_R_SERIALIZATION_FAILURE. This error code typically signifies a serialization failure within a transaction under serializable isolation, so its use here for a different type of conflict seems somewh

Re: Add new wait event to XactLockTableWait

2025-06-09 Thread Xuneng Zhou
Hi Fujii-san, On Mon, Jun 9, 2025 at 4:48 PM Fujii Masao wrote: > > Thanks for updating the patch! It looks good to me. > > I think we can mark it as "Ready for Committer" in the CommitFest. > Unless there are any objections, I'll commit it once v19 development opens. > I've marked it as "Ready

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Andrew Dunstan
On 2025-06-09 Mo 4:27 AM, Fujii Masao wrote: On 2025/06/09 16:10, Shinya Kato wrote: Hi hackers, I'd like to propose a new feature for the COPY FROM command to allow skipping multiple header lines when loading data. This enhancement would enable files with multi-line headers to be loaded wi

Re: [PATCH] PGSERVICEFILE as part of a normal connection string

2025-06-09 Thread Ryo Kanbayashi
On Wed, Jun 4, 2025 at 1:42 PM Michael Paquier wrote: > > On Sun, Jun 01, 2025 at 09:36:08PM +0900, Ryo Kanbayashi wrote: > > Strictly speaking, in a Windows environment, a path containing a > > backslash is stored in the $td variable, so the value of the > > $srvfile_valid variable, which contain

Re: Add new wait event to XactLockTableWait

2025-06-09 Thread Xuneng Zhou
Hi Dilip, Thanks for looking into this! On Mon, Jun 9, 2025 at 6:56 PM Dilip Kumar wrote: > > Thanks for updating the patch! It looks good to me. > > > > I think we can mark it as "Ready for Committer" in the CommitFest. > > Unless there are any objections, I'll commit it once v19 development >

Re: Cleaning up historical portability baggage

2025-06-09 Thread Michael Banck
Hi Thomas, On Thu, Aug 11, 2022 at 10:02:29PM +1200, Thomas Munro wrote: > Remove configure probe for sys/uio.h. Removing the configure probe is fine, but the patch also changes behavior in the sense that IOV_MAX is now considered defined everywhere but on Windows. However, in the good-old GNU "w

Re: strange perf regression with data checksums

2025-06-09 Thread Mihail Nikalayeu
Hello, Peter! > > I also relocated the code that sets so.drop_pin from > _bt_preprocess_keys to btrescan. That seems like the more logical > place for it. > I was rebasing [0] and noticed dropPin is not initialized in btbeginscan, which seems to be suspicious for me. Is it intended? [0]: https:/

add column (query_start timestamptz) to progress report views

2025-06-09 Thread jian he
hi. for all the progress report views[1], we can add a timestamptz column, maybe named as query_start. People generally want to track the progress of operations and the time spent on them. While pg_stat_activity already provides column query_start, including query_start in pg_stat_get_progress_i

Re: Missing program_XXX calling in pgbench tests

2025-06-09 Thread Fujii Masao
On 2025/06/09 13:48, Hayato Kuroda (Fujitsu) wrote: Dear Fujii-san, I agree with Peter. I don't think patches 0002 and 0003 are necessary. As for 0004, it adds tests for the short options -? and -V, which duplicate the existing tests for the long options --help and --version. I'm not sure i

Re: Batch TIDs lookup in ambulkdelete

2025-06-09 Thread John Naylor
On Sat, Jun 7, 2025 at 4:34 AM Masahiko Sawada wrote: > BTW I found that the constant 'maxblkno' in test_tidstore.sql actually > equals to InvalidBlockNumber, but not MaxBlockNumber. I think it > doesn't make sense that TidStore uses InvalidBlockNumber as the key. > The attached 0001 patch fixes i

Re: Add new wait event to XactLockTableWait

2025-06-09 Thread Dilip Kumar
On Mon, Jun 9, 2025 at 2:18 PM Fujii Masao wrote: > > > > On 2025/06/09 14:19, Xuneng Zhou wrote: > > Hi, > > > > On Mon, Jun 9, 2025 at 12:52 PM Xuneng Zhou > > wrote: > > > > > > Hi, > > > > > > > Please find attached Version 2, incorporating the suggested chang

Re: Add enable_groupagg GUC parameter to control GroupAggregate usage

2025-06-09 Thread Ashutosh Bapat
On Fri, Jun 6, 2025 at 1:29 PM Tatsuro Yamada wrote: > Hi hackers, > > When I measured the execution time of a certain query with parallel query > enabled and disabled, I found that the execution time was slower when > parallel query was enabled. > > To improve the performance of the parallel que

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-09 Thread Xiaoran Wang
Just upload all the patches together. Xiaoran Wang 于2025年6月9日周一 18:25写道: > > > Steven Niu 于2025年6月9日周一 14:46写道: > >> Hi, >> >> I like the idea of your change as it saves me out of >> converting-in-my-mind. >> >> And I suggest to create a macro to do this job. >> #define getRmgrInfo(info

Re: queryId constant squashing does not support prepared statements

2025-06-09 Thread Álvaro Herrera
Hello, I've spent a bunch of time looking at this series and here's my take on the second one. (The testing patch is unchanged from Sami's). The third patch (for PARAM_EXTERNs) should be a mostly trivial rebase on top of these two. I realized that the whole in_expr production in gram.y is point

Re: why there is not VACUUM FULL CONCURRENTLY?

2025-06-09 Thread Antonin Houska
jian he wrote: > hi. > some more minor comments about v13-0001. > > GetCommandLogLevel also needs to specify LogStmtLevel for T_RepackStmt? Fixed in [1]. > /* > * (CLUSTER might change the order of > * rows on disk, which could affect the ordering of pg_dump > * output, but that's not seman

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-09 Thread Xiaoran Wang
Steven Niu 于2025年6月9日周一 14:46写道: > Hi, > > I like the idea of your change as it saves me out of converting-in-my-mind. > > And I suggest to create a macro to do this job. > #define getRmgrInfo(info) (info & XLR_RMGR_INFO_MASK) > > Then the code can become: > XLogRecGetInfo(record) & ~XLR_

Re: Enhance pg_createsubscriber to create required standby.

2025-06-09 Thread vignesh C
On Thu, 5 Jun 2025 at 01:50, Peter Eisentraut wrote: > > On 04.06.25 11:56, Amit Kapila wrote: > >> It's not clear to me how this change now would substantially improve the > >> user experience. The number of characters you type is approximately the > >> same. You still need to support the old m

Re: Proposal: Global Index for PostgreSQL

2025-06-09 Thread Dilip Kumar
On Mon, Jun 9, 2025 at 2:03 PM Nikita Malakhov wrote: > > Hi Dilip! Thanks Nikita for your response and reading my proposal. > Global Indexes is a very interesting functionality that has both significant > advantages > and drawbacks, and the community seems not ready to accept it without very

Re: [PATCH] Hex-coding optimizations using SVE on ARM.

2025-06-09 Thread chiranmoy.bhattacha...@fujitsu.com
Here's the rebased patch with a few modifications. The hand-unrolled hex encode performs better than the non-unrolled version on r8g.4xlarge. No improvement on m7g.4xlarge. Added line-by-line comments explaining the changes with an example. Below are the results. Input size is in bytes, and exec

RE: Suggestion to add --continue-client-on-abort option to pgbench

2025-06-09 Thread Hayato Kuroda (Fujitsu)
Dear Ikeda-san, Thanks for updating the patch! > 1. I should've also set benchmarking_option_set. I've modified it accordingly. Confirmed it has been fixed. Thanks. > 2. The exit-on-abort option and continue-on-error option are mutually > exclusive. > Therefore, I've updated the patch to thro

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Shinya Kato
2025年6月9日(月) 17:27 Fujii Masao : > I generally like the idea. Thanks. > However, a similar proposal was made earlier [1], and seemingly > some hackers weren't in favor of it. It's probably worth reading > that thread to understand the previous concerns. > > [1] > https://postgr.es/m/calay4q8ngsx

Re: Add new wait event to XactLockTableWait

2025-06-09 Thread Fujii Masao
On 2025/06/09 14:19, Xuneng Zhou wrote: Hi, On Mon, Jun 9, 2025 at 12:52 PM Xuneng Zhou mailto:xunengz...@gmail.com>> wrote: > > Hi, > > > Please find attached Version 2, incorporating the suggested changes. > > Apologies for the confusion — in the previous attempt, I mistakenly > name

Re: [PING] fallocate() causes btrfs to never compress postgresql files

2025-06-09 Thread Thomas Munro
On Tue, Jun 3, 2025 at 1:58 AM Dimitrios Apostolou wrote: > This sounds like the best solution IMO. People can then experiment with > different settings and filesystems, and that way we also learn in the > process. Thank you for the effort and patches so far. OK, here's a basic patch to experimen

Re: Proposal: Global Index for PostgreSQL

2025-06-09 Thread Nikita Malakhov
Hi Dilip! Global Indexes is a very interesting functionality that has both significant advantages and drawbacks, and the community seems not ready to accept it without very strong motivation. There was a more recent approach to Global index problem [1], please check it out. I've read you proposal

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Fujii Masao
On 2025/06/09 16:10, Shinya Kato wrote: Hi hackers, I'd like to propose a new feature for the COPY FROM command to allow skipping multiple header lines when loading data. This enhancement would enable files with multi-line headers to be loaded without any preprocessing, which would significan

Cleanup gcc trick with varattrib_1b_e in VARATT_EXTERNAL_GET_POINTER()

2025-06-09 Thread Michael Paquier
Hi, Back in b89e151054a0, the following macro has been introduced to retrieve the varatt_external of an on-disk external TOAST Datum, stuff now in detoast.h: /* * Macro to fetch the possibly-unaligned contents of an EXTERNAL datum * into a local "struct varatt_external" toast pointer. This shou

Re: [PATCH] Refactor: Extract XLogRecord info

2025-06-09 Thread wenhui qiu
HI > And I suggest to create a macro to do this job. >#define getRmgrInfo(info) (info & XLR_RMGR_INFO_MASK) > > Then the code can become: > XLogRecGetInfo(record) & ~XLR_INFO_MASK; > --> > getRmgrInfo(XLogRecGetInfo(record)) +1 Agreed, this makes the code more readable. Thanks On Mon, Jun

RE: [PATCH] Proposal: Improvements to PDF stylesheet and table column widths

2025-06-09 Thread Hayato Kuroda (Fujitsu)
Dear Saito-san, > - A patch that adds margins to admonition blocks. > - An updated image where I have highlighted the space with a red > border for clarity. > > The image shows: > - The original layout (top left) > - Only indentation set to 0 (top right) > - Indentation 0 plus admonition margins

Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Shinya Kato
Hi hackers, I'd like to propose a new feature for the COPY FROM command to allow skipping multiple header lines when loading data. This enhancement would enable files with multi-line headers to be loaded without any preprocessing, which would significantly improve usability. In real-world scenari