Re: GNU/Hurd portability patches

2025-09-20 Thread Alexander Lakhin
Hello hackers, 02.07.2025 02:53, Michael Paquier wrote: Catching up on this thread after-the-fact, specifically looking at 29213636e6cd as I did the original check tweaked here for O_RDONLY. Agreed that a backpatch should be OK as done. The buildfarm looks OK currently. Three months later we

Re: Thoughts on NBASE=100000000

2025-09-20 Thread Joel Jacobson
On Mon, Jul 8, 2024, at 13:42, Joel Jacobson wrote: > On Mon, Jul 8, 2024, at 12:45, Matthias van de Meent wrote: >> On Sun, 7 Jul 2024, 22:40 Joel Jacobson, wrote: >>> Today, since 64-bit architectures are dominant, NBASE=1e8 seems like it >>> would >>> have been the best choice, since the squar

RE: Conflict detection for update_deleted in logical replication

2025-09-20 Thread Zhijie Hou (Fujitsu)
On Friday, September 12, 2025 4:43 PM Amit Kapila wrote: > > On Fri, Sep 12, 2025 at 8:55 AM Zhijie Hou (Fujitsu) > wrote: > > > > I agree. Here is a V73 patch that will restart the worker if the > > retention resumes. I also addressed other comments posted by Amit[1]. > > > > Few comments: >

Re: Incorrect logic in XLogNeedsFlush()

2025-09-20 Thread Melanie Plageman
On Wed, Sep 10, 2025 at 3:58 AM Michael Paquier wrote: > > On Wed, Sep 10, 2025 at 12:48:21PM +0530, Dilip Kumar wrote: > >> So, looking at the code, it seems like most places we examine > >> ControlFile->minRecoveryPoint, we condition it on "InArchiveRecovery". > >> Is this something we want to d

Re: Extension security improvement: Add support for extensions with an owned schema

2025-09-20 Thread Robert Haas
On Sat, Sep 6, 2025 at 3:35 AM Jelte Fennema-Nio wrote: > I think that sounds like reasonable change to Roberts initial > proposal: Allowing the schema owner and superusers to add objects in > the schema, but disallow all other users (even if they have CREATE > privileges on the schema). I don't

Re: Incorrect result of bitmap heap scan.

2025-09-20 Thread Matthias van de Meent
On Tue, 16 Sept 2025 at 13:57, Core Studios Inc. wrote: > > Hello, > > We noticed a sustained increased in IO Wait of read queries after > upgrading from 13.13 to 13.21. Eventually, we narrowed it down to a > spike in index_blocks_read of a certain table where Bitmap Heap Scans do > happen. > > Do

[BUG] Query with postgres fwd deletes more tuples than it should

2025-09-20 Thread Daniil Davydov
Hi, If we create foreign table (via postgres_fdw) on a partitioned table, queries that don't use "direct modify" will delete too many tuples because of invalid "WHERE" clause. Please, see this script : -- CREATE DATABASE remote; CREATE DATABASE test; \c remote -- create partitioned table with t

Re: Make TID Scans recalculate the TIDs less often

2025-09-20 Thread Andrey Borodin
> On 17 Sep 2025, at 14:51, David Rowley wrote: > > What you'd need for this to ever be slow is lots of rescans, so > something like TID Scan on the inside of a nested loop. If you look at > ExecReScanTidScan() you'll see it pfrees the tss_TidList, which > requires that the list gets built all

Re: Use merge-based matching for MCVs in eqjoinsel

2025-09-20 Thread Ilia Evdokimov
On 08.09.2025 13:56, David Geier wrote: To evaluate it, I ran benchmarks on JOB with three variants: $ ./benchmark.sh master $ ./benchmark.sh merge $ ./benchmark.sh hash I compared total planning time across all 113 queries. Was this running with optimizations? How did you extract the plannin

Re: Query Performance Degradation Due to Partition Scan Order – PostgreSQL v17.6

2025-09-20 Thread Andrei Lepikhov
On 8/9/2025 13:39, Vivek Gadge wrote: For example, when a query runs on a partitioned table, PostgreSQL scans partitions in the order they were created or attached to the parent table. In our case (monthly partitions from January through September), this means that queries looking for recent

Re: GB18030-2022 Support in PostgreSQL

2025-09-20 Thread Chao Li
Hi John, Thanks for working on v9. > On Sep 18, 2025, at 15:59, John Naylor wrote: > > > It'll be a good idea to communicate how to detect (unlikely but not > impossible) incompatibilities for existing systems, but I don't think > committing needs to wait for that piece. > > -- > John Naylor

Re: [PATCH] ternary reloption type

2025-09-20 Thread Timur Magomedov
Hello Nikolay! Found a typo in reloptions.h, treaed -> treated. Can ternary enum be added in a separate header file, say, src/include/ternary.h instead of adding it to c.h? I'm just not sure if c.h is it the right place for relation-options-specific code. Of course, I can be wrong. -- Regard

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-09-20 Thread Masahiko Sawada
On Wed, Aug 13, 2025 at 11:37 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Mon, 28 Jul 2025 22:19:36 -0700, > Masahiko Sawada wrote: > > > The fields in 1 are mostly static fields, and the fields in 2 and 3 > > are li

Re: RFC: Logging plan of the running query

2025-09-20 Thread Robert Haas
On Mon, Sep 1, 2025 at 9:35 AM torikoshia wrote: > Rebased just because of doc refactoring. I haven't had time to review this in a while -- sorry about that -- and I have only limited time now, but let me try to give you some comments in the time that I do have. I bet some users would really lik

Re: Only one version can be installed when using extension_control_path

2025-09-20 Thread Peter Eisentraut
On 10.09.25 09:48, Pierrick wrote: On 09/09/2025 16:18, Matheus Alcantara wrote: On Tue Sep 9, 2025 at 4:53 AM -03, Pierrick wrote: On 08/09/2025 17:35, Tom Lane wrote: "David G. Johnston" writes: On Monday, September 8, 2025, Matheus Alcantara wrote: On this step it will search the .control

Re: issue with synchronized_standby_slots

2025-09-20 Thread Ashutosh Sharma
On Wed, Sep 10, 2025 at 3:33 PM Rahila Syed wrote: > > Hi, > > >> As for the synchronized_standby_slots, we can follow the behavior >> similar to check_synchronous_standby_names and just give parsing >> ERRORs. Any non-existent slot related errors can be given when that >> parameter is later used

Re: Only one version can be installed when using extension_control_path

2025-09-20 Thread Tom Lane
"David G. Johnston" writes: > On Monday, September 8, 2025, Matheus Alcantara > wrote: >> On this step it will search the .control >> file on paths at extension_control_path in order and it will use the >> first one that it finds and based on the .control file found it will >> install the extensi

RE: Conflict detection for update_deleted in logical replication

2025-09-20 Thread Zhijie Hou (Fujitsu)
On Wednesday, September 3, 2025 12:19 PM shveta malik wrote: > On Tue, Sep 2, 2025 at 3:30 PM shveta malik > wrote: > > > > > > > > > > > > > Here is V70 patch set. > > > > > > > > > Please find a few comments on v70-003: > > 1) > Doc of dead_tuple_retention_active says: > True if retain_dead_

Re: Add support for specifying tables in pg_createsubscriber.

2025-09-20 Thread Peter Smith
Hi Shubham, IIUC the v6 will be rewritten to remove the new option, in favour of just redefining the --publication option behaviour. So, much of the current v6 will become obsolete. The below comment is just for one piece of code that I thought will survive the rewrite. == src/bin/pg_basebac

Re: Clear logical slot's 'synced' flag on promotion of standby

2025-09-20 Thread Ashutosh Sharma
On Thu, Sep 18, 2025 at 5:20 PM Ashutosh Sharma wrote: > > Hi Ajin, > > On Thu, Sep 18, 2025 at 4:16 PM Ajin Cherian wrote: > > > > On Fri, Sep 12, 2025 at 1:56 PM shveta malik wrote: > > > > > > The approach seems valid and should work, but introducing a new file > > > like promote.inprogress f

Re: Adding basic NUMA awareness

2025-09-20 Thread Tomas Vondra
On 9/11/25 10:32, Tomas Vondra wrote: > ... > > For example, we may get confused about the memory page size. The "size" > happens before allocation, and at that point we don't know if we succeed > in getting enough huge pages. When "init" happens, we already know that, > so our "memory page size"

Re: GetNamedLWLockTranche crashes on Windows in normal backend

2025-09-20 Thread Nathan Bossart
I've committed 0001, and I plan to look closer at 0002 soon. -- nathan

Re: plan shape work

2025-09-20 Thread Tom Lane
Robert Haas writes: > On Thu, Sep 11, 2025 at 2:19 PM Tom Lane wrote: >> If we're going to attach more labeling to the plan nodes, I'd >> prefer to do what I suggested and label the nodes with the specific >> outer join that they think they are implementing. With Richard's >> proposal it will re

Re: Error with DEFAULT VALUE in temp table

2025-09-20 Thread Tom Lane
Sergey Shinderuk writes: > Thank you for working on this. I see you've fixed the patch and > committed it as a0b99fc1220. I tested it a bit and see some side effects > which may be unintentional. Many thanks for double-checking! > 1. SCHEMA lost object_name. Ugh. I was misled first by assumi

Re: PgStat_HashKey padding issue when passed by reference

2025-09-20 Thread Sami Imseih
> More suggestions or a better sentence are of course welcome. > "NB: We assume that this struct contains no padding. The 8 bytes > allocated for the object ID are good enough to ensure the uniqueness > of the hash key, hence the addition of new fields is not recommended." That sounds correct. H

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-09-20 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Mon, 8 Sep 2025 14:08:16 -0700, Masahiko Sawada wrote: >> > The fields in 1 are mostly static fields, and the fields in 2 and 3 >> > are likely to be accessed in hot functions during COPY FROM. Would it >>

Re: REPACK and naming

2025-09-20 Thread Bruce Momjian
On Wed, Sep 17, 2025 at 01:42:29AM +0200, Álvaro Herrera wrote: > Hi, > > On 2025-Sep-16, Bruce Momjian wrote: > > > I am starting to get worried about the confusing of adding a REPACK > > command. We already have a lot of confusion around vacuum and analyze: > > > > * autoanalyze does vacuum

Re: Incorrect logic in XLogNeedsFlush()

2025-09-20 Thread Melanie Plageman
On Tue, Sep 9, 2025 at 9:50 PM Jeff Davis wrote: > > On Tue, 2025-09-09 at 16:29 -0400, Melanie Plageman wrote: > > > Though, it seems like LocalMinRecoveryPoint must be getting > > incorrectly set elsewhere, otherwise this would have guarded us from > > examining the control file: > > I am confus

Re: Remove custom redundant full page write description from GIN

2025-09-20 Thread Andrey Borodin
> On 15 Sep 2025, at 17:56, Kirill Reshke wrote: > > I suggest removing this custom FPW support. I agree that extra message adds no value. Generic FPW message has the same "for verification" details too. I've checked if there are any other similar cases, but found non FPW indications in oth

Re: Checkpointer write combining

2025-09-20 Thread Chao Li
> On Sep 10, 2025, at 01:55, Melanie Plageman wrote: > > > [1] > https://www.postgresql.org/message-id/flat/CAAKRu_Yjn4mvN9NBxtmsCQSGwup45CoA4e05nhR7ADP-v0WCig%40mail.gmail.com > 1 - 0001 ``` --- a/src/backend/storage/buffer/freelist.c +++ b/src/backend/storage/buffer/freelist.c + * The b

Re: Mark ItemPointer arguments as const thoughoutly

2025-09-20 Thread Chao Li
v2 tries to fix the CI failure. Chao Li (Evan) - HighGo Software Co., Ltd. https://www.highgo.com/ v2-0001-Mark-ItemPointer-arguments-as-const-thoughoutly.patch Description: Binary data

Re: Solaris compiler status

2025-09-20 Thread Peter Eisentraut
On 04.09.25 18:29, Tom Lane wrote: Peter Eisentraut writes: Here is a patch set to remove what turns out to be a significant amount of code and documentation to support this compiler. Looks generally sane by eyeball -- I did not grep for anything that you missed. I concur with Andres that ta

Re: GetNamedLWLockTranche crashes on Windows in normal backend

2025-09-20 Thread Nathan Bossart
On Mon, Sep 08, 2025 at 11:55:14AM -0500, Nathan Bossart wrote: > I've started preparing this for commit, and I realized that restricting > GetNamedLWLockTranche() to shmem_startup_hook is not sufficient. > EXEC_BACKEND builds will run this hook in every backend, so unless it's > guarded behind som

Re: Clear logical slot's 'synced' flag on promotion of standby

2025-09-20 Thread Ajin Cherian
On Fri, Sep 12, 2025 at 1:56 PM shveta malik wrote: > > The approach seems valid and should work, but introducing a new file > like promote.inprogress for this purpose might be excessive. We can > first try analyzing existing information to determine whether we can > distinguish between the two sc

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-09-20 Thread Nazir Bilal Yavuz
Hi, On Thu, 11 Sept 2025 at 17:55, Jacob Champion wrote: > > On Thu, Sep 11, 2025 at 7:18 AM Peter Eisentraut wrote: > > I don't think we need this level of complication. We already have the > > situation that for example "linux" covers several tasks > > Recently, I've wished that it were other

Re: Incorrect logic in XLogNeedsFlush()

2025-09-20 Thread Dilip Kumar
On Mon, Sep 15, 2025 at 8:28 PM Melanie Plageman wrote: > > On Sun, Sep 14, 2025 at 4:10 AM Dilip Kumar wrote: > > > > OTOH, when creating a RestartPoint during standby replay or doing > > archive recovery, access to both LocalMinRecoveryPoint and > > ControlFile->minRecoveryPoint is correct. By

Re: --with-llvm on 32-bit platforms?

2025-09-20 Thread Tom Lane
Dmitry Mityugov writes: > Peter Eisentraut wrote 2025-09-15 09:36: >> It seems plausible that this is related to commit 2a600a93c7b "Make >> type Datum be 8 bytes wide everywhere.". I don't have any more >> insights than that. > Thanks for the hint. I did git bisect, and [ Peter's right ] Int

RE: AIX support

2025-09-20 Thread Srirama Kucherlapati
Hi Bruce, Please find the attached patch that is run on master branch PG19. Kindly request you to go through and let us know your feedback. Also attached are the builfarm results. Warm regards, Sriram. 0001-Changes-to-add-support-for-AIX.v9.pg19.patch Description: 0001-Changes-to-add-support-f

Re: Fix inconsistencies with code and beautify xlog structures description and fin hash_xlog.h

2025-09-20 Thread Andrey Borodin
> On 5 Sep 2025, at 11:24, Kirill Reshke wrote: > > PFA v2 Proposed change is correct and in line with a description of e.g. XLOG_HASH_MOVE_PAGE_CONTENTS. I'd note that block is for lock only and record does not include image, but other such cases are not reported in comments. Best regard

Invalid primary_slot_name triggers warnings in all processes on reload

2025-09-20 Thread Fujii Masao
Hi, While reviewing the patch at [1], I noticed that if primary_slot_name is set to an invalid slot name in postgresql.conf and the configuration file is reloaded, all running postgres processes emit the WARNING message as follows. Isn't this a bug? To fix this issue, GUC_check_errmsg() should be

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

2025-09-20 Thread Nathan Bossart
On Fri, Sep 12, 2025 at 06:49:01PM +, [email protected] wrote: > Using simd.h does make it easier to maintain. Is there a plan to upgrade > simd.h to use SSE4 or SSSE3 in the future? Since SSE2 is much older, it > lacks some of the more specialized intrinsics. For example,

Re: Making type Datum be 8 bytes everywhere

2025-09-20 Thread Tomas Vondra
Hi, While testing a different patch, I tried running with address sanitizer on rpi5, running the 32-bit OS (which AFAIK is 64-bit kernel and 32-bit user space). With that, stats_ext regression tests fail like this: extended_stats.c:1082:27: runtime error: store to misaligned address 0x036671dc fo

Re: [BUG] PostgreSQL crashes with ThreadSanitizer during early initialization

2025-09-20 Thread Emmanuel Sibi
Hi Quan, Thanks for testing the patch! I'm glad it resolves the startup crash. > I tested this patch. postgres -V no longer crashes. Regarding the shutdown issue - I tested extensively with ThreadSanitizer enabled using both build configurations I mentioned earlier, and all shutdown modes work cor

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-09-20 Thread Peter Eisentraut
On 08.09.25 10:25, Nazir Bilal Yavuz wrote: Tasks have short names to select them and the 'Windows VS 2019' task's name was 'windows' (i.e: ci-os-only: windows) but since we have two Windows tasks now; we need to have different names for VS 2019 and VS 2022 tasks. To preserve the same behavior,

Re: PgStat_HashKey padding issue when passed by reference

2025-09-20 Thread Sami Imseih
> > Exactly. Hence my proposal of static assertion is doing exactly the > job I want it to do :) But my concern is the flexibility of this approach. If someone is to add an OID field next, they will not be able to as that will be introducing padding. On the other hand, passing the key by referen

Re: plan shape work

2025-09-20 Thread Robert Haas
On Wed, Sep 10, 2025 at 3:16 AM Richard Guo wrote: > Hmm, this isn't quite what I had in mind. What I was thinking is that > the outer join relids included in joinrel->relids can also be found > from its outer or inner. For example, consider a query like: > > (A leftjoin B on (Pab)) leftjoin C

Re: PG 18 relnotes and RC1

2025-09-20 Thread Nathan Bossart
On Thu, Sep 18, 2025 at 03:05:52PM -0400, Jonathan S. Katz wrote: > Many thanks to Nathan for pulling this together. Please see v3. Feedback > welcome. I'm hoping to commit this around 20:00 UTC today, and I will be happy to address any feedback that folks have in the meantime. -- nathan

Re: magical eref alias names

2025-09-20 Thread Robert Haas
On Wed, Jul 23, 2025 at 5:35 PM Tom Lane wrote: > [ returning to this thread now that v19 is open for business ] Thanks for your attention to this, and sorry for the slow response. > I think the case this is worried about is that if you have a parent > table t(a,b,c), and the query writes say "t

pg_stat_statements: faster search by queryid

2025-09-20 Thread Karina Litskevich
Hi hackers, Aleksandra Bondar and I are proposing the following patch for pg_stat_statements. The idea. - Currently, to get statistics on a specific query, you should execute SELECT * FROM pg_stat_statements WHERE queryid = specific_queryid; This takes a long time because the pg_stat_

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-09-20 Thread Ajin Cherian
On Thu, Sep 4, 2025 at 4:35 PM shveta malik wrote: > > On Wed, Sep 3, 2025 at 3:19 PM Ajin Cherian wrote: > > Thanks for the patch. Please find a few comments: > > 1) > /* Clean up slot_names if allocated in TopMemoryContext */ > if (slot_names) > { > oldcontext = MemoryContextSwitchTo(TopMemoryC

Re: Use WALReadFromBuffers in more places

2025-09-20 Thread Rahila Syed
Hi Bharath, Hi, > > Commit 91f2cae7a4e that introduced WALReadFromBuffers only used it for > physical walsenders. It can also be used in more places benefitting > logical walsenders, backends running pg_walinspect and logical > decoding functions if the WAL is available in WAL buffers. I'm > atta

Re: A performance regression issue with Memoize

2025-09-20 Thread Robert Haas
On Tue, Jul 29, 2025 at 12:57 AM Tom Lane wrote: > David Rowley writes: > > For the record, I 100% agree that there will always be cases where > > statistics are just unable to represent what is discovered at > > run-time, so having some sort of ability to adapt at run-time seems > > like a natur

Re: Proposal for enabling auto-vectorization for checksum calculations

2025-09-20 Thread root
Hi John, Thanks for the feedback. This is v5 of the patchset, updated following your comments: - Moved the function pointer definitions out of common headers and into src/port, consistent with existing practice. Thanks again for the guidance. Best regards, Kim Andrew

Re: [BUG?] check_exclusion_or_unique_constraint false negative

2025-09-20 Thread Mihail Nikalayeu
Rebased. Also, separate thread with some additional explanation is here: https://www.postgresql.org/message-id/flat/cadzflwxzvmbo11tfs_g2i+6tffvwhu4vuuseoqb+8uqfuoj...@mail.gmail.com v12-0002-Fix-logical-replication-conflict-detection-durin.patch Description: Binary data v12-0001-This-patch-i

Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles

2025-09-20 Thread Dilip Kumar
On Tue, Sep 9, 2025 at 12:28 PM Amit Kapila wrote: > > On Mon, Sep 8, 2025 at 3:03 PM Nitin Motiani wrote: > > > > I'd like to propose a patch to allow accepting connections post recovery > > without waiting for the removal of old xlog files. > > > > Why : We have seen instances where the crash

Re: encode/decode support for base64url

2025-09-20 Thread Daniel Gustafsson
> On 19 Sep 2025, at 23:04, Daniel Gustafsson wrote: > >> On 18 Sep 2025, at 21:19, Daniel Gustafsson wrote: > >> .. else I'll take care of it tomorrow. > > FWIW since there were new reviews and comments I wanted to allow some more > time > for additional comments, so will do this over the we

Re: psql: Count all table footer lines in pager setup

2025-09-20 Thread Erik Wienhold
On 2025-08-19 03:52 +0200, Erik Wienhold wrote: > On 2025-08-17 17:19 +0200, Tom Lane wrote: > > This appears to fix the problem it sets out to fix, but it looks > > to me like there are adjacent problems of the same ilk; do you > > feel like looking at those? > > > > Specifically, I wondered whet

Re: allow benign typedef redefinitions (C11)

2025-09-20 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > Here's a proposed fix. I didn't test this, but it passes an eyeball sanity check and looks like an improvement overall. regards, tom lane

Re: BF mamba failure

2025-09-20 Thread Michael Paquier
On Tue, Sep 09, 2025 at 04:07:45PM +0300, Kouber Saparev wrote: > Yet again one of our replicas died. Should I file a bug report or > something, what should we do in order to prevent it? Restart the database > every month/week or so?... I don't think we need another bug to report the same problem.

Re: PostgreSQL 18 GA press release draft

2025-09-20 Thread Jonathan S. Katz
On 9/9/25 11:13 PM, Jonathan S. Katz wrote: Hi, Attached is a draft of the PostgreSQL 18 GA press release. A few comments before the ask for reviewing: * I still need to write up the theme and the quote, which I'll provide tomorrow after hearing the first round of feedback * The release is a

stray references to SubscriptRef type

2025-09-20 Thread Peter Eisentraut
There are several mentions in code comments of a SubscriptRef type, but that type does not exist and AFAICT never existed. (Perhaps it existed in in-development code at some point.) I think in several of those cases this clearly meant the type SubscriptingRef instead. But the mentions in sr

Re: Use merge-based matching for MCVs in eqjoinsel

2025-09-20 Thread David Geier
Hi Ilia! On 05.09.2025 16:03, David Geier wrote: >>> I propose an optimization: when the column datatype supports >>> ordering(i.e., has < and >), we can sort both MCV lists and apply >>> mege-style algorithm to detect matches. This reduces runtime from >>> O(N^2) to O(NlogN), where N is the numbe

Re: Making type Datum be 8 bytes everywhere

2025-09-20 Thread Robert Haas
On Thu, Jul 17, 2025 at 8:10 PM Tom Lane wrote: > In a discussion on Discord (in the PG #core-hacking channel, > which unfortunately is inaccessible to non-members), Andres > and Robert complained about the development/maintenance costs > of continuing to support 32-bit platforms. Here is a modes

Re: OAuth client code doesn't work with Google OAuth

2025-09-20 Thread Jacob Champion
On Tue, Sep 9, 2025 at 1:16 AM Zsolt Parragi wrote: > You still can't add custom scopes to google. But in the most basic use > case for this if you have an organization setup, you can restrict > authentication to that organization. After that there still has to be > a postgres user, and possibly a

RE: Conflict detection for update_deleted in logical replication

2025-09-20 Thread Zhijie Hou (Fujitsu)
On Monday, September 8, 2025 7:21 PM Zhijie Hou (Fujitsu) wrote: > > On Monday, September 8, 2025 3:13 PM Amit Kapila > wrote: > > > > On Fri, Sep 5, 2025 at 5:03 PM Zhijie Hou (Fujitsu) > > > > wrote: > > > > > > Here are v2 patches which addressed above comments. > > > > > > > I have pushed

Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

2025-09-20 Thread Mihail Nikalayeu
Hi! > Hello, Antonin! > > if (using_subtxn) > { >RollbackAndReleaseCurrentSubTransaction(); >MemoryContextSwitchTo(ccxt); >CurrentResourceOwner = cowner; > } > > IIUC memory context is already switched above: > > MemoryContext ecxt = MemoryContextSwitchTo(cc

Re: Fix missing EvalPlanQual recheck for TID scans

2025-09-20 Thread David Rowley
On Tue, 16 Sept 2025 at 05:42, Sophie Alpert wrote: > Thanks, this seems sensible given the reality that rescan happens once per > tuple. The `if (node->tss_TidList == NULL)` check you kept from me seems > likewise pointless in v3-0001 but not particularly intrusive (though of > course you use

Re: Improving the names generated for indexes on expressions

2025-09-20 Thread Pavel Stehule
Hi út 16. 9. 2025 v 3:57 odesílatel Tom Lane napsal: > In the wake of the discussion around bug #18959 [1], here is > a modest proposal for improving the names we pick for expression > indexes. The commit message explains the details, but this > example should give the flavor: > > postgres=# cr

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-09-20 Thread Amit Kapila
On Mon, Sep 8, 2025 at 11:14 PM Masahiko Sawada wrote: > > On Fri, Sep 5, 2025 at 8:50 PM Amit Kapila wrote: > > > > On Thu, Sep 4, 2025 at 1:24 AM Masahiko Sawada > > wrote: > > > > > > > > 2. > > > > - /* > > > > - * Invalidate logical slots if we are in hot standby and the primary > > > > -

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-09-20 Thread Sami Imseih
>> This makes me wonder then if all it takes is just adding this to PortalDrop >> (proposed earlier in the thread by Frédéric): > One thing I did not like about that approach is that we will need to > save the current debug_query_string inside PortalDrop before > temporarily setting it to the one

Re: Proposal: Conflict log history table for Logical Replication

2025-09-20 Thread Dilip Kumar
On Thu, Sep 11, 2025 at 8:43 AM Amit Kapila wrote: > > On Thu, Sep 11, 2025 at 12:53 AM Bharath Rupireddy > wrote: > > > > On Tue, Aug 5, 2025 at 5:24 AM Dilip Kumar wrote: > > > > > > Currently we log conflicts to the server's log file and updates, this > > > approach has limitations, 1) Diffic

Re: Having postgresql.org link to cgit instead of gitweb

2025-09-20 Thread Álvaro Herrera
On 2025-Sep-19, Peter Eisentraut wrote: > On 19.09.25 03:12, Jonathan S. Katz wrote: > > * Moves any web links to git.postgresql.org repos to use the cgit > > interface instead of gitweb (e.g. [1]) > > * Update the commit search[2] to use cgit instead of gitweb > > If we're doing that -- which se

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

2025-09-20 Thread Rintaro Ikeda
Thank you for reviewing the patches. On 2025/09/19 20:56, Yugo Nagata wrote: A client's run is aborted in case of a serious error; for example, the connection with the database server was lost or the end of script was reached without completing the last transaction. The clien

Re: Incorrect logic in XLogNeedsFlush()

2025-09-20 Thread Dilip Kumar
On Fri, Sep 12, 2025 at 10:02 PM Jeff Davis wrote: > > On Fri, 2025-09-12 at 14:04 +0900, Michael Paquier wrote: > > On Fri, Sep 12, 2025 at 10:21:27AM +0530, Dilip Kumar wrote: > > > Yeah, asserting it at the end makes sense, as we can ensure that > > > XLogFlush() and XLogNeedsFlush() agree on t

Re: Having postgresql.org link to cgit instead of gitweb

2025-09-20 Thread Jonathan S. Katz
On 9/19/25 12:17 PM, Tom Lane wrote: Peter Geoghegan writes: cgit messes up indentation by showing 8 space tabs (not 4 space tabs) -- that's certainly not ideal. To me that seems like a complete blocker for this proposal, if we can't find a fix. On a quick read, I believe this is easily set

StatisticsObjIsVisibleExt lacks "do not look in temp namespace"

2025-09-20 Thread Noah Misch
StatisticsObjIsVisibleExt() lacks the "do not look in temp namespace" code of the rest of the non-relation, non-type namespace searches. Patch attached. See its log messages for the consequences. Incidentally, stats on temp tables do default to a permanent schema. That seems fine, though: set s

Re: PgStat_HashKey padding issue when passed by reference

2025-09-20 Thread Ranier Vilela
Em qua., 10 de set. de 2025 às 23:53, Michael Paquier escreveu: > On Mon, Sep 08, 2025 at 09:36:52PM -0500, Sami Imseih wrote: > > But my concern is the flexibility of this approach. If someone is to add > an > > OID field next, they will not be able to as that will be introducing > > padding. O

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-09-20 Thread Nazir Bilal Yavuz
Hi, On Mon, 8 Sept 2025 at 11:25, Nazir Bilal Yavuz wrote: > > Example CI task after the PR is merged and 0002 is committed: > https://cirrus-ci.com/build/5976334188412928 (I manually triggered the > VS 2019 task, it will not be run automatically after the 0002 is > committed). I forgot to updat

Re: Extension security improvement: Add support for extensions with an owned schema

2025-09-20 Thread Robert Haas
On Thu, Sep 11, 2025 at 9:29 AM Jelte Fennema-Nio wrote: > You recall incorrectly ;) It only does that when you do: > DROP EXTENSION ... CASCADE > > Otherwise you get errors like this: > > DROP EXTENSION test_ext_owned_schema; > ERROR: cannot drop extension test_ext_owned_schema because other >

Re: Eager aggregation, take 3

2025-09-20 Thread Robert Haas
On Tue, Sep 9, 2025 at 5:20 AM Richard Guo wrote: > Yeah, ideally we should tell whether an aggregate's transition state > may grow unbounded just by looking at system catalogs. Unfortunately, > after trying for a while, it seems to me that the current catalog > doesn't provide enough information

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

2025-09-20 Thread Yugo Nagata
On Thu, 18 Sep 2025 14:37:29 +0900 Fujii Masao wrote: > On Thu, Sep 18, 2025 at 10:22 AM Yugo Nagata wrote: > > That makes sense. How about rewriting this like: > > > > However, if the --continue-on-error option is specified and the error > > occurs in > > an SQL command, the client does not

Re: AIX support

2025-09-20 Thread Alvaro Herrera
On 2025-Sep-03, Srirama Kucherlapati wrote: > As part of our ongoing efforts to enhance AIX platform compatibility, > we’ve been running the code across all stable PostgreSQL release > branches using the build farm infrastructure. All test suites, > including TAP tests, are passing consistently, i

Re: allow benign typedef redefinitions (C11)

2025-09-20 Thread Álvaro Herrera
On 2025-Sep-19, Tom Lane wrote: > Sooner or later we need to work out a subsystem hierarchy that > can define which headers should be allowed to include which > other ones. I have no clear ideas about what that should look > like, but I think the need for it gets ever more urgent. I agree, we sh

Re: access numeric data in module

2025-09-20 Thread Ed Behn
Good morning- It looks like the proposed change associated with this thread has languished (https://commitfest.postgresql.org/patch/5623/). Is there anything I can do to get it rolling again? -Ed On Sat, Mar 1, 2025 at 5:25 PM Ed Behn wrote: > Tom- > I understand that

Re: Proposal: Conflict log history table for Logical Replication

2025-09-20 Thread Amit Kapila
On Thu, Sep 18, 2025 at 11:46 PM Masahiko Sawada wrote: > > On Thu, Sep 18, 2025 at 1:33 AM Amit Kapila wrote: > > > > If we compare conflict_history_table with the slot that gets created > > with subscription, one can say the same thing about slots. Users can > > drop the slots and whole replica

Re: Use WALReadFromBuffers in more places

2025-09-20 Thread Jingtang Zhang
Hi~ > Thanks for looking at this. Yes, the WAL writers can zero out flushed > buffers before WALReadFromBuffers gets to them. However, > WALReadFromBuffers was intentionally designed as an opportunistic > optimization - it's a "try this first, quickly" approach before > falling back to reading fro

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-09-20 Thread Ashutosh Bapat
On Fri, Sep 12, 2025 at 2:26 PM Ashutosh Bapat wrote: > > On Fri, Sep 12, 2025 at 9:38 AM Amit Kapila wrote: > > > > > > One thing related to this which needs a discussion is after this > > change, it is possible that part of the transaction contains > > additional logical_wal_info. I couldn't th

Re: Introduce XID age based replication slot invalidation

2025-09-20 Thread John H
Hi Hayato, Thank you for taking a look. > > The patch currently attempts to invalidate once-per-autovacuum worker. > > We're wondering if it should attempt invalidation on a per-relation > > basis within the vacuum call itself. That would account for scenarios > > where the cost_delay or naptime