Re: Removing unneeded self joins

2025-06-26 Thread Andrei Lepikhov
On 27/6/2025 02:26, Michael Paquier wrote: The point regarding the search join hook may stand, though. Perhaps somebody should check if we're still OK with this change in the context of the self-join work. I tend to think that we are and I agree that removing the joins when calling the hook can

Re: IPC/MultixactCreation on the Standby server

2025-06-26 Thread Dmitry
On 26.06.2025 19:24, Andrey Borodin wrote: If my hypothesis is correct nextMXact will precede tmpMXact. It seems that the hypothesis has not been confirmed. Attempt #1 2025-06-26 23:47:24.821 MSK [220458] WARNING:  Timed out: nextMXact 24138381 tmpMXact 24138379 2025-06-26 23:47:24.822 MSK [2

Re: ALTER TABLE ALTER CONSTRAINT misleading error message

2025-06-26 Thread Fujii Masao
On 2025/06/18 1:00, Fujii Masao wrote: I had overlooked that commands other than ALTER TABLE can also trigger this error. So mentioning just ALTER TABLE ... might be a bit misleading. Would it be better to use a message like "ALTER action ALTER CONSTRAINT ... NOT VALID is not supported", simila

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

2025-06-26 Thread Yugo Nagata
On Fri, 27 Jun 2025 14:06:24 +0900 ikedarintarof wrote: > Hi, > > Thank you very much for your valuable comments and kind advice. I'm > currently working on revising the previous patch based on the feedback > received. I would like to share my thoughts regarding the conditions > under which t

Re: pg_restore --no-policies should not restore policies' comment

2025-06-26 Thread Fujii Masao
On 2025/06/27 13:08, jian he wrote: hi. first looking at function dumpPolicy (pg_dump.c): appendPQExpBuffer(polprefix, "POLICY %s ON", fmtId(polinfo->polname)); tag = psprintf("%s %s", tbinfo->dobj.name, polinfo->dobj.name); if (polinfo->dobj.dum

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

2025-06-26 Thread ikedarintarof
Hi, Thank you very much for your valuable comments and kind advice. I'm currently working on revising the previous patch based on the feedback received. I would like to share my thoughts regarding the conditions under which the --continue-on-error option should initiate a new transaction or a

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

2025-06-26 Thread Dilip Kumar
On Thu, Jun 26, 2025 at 3:20 AM Alexander Korotkov wrote: > > On Wed, Jun 25, 2025 at 11:25 AM Dilip Kumar wrote: > > On Wed, Jun 25, 2025 at 1:18 PM Hayato Kuroda (Fujitsu) > > wrote: > > > Another idea is to call ReplicationSlotsComputeRequiredLSN() when at > > > least one > > > of the restar

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Yugo Nagata
On Fri, 27 Jun 2025 12:22:17 +0900 Fujii Masao wrote: > > However, your patch is clear, and it seems we don't need to worry about > > this concern. > > Your patch looks good to me. > > Thanks for reviewing the patch! I've marked it as ready for committer. I have a few minor comment on the patc

pg_restore --no-policies should not restore policies' comment

2025-06-26 Thread jian he
hi. first looking at function dumpPolicy (pg_dump.c): appendPQExpBuffer(polprefix, "POLICY %s ON", fmtId(polinfo->polname)); tag = psprintf("%s %s", tbinfo->dobj.name, polinfo->dobj.name); if (polinfo->dobj.dump & DUMP_COMPONENT_COMMENT) dumpCommen

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Fujii Masao
On 2025/06/27 11:55, Shinya Kato wrote: I thought about the approach, and had a minor concern about the following inconsistency between the option and its internal implementation: - When the option is set to "MATCH", header_line becomes -1. - When the option is set to -1, it's an error. I t

Re: Logical Replication of sequences

2025-06-26 Thread shveta malik
On Wed, Jun 25, 2025 at 7:42 PM Shlok Kyal wrote: > > On Sun, 22 Jun 2025 at 08:05, vignesh C wrote: > > > > On Thu, 19 Jun 2025 at 11:26, Nisha Moond wrote: > > > > > > Hi, > > > > > > Here are my review comments for v20250610 patches: > > > > > > Patch-0005:sequencesync.c > > > > > > 1) report

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Shinya Kato
On Fri, Jun 27, 2025 at 12:03 AM Fujii Masao wrote: > > > On 2025/06/26 19:12, Shinya Kato wrote: > > On Thu, Jun 26, 2025 at 4:36 PM Fujii Masao > wrote: > > > > On 2025/06/26 14:35, Shinya Kato wrote: > > > > > > > > So it seems better for you

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

2025-06-26 Thread Hayato Kuroda (Fujitsu)
Dear Alexander, > Regarding last_saved_restart_lsn_updated, I think the opposite. I > think we should check if last_saved_restart_lsn_updated is set already > only if it could promise us some economy of resources. In our case > the main check only compares two fields of slot. And that fields ar

Re: SQL:2023 JSON simplified accessor support

2025-06-26 Thread jian he
hi. in gram.y we have: indirection_el: '.' attr_name { $$ = (Node *) makeString($2); } we can be sure that dot notation, following dot is a plain string. then in jsonb_subscript_transform, we can transform the String Node to a TEXTOI

Re: Documentation fix on pgbench \aset command

2025-06-26 Thread Yugo Nagata
On Fri, 27 Jun 2025 01:45:16 +0900 Fujii Masao wrote: > > > On 2025/06/27 1:31, Yugo Nagata wrote: > > On Fri, 27 Jun 2025 01:05:47 +0900 > > Fujii Masao wrote: > > > >> > >> > >> On 2025/06/26 18:01, Yugo Nagata wrote: > >>> Hi, > >>> > >>> The current documentation of pgbench’s \aset comman

Re: pg_logical_slot_get_changes waits continously for a partial WAL record spanning across 2 pages

2025-06-26 Thread Michael Paquier
On Thu, Jun 26, 2025 at 05:25:42PM +0530, vignesh C wrote: > On Thu, 26 Jun 2025 at 06:22, Michael Paquier wrote: >> So you are suggesting the addition of an extra ReadPageInternal() that >> forces a read of only the read, perform the checks on the header, then >> read the rest. After reading Siz

Re: pg_logical_slot_get_changes waits continously for a partial WAL record spanning across 2 pages

2025-06-26 Thread Michael Paquier
On Thu, Jun 26, 2025 at 09:40:05AM +, Hayato Kuroda (Fujitsu) wrote: > I've spent time how we use the injection point to cause the same situation, > which > generates the OVERWRITE_CONTRECORD in-between the page, but it seems > difficult. Hmm. I was wondering first about detecting a OVERWRI

Re: [PATCH] Correct src/backend/lib/README

2025-06-26 Thread Michael Paquier
On Thu, Jun 26, 2025 at 07:37:46AM +0900, Michael Paquier wrote: > No problem, good catches. Agreed to remove these references in the > README of backend/lib/. Will fix if there are no objections. Applied that. -- Michael signature.asc Description: PGP signature

Re: Removing unneeded self joins

2025-06-26 Thread Michael Paquier
On Thu, Jun 26, 2025 at 08:54:55AM +0200, Andrei Lepikhov wrote: > Before diving into the pg_hint_plan code, I wonder why you don't have > similar issues with the remove_useless_joins. We intentionally designed SJE > coupled with the left-join removal feature to avoid such type of complaints: > >

Re: Remove HeapTupleheaderSetXmin{Committed,Invalid} functions

2025-06-26 Thread Andy Fan
Álvaro Herrera writes: > Hmm > > So these functions were created from macros in commit 34694ec888d6, > which themselves had been added for the first time in commit > 37484ad2aace. However, it appears that they were added only because > they were mirroring HeapTupleHeaderSetXminFrozen(), and whil

[PATCH] OAuth: fix performance bug with stuck multiplexer events

2025-06-26 Thread Jacob Champion
Hi all, The current implementation of the OAuth flow is overly eager to signal readiness when there's nothing to do, so sometimes we burn CPU for no reason. This was discussed briefly back in [1], but I'll summarize here so no one has to dig through that megathread. = Background = A major intera

Re: Correct documentation for protocol version

2025-06-26 Thread Jelte Fennema-Nio
On Fri, 30 May 2025 at 11:00, Jelte Fennema-Nio wrote: > If we decide to keep it I think it would be best to have all protocol > changes on a single page. I'd just put the changes from 2.0 to 3.0 at > the bottom of the page. Attached are my proposed changes which split this page into different se

Re: [PATCH] Use DatumGetUInt32() for dsm_attach() in test_shm_mq_main()

2025-06-26 Thread Nathan Bossart
On Thu, Jun 26, 2025 at 01:46:10PM -0700, Jianghua Yang wrote: > Just to follow up - in our production system (pg_cron extension), > we´ve encountered real issues caused by passing a `Datum` to > `dsm_attach()` using `DatumGetInt32()` instead of `DatumGetUInt32()`. > > Here's a sample of the error

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-06-26 Thread Daniel Gustafsson
> On 26 Jun 2025, at 22:49, Peter Eisentraut wrote: > > On 03.04.25 17:51, Daniel Gustafsson wrote: >>> On 1 Apr 2025, at 22:22, Daniel Gustafsson wrote: >>> >>> I took another pass at this one and did a few small tweaks, so I would to >>> take >>> it for another spin across CI before looking

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-06-26 Thread Peter Eisentraut
On 03.04.25 17:51, Daniel Gustafsson wrote: On 1 Apr 2025, at 22:22, Daniel Gustafsson wrote: I took another pass at this one and did a few small tweaks, so I would to take it for another spin across CI before looking at committing it. There are no functionality changes, only polish. Committ

Re: [PATCH] Add tests for binaryheap.c

2025-06-26 Thread Nathan Bossart
On Thu, Jun 26, 2025 at 06:16:10PM +0300, Aleksander Alekseev wrote: > The proposed patch adds tests for binaryheap.c. This is similar to our > tests for RB-trees in test_rbtree.c. Adding some tests here seems like a good idea. I'm not sure I see much point in testing both min-heaps and max-heaps

Re: [PATCH] Use DatumGetUInt32() for dsm_attach() in test_shm_mq_main()

2025-06-26 Thread Jianghua Yang
Hi, Just to follow up — in our production system (pg_cron extension), we’ve encountered real issues caused by passing a `Datum` to `dsm_attach()` using `DatumGetInt32()` instead of `DatumGetUInt32()`. Here's a sample of the errors observed in our logs: ERROR: unable to map dynamic shared memory

Re: [PATCH] Use DatumGetUInt32() for dsm_attach() in test_shm_mq_main()

2025-06-26 Thread Nathan Bossart
On Thu, Jun 26, 2025 at 12:51:10PM -0700, Jianghua Yang wrote: > The argument passed to `dsm_attach()` is expected to be a `uint32`, but the > code currently uses `DatumGetInt32()` to extract it from the `Datum` > argument. This can lead to incorrect behavior when the high bit is set, as > 'unable

Re: [PATCH] Use binaryheap_* macro where appropriate

2025-06-26 Thread Nathan Bossart
On Thu, Jun 26, 2025 at 01:18:10PM +0300, Aleksander Alekseev wrote: > I noticed several places where we access `struct binaryheap` directly > instead of using binaryheap_size() and binaryheap_empty() which > doesn't seem right. Here is the patch. Seems reasonable. I'll plan on committing this on

Re: Fix some inconsistencies with open-coded visibilitymap_set() callers

2025-06-26 Thread Melanie Plageman
On Tue, Jun 24, 2025 at 4:01 PM Melanie Plageman wrote: > > visibilitymap_set() arguably breaks a few of the coding rules for > modifying and WAL logging buffers set out in > src/backend/access/transam/README. Here is a rebased version of this (it had some conflicts with recent commits). - Melan

[PATCH] Use DatumGetUInt32() for dsm_attach() in test_shm_mq_main()

2025-06-26 Thread Jianghua Yang
Hi, The attached patch fixes a minor type mismatch in `test_shm_mq_main()`. The argument passed to `dsm_attach()` is expected to be a `uint32`, but the code currently uses `DatumGetInt32()` to extract it from the `Datum` argument. This can lead to incorrect behavior when the high bit is set, as '

Re: Remove unneeded check for XLH_INSERT_ALL_FROZEN in heap_xlog_insert

2025-06-26 Thread Melanie Plageman
On Tue, Jun 24, 2025 at 4:48 PM Melanie Plageman wrote: > > Okay, I can backpatch this (to 14, I believe). I'll wait until the > thread has been around for closer to 24 hours before doing anything, > though. Pushed and back-patched through 14. - Melanie

Re: Simplify VM counters in vacuum code

2025-06-26 Thread Melanie Plageman
On Thu, Jun 26, 2025 at 10:25 AM Masahiko Sawada wrote: > > Thank you for updating the patch! The changes in v3 appear > straightforward; the patch eliminates unnecessary codes that were > introduced in the original commit due to some misunderstandings. And I > agreed with your answer[1] to my que

Re: No error checking when reading from file using zstd in pg_dump

2025-06-26 Thread Daniel Gustafsson
> On 26 Jun 2025, at 15:33, Tom Lane wrote: > So on the whole I prefer the "void" approach. I'm not dead > set on that though, it's just a niggling worry. I think the likelyhood of it being a problem in practice is pretty slim, but it's still a stronger argument than my "match an API we're stil

Re: queryId constant squashing does not support prepared statements

2025-06-26 Thread Álvaro Herrera
On 2025-Jun-25, Michael Paquier wrote: > On Tue, Jun 24, 2025 at 07:45:15PM +0200, Alvaro Herrera wrote: > > + /* > > +* If we have an external param at this location, but no lists are > > +* being squashed across the query, then we skip here; this will > > make > > +

Re: Bug with concurrent CREATE OR REPLACE (?)

2025-06-26 Thread Daniil Davydov
Hi, On Fri, Jun 27, 2025 at 12:05 AM Tom Lane wrote: > > This is operating as designed, more or less. The error message isn't > terribly user-friendly perhaps, but I think it's quite reasonable > to throw an error. Otherwise, which transaction's definition should > win out? The transactions ar

Re: Documentation fix on pgbench \aset command

2025-06-26 Thread Fujii Masao
On 2025/06/27 1:31, Yugo Nagata wrote: On Fri, 27 Jun 2025 01:05:47 +0900 Fujii Masao wrote: On 2025/06/26 18:01, Yugo Nagata wrote: Hi, The current documentation of pgbench’s \aset command states: “If a query returns no row, no assignment is made and the variable can be tested for

Re: Bug with concurrent CREATE OR REPLACE (?)

2025-06-26 Thread Tom Lane
Daniil Davydov <3daniss...@gmail.com> writes: > I found that this command sequence leads to an error. : > session 1: > begin; > create or replace function *some funcion*; > session 2: > begin; > create or replace function *same function as above*; > session 1: > commit; > session 2: > ERROR: d

Re: IPC/MultixactCreation on the Standby server

2025-06-26 Thread Andrey Borodin
> On 26 Jun 2025, at 17:59, Andrey Borodin wrote: > > hypothesis Dmitry, can you please retry your reproduction with attached patch? It must print nextMXact and tmpMXact. If my hypothesis is correct nextMXact will precede tmpMXact. Best regards, Andrey Borodin. v2-0001-Make-next-multixac

Re: Documentation fix on pgbench \aset command

2025-06-26 Thread Yugo Nagata
On Fri, 27 Jun 2025 01:05:47 +0900 Fujii Masao wrote: > > > On 2025/06/26 18:01, Yugo Nagata wrote: > > Hi, > > > > The current documentation of pgbench’s \aset command states: > > > > “If a query returns no row, no assignment is made and the variable > > can be tested for existence to dete

Re: pg_dump misses comments on NOT NULL constraints

2025-06-26 Thread Álvaro Herrera
On 2025-Jun-26, Fujii Masao wrote: > I noticed a small inconsistency in the output of pg_dump when handling > comments for COMMENT commands on not-null constraints. [...] > You can see that only comments for the not-null constraint includes > the schema-qualified table name (hoge.t) after "ON". T

Re: Documentation fix on pgbench \aset command

2025-06-26 Thread Fujii Masao
On 2025/06/26 18:01, Yugo Nagata wrote: Hi, The current documentation of pgbench’s \aset command states: “If a query returns no row, no assignment is made and the variable can be tested for existence to detect this.” However, this is inaccurate, since variable existence check (like \if :{

Re: Bug with concurrent CREATE OR REPLACE (?)

2025-06-26 Thread Jim Jones
Hi On 26.06.25 17:08, Daniil Davydov wrote: > Hi, > I found that this command sequence leads to an error. : > > session 1: > begin; > create or replace function *some funcion*; > > session 2: > begin; > create or replace function *same function as above*; > > session 1: > commit; > > session 2: >

[PATCH] Add tests for binaryheap.c

2025-06-26 Thread Aleksander Alekseev
Hi, The proposed patch adds tests for binaryheap.c. This is similar to our tests for RB-trees in test_rbtree.c. -- Best regards, Aleksander Alekseev v1-0001-Add-tests-for-binaryheap.c.patch Description: Binary data

Re: SCRAM pass-through authentication for postgres_fdw

2025-06-26 Thread Matheus Alcantara
On Wed Jun 25, 2025 at 3:07 PM -03, Alexander Pyhalov wrote: > Matheus Alcantara писал(а) 2025-06-25 14:36: >> Hi, thanks for testing and reporting the issue! >> >> On 25/06/25 11:37, Alexander Pyhalov wrote: >>> Hi. >>> I've started to look at this feature and found an issue - MyProcPort >>> can b

Bug with concurrent CREATE OR REPLACE (?)

2025-06-26 Thread Daniil Davydov
Hi, I found that this command sequence leads to an error. : session 1: begin; create or replace function *some funcion*; session 2: begin; create or replace function *same function as above*; session 1: commit; session 2: ERROR: duplicate key value violates unique constraint "pg_proc_proname_a

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Fujii Masao
On 2025/06/26 19:12, Shinya Kato wrote: On Thu, Jun 26, 2025 at 4:36 PM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: On 2025/06/26 14:35, Shinya Kato wrote: > >  > > So it seems better for you to implement the patch at first and then >  > > check the performance o

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

2025-06-26 Thread Alexander Korotkov
Dear Kuroda-san, On Thu, Jun 26, 2025 at 6:46 AM Hayato Kuroda (Fujitsu) wrote: > > Dear Alexander, > > > > Good idea. But I think we should associate the "updated" flag > > directly to the fact that one slot (no matter logical or physical) > > changed its last_saved_restart_lsn. See the attach

Re: Simplify VM counters in vacuum code

2025-06-26 Thread Masahiko Sawada
On Thu, Jun 26, 2025 at 10:01 PM Melanie Plageman wrote: > > On Wed, Jun 25, 2025 at 2:59 AM Nazir Bilal Yavuz wrote: > > > > I liked this version more. I agree that the asserts were causing some > > confusion. > > Thanks for the review! > > Sawada-san, do you have any objection to this being me

Re: [WIP]Vertical Clustered Index (columnar store extension) - take2

2025-06-26 Thread Timur Magomedov
On Wed, 2025-06-25 at 13:13 +1000, Peter Smith wrote: > Hi Timur, Thanks for your feedback! Hello Peter! > Hmm. IIUC the “supported types” code was written this way for the > following reason. Out of an over-abundance (?) of caution, the > original patch authors wanted to call the function > 'vc

Re: No error checking when reading from file using zstd in pg_dump

2025-06-26 Thread Tom Lane
Daniel Gustafsson writes: > On 25 Jun 2025, at 17:58, Tom Lane wrote: >> It doesn't return true anymore. Should be more like >> + * Returns nothing. Exits via pg_fatal for all error conditions. > Instead of this I changed the write_func signature to return the number of > bytes written as size

Re: SCRAM pass-through authentication for postgres_fdw

2025-06-26 Thread Peter Eisentraut
On 25.06.25 20:07, Alexander Pyhalov wrote: Matheus Alcantara писал(а) 2025-06-25 14:36: Hi, thanks for testing and reporting the issue! On 25/06/25 11:37, Alexander Pyhalov wrote: Hi. I've started to look at this feature and found an issue - MyProcPort can be not set if connection is initiate

Re: PG18 protocol version

2025-06-26 Thread Jelte Fennema-Nio
On Thu, 26 Jun 2025 at 13:34, Tatsuo Ishii wrote: > > > I didn't? I replaced it with a more generic version of the same > > information, that covers both protocol version 3.0 and 3.2 (and any > > future 3.x) > > I meant this. > >> - (0 for the protocol described here). > > With your patch

Re: Proposal: Limitations of palloc inside checkpointer

2025-06-26 Thread Xuneng Zhou
Hi, Patch v7 modifies CompactCheckpointerRequestQueue() to process requests incrementally in batches of CKPT_REQ_BATCH_SIZE (10,000), similar to the approach used in AbsorbSyncRequests(). This limits memory usage from O(num_requests) to O(batch_size) for both hash tables and skip arrays. - Hash

Re: Simplify VM counters in vacuum code

2025-06-26 Thread Melanie Plageman
On Wed, Jun 25, 2025 at 2:59 AM Nazir Bilal Yavuz wrote: > > I liked this version more. I agree that the asserts were causing some > confusion. Thanks for the review! Sawada-san, do you have any objection to this being merged in master/18? I know you had said changing the if statements to asser

Re: IPC/MultixactCreation on the Standby server

2025-06-26 Thread Andrey Borodin
> On 26 Jun 2025, at 14:33, Dmitry wrote: > > On 25.06.2025 16:44, Dmitry wrote: >> I will definitely try to reproduce the problem with your patch. > Hi Andrey! > > I checked with the patch, unfortunately the problem is also reproducible. > Client processes wake up after a second and try to g

Re: PG18 protocol version

2025-06-26 Thread Aleksander Alekseev
Hi, > I meant this. > >> - (0 for the protocol described here). > > With your patch the explanation that this document (Message Formats) > is for 3.2, is gone. But maybe it's okay since "54.1.4. Protocol > versions" already stats that the whole F/B protocol docs is for 3.2. > > What do you

Re: No error checking when reading from file using zstd in pg_dump

2025-06-26 Thread Daniel Gustafsson
> On 25 Jun 2025, at 17:58, Tom Lane wrote: > I looked over this patchset briefly, and found a couple of nits: Thanks for looking! > v5-0002, in compress_io.h: > > + * Returns true on success and throws error for all error conditions. > > It doesn't return true anymore. Should be more like >

Re: Remove HeapTupleheaderSetXmin{Committed,Invalid} functions

2025-06-26 Thread Álvaro Herrera
Hmm So these functions were created from macros in commit 34694ec888d6, which themselves had been added for the first time in commit 37484ad2aace. However, it appears that they were added only because they were mirroring HeapTupleHeaderSetXminFrozen(), and while the latter was immediately used, t

Re: pg_logical_slot_get_changes waits continously for a partial WAL record spanning across 2 pages

2025-06-26 Thread vignesh C
On Thu, 26 Jun 2025 at 06:22, Michael Paquier wrote: > > On Wed, Jun 25, 2025 at 10:19:55PM +0530, vignesh C wrote: > > Currently, the logic attempts to read the complete WAL record based on > > the size obtained before the crash—even though only a partial record > > was written. It then checks th

Re: NUMA shared memory interleaving

2025-06-26 Thread Jakub Wartak
On Fri, Apr 18, 2025 at 7:48 PM Bertrand Drouvot wrote: > > Hi, > > On Thu, Apr 17, 2025 at 01:58:44AM +1200, Thomas Munro wrote: > > On Wed, Apr 16, 2025 at 9:14 PM Jakub Wartak > > wrote: > > > 2. Should we also interleave DSA/DSM for Parallel Query? (I'm not an > > > expert on DSA/DSM at all)

Re: PG18 protocol version

2025-06-26 Thread Tatsuo Ishii
> I didn't? I replaced it with a more generic version of the same > information, that covers both protocol version 3.0 and 3.2 (and any > future 3.x) I meant this. >> - (0 for the protocol described here). With your patch the explanation that this document (Message Formats) is for 3.2, is

Re: NUMA shared memory interleaving

2025-06-26 Thread Jakub Wartak
On Fri, Apr 18, 2025 at 7:43 PM Bertrand Drouvot wrote: > > Hi, > > On Wed, Apr 16, 2025 at 10:05:04AM -0400, Robert Haas wrote: > > On Wed, Apr 16, 2025 at 5:14 AM Jakub Wartak > > wrote: > > > Normal pgbench workloads tend to be not affected, as each backend > > > tends to touch just a small pa

Re: pg_dump misses comments on NOT NULL constraints

2025-06-26 Thread Fujii Masao
On 2025/06/26 0:45, Álvaro Herrera wrote: On 2025-Jun-26, Fujii Masao wrote: CREATE TABLE ctlt1_inh (LIKE ctlt1 INCLUDING CONSTRAINTS INCLUDING COMMENTS) INHERITS (ctlt1); \d+ ctlt1_inh -SELECT description FROM pg_description, pg_constraint c WHERE classoid = 'pg_constraint'::regclass

Re: PG18 protocol version

2025-06-26 Thread Jelte Fennema-Nio
On Thu, 26 Jun 2025 at 12:16, Tatsuo Ishii wrote: > Why do you remove the info? I didn't? I replaced it with a more generic version of the same information, that covers both protocol version 3.0 and 3.2 (and any future 3.x)

[PATCH] Use binaryheap_* macro where appropriate

2025-06-26 Thread Aleksander Alekseev
Hi, I noticed several places where we access `struct binaryheap` directly instead of using binaryheap_size() and binaryheap_empty() which doesn't seem right. Here is the patch. -- Best regards, Aleksander Alekseev v1-0001-Use-binaryheap_-macro-where-appropriate.patch Description: Binary data

Re: PG18 protocol version

2025-06-26 Thread Tatsuo Ishii
> Yeah it seems we didn't update this part of the docs. Attached is a > patch to fix that. > - the major version number (3 for the protocol described here). > - The least significant 16 bits are the minor version number > - (0 for the protocol described here). Why do you r

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Shinya Kato
On Thu, Jun 26, 2025 at 4:36 PM Fujii Masao wrote: > On 2025/06/26 14:35, Shinya Kato wrote: > > > > > > So it seems better for you to implement the patch at first and then > > > > check the performance overhead etc if necessary. > > > > > > Thank you for your advice. I will create a patch. >

Re: pg_dump misses comments on NOT NULL constraints

2025-06-26 Thread Fujii Masao
On 2025/06/26 3:45, Álvaro Herrera wrote: On 2025-Jun-25, Álvaro Herrera wrote: Ah, thanks for the test case. Yeah, I removed one 'if' condition too many from Jian's patch. We just need to test the constraint name for nullness and then things seem to work: One more thing was missing, whi

Re: Skipping schema changes in publication

2025-06-26 Thread shveta malik
On Tue, Jun 24, 2025 at 9:48 AM Shlok Kyal wrote: > > I have included the changes for > it in v14-0003 patch. > Thanks for the patches. I have reviewed patch001 alone, please find few comments: 1) + + The RESET clause will reset the publication to the + default state which includes resetti

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

2025-06-26 Thread Yugo Nagata
On Thu, 26 Jun 2025 05:45:12 + "Hayato Kuroda (Fujitsu)" wrote: > Dear Nagata-san, > > > As I understand it, the current patch aims to allow continuation only after > > SQL-level > > errors, such as constraint violations. That seems reasonable, as it can > > simulate > > the > > behavior of

RE: pg_logical_slot_get_changes waits continously for a partial WAL record spanning across 2 pages

2025-06-26 Thread Hayato Kuroda (Fujitsu)
> > Another reliable approach would be to make the > > code wait before reading the record in the internal loop of > > ReadPageInternal() with an injection point when we know that we have a > > contrecord, but I'm not really excited about this prospect in > > xlogreader.c which can be also used in

Re: IPC/MultixactCreation on the Standby server

2025-06-26 Thread Dmitry
On 25.06.2025 16:44, Dmitry wrote: I will definitely try to reproduce the problem with your patch. Hi Andrey! I checked with the patch, unfortunately the problem is also reproducible. Client processes wake up after a second and try to get information about the members of the multixact again,

Re: Adding OLD/NEW support to RETURNING

2025-06-26 Thread Dean Rasheed
On Thu, 26 Jun 2025 at 04:04, Robert Treat wrote: > > At first look this seems right, modulo some typos Oops, yes that was careless. Thanks for checking. I've fixed those and pushed it. Regards, Dean

Documentation fix on pgbench \aset command

2025-06-26 Thread Yugo Nagata
Hi, The current documentation of pgbench’s \aset command states: “If a query returns no row, no assignment is made and the variable can be tested for existence to detect this.” However, this is inaccurate, since variable existence check (like \if :{?var}) is not yet supported, although such a f

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

2025-06-26 Thread shveta malik
On Wed, Jun 25, 2025 at 12:20 PM Bertrand Drouvot wrote: > > Hi, > > On Wed, Jun 25, 2025 at 09:15:04AM +0530, shveta malik wrote: > > On Wed, Jun 25, 2025 at 9:12 AM shveta malik wrote: > > > > > > On Tue, Jun 24, 2025 at 2:12 PM Bertrand Drouvot > > > wrote: > > > > > > > > Yeah, I think that

Re: pgsql: Introduce pg_shmem_allocations_numa view

2025-06-26 Thread Tomas Vondra
On 6/26/25 08:00, Bertrand Drouvot wrote: > Hi, > > On Tue, Jun 24, 2025 at 10:32:25PM +0200, Tomas Vondra wrote: >> On 6/24/25 17:30, Christoph Berg wrote: >>> Re: Tomas Vondra If it's a reliable fix, then I guess we can do it like this. But won't that be a performance penalty on everyo

Re: MERGE docs: indentation in synopsis section

2025-06-26 Thread Dean Rasheed
On Wed, 25 Jun 2025 at 15:53, Nathan Bossart wrote: > > Seems reasonable to me. > Pushed. Thanks for looking. Regards, Dean

Re: Conflict detection for update_deleted in logical replication

2025-06-26 Thread shveta malik
On Thu, Jun 26, 2025 at 8:31 AM Zhijie Hou (Fujitsu) wrote: > > Thanks for the comments. All of them look good to me and > have been addressed in V42. > Thank You for the patches. Few comments. t/035_conflicts.pl: 1) Both the subscriptions subname_BA and subname_AB have rci enabled during CREAT

Re: PG18 protocol version

2025-06-26 Thread Jelte Fennema-Nio
On Thu, 26 Jun 2025 at 08:56, Tatsuo Ishii wrote: > So I suspect this is just a typo. Yeah it seems we didn't update this part of the docs. Attached is a patch to fix that. From 8cfafc9518156e3213d0da9b19010c3211aff60b Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Thu, 26 Jun 2025 10:11

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Fujii Masao
On 2025/06/26 14:35, Shinya Kato wrote: > > So it seems better for you to implement the patch at first and then > > check the performance overhead etc if necessary. > > Thank you for your advice. I will create a patch. I created a patch. Thanks for the patch! As you can see from the

Re: display hot standby state in psql prompt

2025-06-26 Thread Jim Jones
On 26.06.25 02:52, Greg Sabino Mullane wrote: > On Wed, Jun 25, 2025 at 11:50 AM Jim Jones > wrote: > > Since I cannot get the value of transaction_read_only via > PQparameterStatus. > > > Hmmm... we can at least get default_transaction_read_only. As > fe-connect.c points out: >        

Re: pg_logical_slot_get_changes waits continously for a partial WAL record spanning across 2 pages

2025-06-26 Thread Dilip Kumar
On Thu, Jun 26, 2025 at 11:47 AM Michael Paquier wrote: > > On Thu, Jun 26, 2025 at 08:48:32AM +0530, Dilip Kumar wrote: > > On Thu, Jun 26, 2025 at 6:22 AM Michael Paquier wrote: > >> So you are suggesting the addition of an extra ReadPageInternal() that > >> forces a read of only the read, perf