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

2025-05-25 Thread Amit Kapila
On Sat, May 24, 2025 at 6:59 PM Alexander Korotkov wrote: > > Hi, Amit! > > Thank you for your attention to this patchset! > > On Sat, May 24, 2025 at 2:15 PM Amit Kapila wrote: > > On Sat, May 24, 2025 at 4:08 PM Alexander Korotkov > > wrote: > > > > > > I spend more time on this. The next re

Fix a minor typo in jit/README

2025-05-25 Thread Yugo Nagata
Hi, The attached partch is fix the following typo. -additionally an index is over these is stored to +additionally an index over these is stored to Regards, Yugo Nagata -- Yugo Nagata diff --git a/src/backend/jit/README b/src/backend/jit/README index 5427bdf2153..a40950dfb03 100644 --- a/src/

Re: Custom GUCs and typos

2025-05-25 Thread David G. Johnston
On Sun, May 25, 2025 at 7:52 PM Srinath Reddy Sadipiralla < srinath2...@gmail.com> wrote: > 1) On top of OP's patch I added support to warn if the prefix of custom > GUC is invalid,for valid questions such as "How do you know that's a bogus > prefix? It could perfectly well be a fully valid setti

Re: on_error table, saving error info to a table

2025-05-25 Thread Nishant Sharma
> > On Tue, Dec 17, 2024 at 12:31 PM Kirill Reshke > wrote: > > > > On Mon, 16 Dec 2024 at 16:50, Nishant Sharma > > wrote: > > > Also, I think Andrew's suggestion can resolve the concern me and Krill > > > had on forcing users to create tables with correct column names and > > > numbers. Also, w

Re: Fix slot synchronization with two_phase decoding enabled

2025-05-25 Thread Nisha Moond
to On Fri, May 23, 2025 at 10:06 PM Masahiko Sawada wrote: > > > Here are review comments for v14 patch: > Thank you for the review. > I think we need to include a basic test case where we simply create a > subscription with two_phase=true and then enable the failover via > ALTER SUBSCRIPTION a

Re: Replication slot is not able to sync up

2025-05-25 Thread shveta malik
On Sat, May 24, 2025 at 10:37 AM Amit Kapila wrote: > If the > > problem is that we're not able to create a slot on the standby at an > > old enough LSN or XID position to permit its use with the > > corresponding slot on the master, it should be reported that way. > > > > That is the case, and w

JIT works only partially with meson build?

2025-05-25 Thread Yugo Nagata
Hi, While building PostgreSQL 17 on Windows, I noticed bitcode files (.bc) are not generated with meson. Does this means that "inlining" of JIT doesn't work when PostgreSQL is build with meson? If so, is it better to describe that in the meson build and JIT sections in the documentation so that u

Re: SQL:2011 application time

2025-05-25 Thread Peter Eisentraut
On 17.09.24 11:45, Peter Eisentraut wrote: On 05.09.24 14:09, Peter Eisentraut wrote: On 07.08.24 22:54, Paul Jungwirth wrote: Here are some fixes based on outstanding feedback (some old some new). I have studied your patches v39-0001 through v39-0004, which correspond to what had been rever

Re: CREATE OR REPLACE FUNCTION now validates it's dependents

2025-05-25 Thread Tom Lane
jian he writes: > The attached patch allows CREATE OR REPLACE FUNCTION to correctly update > domain > constraints when the function they depend on is changed. Why is this a problem that needs solving? Our fundamental expectation is that domain constraints are immutable (see the Notes section un

CREATE OR REPLACE FUNCTION now validates it's dependents

2025-05-25 Thread jian he
hi. The attached patch allows CREATE OR REPLACE FUNCTION to correctly update domain constraints when the function they depend on is changed. so this thread[1] mentioned the problem can be resolved. for example: create function sqlcheck(int) returns bool as 'select $1 > 0' language sql; create do

Re: Add CHECK_FOR_INTERRUPTS in polling loop code path in XactLockTableWait

2025-05-25 Thread Fujii Masao
On 2025/05/24 5:41, Kevin K Biju wrote: Hi, While creating a logical replication slot, we wait for older transactions to complete to reach a "consistent point", which can take a while on busy databases. If we're creating a slot on a primary instance, it's pretty clear that we're waiting on

Custom GUCs and typos

2025-05-25 Thread Srinath Reddy Sadipiralla
Hi, while going through this thread [0] i have some different views and questions on this problem so creating a separate thread,this is just an attempt, i might be brutally wrong here. 1) On top of OP's patch I added support to warn if the prefix of custom GUC is invalid,for valid questions such a

Re: MERGE issues around inheritance

2025-05-25 Thread Tender Wang
Dean Rasheed 于2025年5月26日周一 04:10写道: > On Sun, 25 May 2025 at 13:41, Dean Rasheed > wrote: > > > > On Sun, 25 May 2025 at 13:06, Tender Wang wrote: > > > > > > For a partitioned table, we must pass rootResultRelInfo to > ExecInsert(). I added the check before calling ExecInsert() > > > If it is

Re: Automatically sizing the IO worker pool

2025-05-25 Thread wenhui qiu
HI > On Sun, Apr 13, 2025 at 04:59:54AM GMT, Thomas Munro wrote: > It's hard to know how to set io_workers=3. If it's too small, > io_method=worker's small submission queue overflows and it silently > falls back to synchronous IO. If it's too high, it generates a lot of > pointless wakeups and sc

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

2025-05-25 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 9 May 2025 21:29:23 -0700, Masahiko Sawada wrote: >> > So the idea is that the backend process sets the format ID somewhere >> > in st_progress_param, and then the progress view calls a SQL function, >

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

2025-05-25 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 9 May 2025 17:57:35 -0700, Masahiko Sawada wrote: >> Proposed approaches to register custom COPY formats: >> a. Create a function that has the same name of custom COPY >>format >> b. Call a registe

Re: Non-reproducible AIO failure

2025-05-25 Thread Tom Lane
Thomas Munro writes: > On Sun, May 25, 2025 at 3:22 PM Tom Lane wrote: >> So far, I've failed to get anything useful out of core files >> from this failure. The trace goes back no further than >> (lldb) bt >> * thread #1 >> * frame #0: 0x00018de39388 libsystem_kernel.dylib`__pthread_kill + 8

Re: Non-reproducible AIO failure

2025-05-25 Thread Tom Lane
Thomas Munro writes: > Could you guys please share your exact repro steps? I've just been running 027_stream_regress.pl over and over. It's not a recommendable answer though because the failure probability is tiny, under 1%. It sounded like Alexander had a better way. re

Re: Fixing memory leaks in postgres_fdw

2025-05-25 Thread Tom Lane
I wrote: > Here is an attempt at making a bulletproof fix by having all backend > users of libpq go through a wrapper layer that provides the memory > context callback. Perhaps this is more code churn than we want to > accept; I'm not sure. I thought about avoiding most of the niggling > code cha

Re: Non-reproducible AIO failure

2025-05-25 Thread Thomas Munro
On Sun, May 25, 2025 at 3:22 PM Tom Lane wrote: > Thomas Munro writes: > > Can you get a core and print *ioh in the debugger? > > So far, I've failed to get anything useful out of core files > from this failure. The trace goes back no further than > > (lldb) bt > * thread #1 > * frame #0: 0x00

Re: MERGE issues around inheritance

2025-05-25 Thread Dean Rasheed
On Sun, 25 May 2025 at 13:41, Dean Rasheed wrote: > > On Sun, 25 May 2025 at 13:06, Tender Wang wrote: > > > > For a partitioned table, we must pass rootResultRelInfo to ExecInsert(). I > > added the check before calling ExecInsert() > > If it is a partitioned table, we continue to pass rootResu

Re: Fixing memory leaks in postgres_fdw

2025-05-25 Thread Tom Lane
Etsuro Fujita writes: > On Sat, May 24, 2025 at 10:10 AM Tom Lane wrote: >> I thought of fixing this by using a memory context reset callback >> to ensure that the PGresult is cleaned up when the executor's context >> goes away, and that seems to work nicely (see 0001 attached). >> However, I fee

Re: POC: Parallel processing of indexes in autovacuum

2025-05-25 Thread Daniil Davydov
Hi, On Fri, May 23, 2025 at 6:12 AM Masahiko Sawada wrote: > > On Thu, May 22, 2025 at 12:44 AM Daniil Davydov <3daniss...@gmail.com> wrote: > > > > On Wed, May 21, 2025 at 5:30 AM Masahiko Sawada > > wrote: > > > > > > I find that the name "autovacuum_reserved_workers_num" is generic. It > > >

Re: Hash table scans outside transactions

2025-05-25 Thread Tomas Vondra
On 5/25/25 13:36, Dilip Kumar wrote: > On Wed, May 21, 2025 at 3:02 AM Aidar Imamov wrote: >> >> Hi! >> I tried to resend this thread directly to myself, but for some reason it >> ended up in the whole hackers list.. >> >> I thought I'd chime in on this topic since it hasn't really been >> discuss

Re: MERGE issues around inheritance

2025-05-25 Thread Dean Rasheed
On Sun, 25 May 2025 at 13:06, Tender Wang wrote: > > For a partitioned table, we must pass rootResultRelInfo to ExecInsert(). I > added the check before calling ExecInsert() > If it is a partitioned table, we continue to pass rootResultRelInfo. > Otherwise, we pass resultRelInfo. > Please see th

Re: MERGE issues around inheritance

2025-05-25 Thread Tender Wang
Tender Wang 于2025年5月25日周日 19:17写道: > > > Álvaro Herrera 于2025年5月24日周六 17:11写道: > >> On 2025-May-21, Andres Freund wrote: >> >> > Hi, >> > >> > In [1] I added some verification to projection building, to check if the >> > tupleslot passed to ExecBuildProjectionInfo() is compatible with the >> tar

Re: Hash table scans outside transactions

2025-05-25 Thread Dilip Kumar
On Wed, May 21, 2025 at 3:02 AM Aidar Imamov wrote: > > Hi! > I tried to resend this thread directly to myself, but for some reason it > ended up in the whole hackers list.. > > I thought I'd chime in on this topic since it hasn't really been > discussed > anywhere else (or maybe I missed it). > I

Re: MERGE issues around inheritance

2025-05-25 Thread Tender Wang
Álvaro Herrera 于2025年5月24日周六 17:11写道: > On 2025-May-21, Andres Freund wrote: > > > Hi, > > > > In [1] I added some verification to projection building, to check if the > > tupleslot passed to ExecBuildProjectionInfo() is compatible with the > target > > list. One query in merge.sql [2] got flagg

Re: Understanding when VM record needs snapshot conflict horizon

2025-05-25 Thread Dilip Kumar
On Sat, May 24, 2025 at 2:21 AM Melanie Plageman wrote: > > On Fri, May 23, 2025 at 12:04 PM Andres Freund wrote: > 3) if you are updating the VM and you are not modifying the heap page > at all, then you don't need to include a snapshot conflict horizon in > the record because you can safely as

Re: Hash table scans outside transactions

2025-05-25 Thread Aidar Imamov
Aidar Imamov wrote 2025-05-21 00:32: Ashutosh Bapat wrote 2023-03-28 15:58: Bumping it to attract some attention. On Tue, Mar 21, 2023 at 12:51 PM Ashutosh Bapat wrote: Hi, Hash table scans (seq_scan_table/level) are cleaned up at the end of a transaction in AtEOXact_HashTables(). If a has

Re: Conflict detection for update_deleted in logical replication

2025-05-25 Thread Dilip Kumar
On Sat, May 24, 2025 at 4:46 PM Amit Kapila wrote: > > This sounds reasonable to me. Let us see what others think. > I was looking into the for getting the transaction status from publisher, what I would assume this patch should be doing is request the publisher status first time, and if some tra