Re: Batching in executor

2025-10-28 Thread Amit Langote
On Tue, Oct 28, 2025 at 10:40 PM Amit Langote wrote: > That would be nice to see if you have the time, but maybe after I post > a new version. I’ve created a CF entry marked WoA for this in the next CF under the title “Batching in executor, part 1: add batch variant of table AM scan API.” The ide

tuple radix sort

2025-10-28 Thread John Naylor
First, a quick demonstration of what this PoC can do on 1 million random not-NULL bigints: set wip_radix_sort = 'off'; select * from test order by a offset 1_000_000_000; 240ms set wip_radix_sort = 'on'; select * from test order by a offset 1_000_000_000; 140ms Background: Peter Geoghegan recent

Re: Channel binding for post-quantum cryptography

2025-10-28 Thread Nico Williams
I posted (including your attachment, by accident, since at first I was going to forward your post) about this to the IETF TLS WG mailing list. https://mailarchive.ietf.org/arch/msg/tls/CEaZg1l-4iVg0_wdEr5_rXfGYWc/

Re: Channel binding for post-quantum cryptography

2025-10-28 Thread Nico Williams
On Mon, Oct 20, 2025 at 09:12:52AM +0200, Filip Janus wrote: > The problem is caused by a difference between the currently used algorithms > and post-quantum ones. For example, commonly used algorithms like RSA have > a defined digest algorithm, but ML-DSA does not. Looking more carefully, ML-DSA

Re: Logical Replication of sequences

2025-10-28 Thread Peter Smith
Hi Vignesh, Some review comments patch V20251029-0001 (the test code only) == src/test/subscription/t/036_sequences.pl 1. +## +## ALTER SUBSCRIPTION ... REFRESH PUBLICATION with (copy_data = off) should +# not update the sequence values for the new sequence. +## + +# Create a

Re: Report bytes and transactions actually sent downtream

2025-10-28 Thread shveta malik
On Tue, Oct 28, 2025 at 12:46 PM Ashutosh Bapat wrote: > > On Mon, Oct 27, 2025 at 4:47 PM shveta malik wrote: > > > > Few comments: > > > > 1) > > pgoutput_truncate: > > > > if (nrelids > 0) > > { > > OutputPluginPrepareWrite(ctx, true); > > logicalrep_write_truncate(ctx->out, > > xid, > > n

Re: postgres_fdw: Use COPY to speed up batch inserts

2025-10-28 Thread jian he
On Sat, Oct 25, 2025 at 2:27 AM Matheus Alcantara wrote: > > On this new version I also added some regress tests on postgres_fdw.sql > In the CopyFrom function, we have the CopyInsertMethod, CIM_SINGLE is slower than CIM_MULTI, I think. We should do performance tests for the case where the COPY s

Fix incorrect const qualification for tbm_add_tuples() and itemptr_to_uint64()

2025-10-28 Thread Chao Li
Hi Hackers, I noticed a wrong const qualification: ``` void tbm_add_tuples(TIDBitmap *tbm, const ItemPointer tids, int ntids, bool recheck) ``` This "const" only protects "tids" itself from updating, which is meaningless. I believe the real intention should be protecting the content "tids" poin

Re: another autovacuum scheduling thread

2025-10-28 Thread wenhui qiu
HI Nathan Bossart > + if (vactuples > vacthresh) > + { > + *dovacuum = true; > + *score = Max(*score, (double) vactuples / Max(vacthresh, 1)); > + } > + > + if (vac_ins_base_thresh >= 0 && instuples > vacinsthresh) > + { > + *dovacuum = true; > + *score = *score = Max(*score, (double) instuples /

Re: Proposal for enabling auto-vectorization for checksum calculations

2025-10-28 Thread John Naylor
On Fri, Oct 24, 2025 at 2:49 PM Andrew Kim wrote: > The function signatures (pg_checksum_block, pg_checksum_page) remain > identical, and checksum_impl.h still contains the complete > implementation that external programs can include. The runtime > dispatch only affects internal PostgreSQL usage.

Re: Logical Replication of sequences

2025-10-28 Thread Peter Smith
Hi Vignesh, Some more review comments for v20251029-0001. == .../replication/logical/sequencesync.c 1. + * The apply worker periodically scans pg_subscription_rel for sequences in + * INIT state. When such sequences are found, it spawns a + * sequencesync worker to handle synchronization. I

Re: Batching in executor

2025-10-28 Thread Amit Langote
Hi Daniil, On Tue, Oct 28, 2025 at 11:32 PM Daniil Davydov <[email protected]> wrote: > > Hi, > > As far as I understand, this work partially overlaps with what we did in the > thread [1] (in short - we introduce support for batching within the > ModifyTable > node). Am I correct? There might

Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement

2025-10-28 Thread Jim Jones
Hi Phil On 28/10/2025 20:01, Philip Alger wrote: >  I am not sure what you mean here. Are you suggesting keep the check in > v7 with `trigger name \"%s\" for table \"%s\" does not exist"` and > remove the extra check in v8? No, having an error message here is correct. I was just thinking that the

[PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement

2025-10-28 Thread Manni Wood
Hello! I am submitting a patch as a part of a larger Retail DDL functions project described by Andrew Dunstan here: https://www.postgresql.org/message-id/945db7c5-be75-45bf-b55b-cb1e56f2e3e9%40dunslane.net This patch creates a function pg_get_tablespace_ddl, designed to retrieve the full DDL stat

Re: Bug in pg_stat_statements

2025-10-28 Thread Michael Paquier
On Tue, Oct 28, 2025 at 12:31:23PM +0200, Alvaro Herrera wrote: > Hmm, yeah, now that you mention this, it seems rather odd that > pgss_store() is messing with (modifying) the jstate it is given. If we > had multiple modules using a planner_hook to interact with the query > representation, what ea

Re: display hot standby state in psql prompt

2025-10-28 Thread Jim Jones
On 28/10/2025 17:42, Nathan Bossart wrote: > IIUC the problem is that we use GUC_ACTION_SET for those even though they > are reset at transaction end by the routines in xact.c. Something like the > following seems to be enough to get it working as expected in some basic > tests, but there are p

Re: Remove specific \r\n code in TAP for Windows

2025-10-28 Thread Michael Paquier
On Tue, Oct 28, 2025 at 08:27:35AM +0900, Michael Paquier wrote: > Time for a verdict, so applied on HEAD now. Three buildfarm members have reported after 8767b449a3a1: fairywren, drongo and hamerkop. All of them have reported green, so applied the equivalent cleanup on REL_18_STABLE with a92bbf

Re: C11: should we use char32_t for unicode code points?

2025-10-28 Thread Thomas Munro
On Wed, Oct 29, 2025 at 6:59 AM Jeff Davis wrote: > So you're saying that pg_wchar is more like a union type? > > typedef pg_wchar > { >char ch; /* single-byte encodings or >non-UTF8 encodings on unix */ >char16_t utf16; /* windows non-UTF8 encodings */

Re: Channel binding for post-quantum cryptography

2025-10-28 Thread Michael Paquier
On Tue, Oct 28, 2025 at 10:34:27AM -0700, Jacob Champion wrote: > On Tue, Oct 28, 2025 at 9:46 AM Nico Williams wrote: >> RFC 5929 co-author here. We should take this to the IETF TLS WG mailing >> list and update RFC 5929 and the tls-server-end-point registraion to fix >> this. Wow. Thanks Nico

Re: Remaining dependency on setlocale()

2025-10-28 Thread Jeff Davis
On Wed, 2025-07-23 at 19:11 -0700, Jeff Davis wrote: > On Fri, 2025-07-11 at 11:48 +1200, Thomas Munro wrote: > > On Fri, Jul 11, 2025 at 6:22 AM Jeff Davis > > wrote: > > > I don't have a great windows development environment, and it > > > appears CI > > > and the buildfarm don't offer great cove

Re: PG18 GIN parallel index build crash - invalid memory alloc request size

2025-10-28 Thread Tomas Vondra
On 10/28/25 21:54, Gregory Smith wrote: > On Sun, Oct 26, 2025 at 5:52 PM Tomas Vondra > wrote: > > I like (a) more, because it's more consistent with how I understand > m_w_m. It's weird > to say "use up to 20GB of memory" and then the system overrides that >

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Jelte Fennema-Nio
On Tue, 28 Oct 2025 at 22:58, Sergey Prokhorenko wrote: > Where's the best place to discuss this: in this thread or starting a new one? I don't think core Postgres is the place where experimental encodings should be discussed and tried (it would fit great in an extension though). It sounds more l

Re: [PATCH] Fix ICU strength not being honored in collation rules

2025-10-28 Thread Luis Felippe
Daniel Verite wrote: > Yes. There was a previous report recently [1], with a proposed fix [2] > identical to yours. It is great to know this is already being addressed. > The fix may change sort results for collations affected by the problem > (that's the point of the fix!), so even if it's for

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Jelte Fennema-Nio
On Tue, 28 Oct 2025 at 17:41, Dagfinn Ilmari Mannsåker wrote: > Here's a patch for that. Looks good to me. Maybe add a test where not every byte is the same though. > I'm not 100% confident about the error code > for invalid length, but that was the closest one I could find in > errcodes.txt. T

Re: contrib/sepgsql regression tests have been broken for months

2025-10-28 Thread Joe Conway
On 10/28/25 18:20, Jacob Champion wrote: On Tue, Oct 28, 2025 at 2:47 PM Joe Conway wrote: I am not understanding why ssl_passphrase_callbackCheck is being run at all, but that is currently where I am stuck ¯\_(ツ)_/¯. Old buildfarm client (REL_11). SSL tests aren't skipped until at least 12,

Re: another autovacuum scheduling thread

2025-10-28 Thread Sami Imseih
> Done. My compiler is complaining about v6 "../src/backend/postmaster/autovacuum.c:3293:32: warning: operation on ‘*score’ may be undefined [-Wsequence-point] 3293 | *score = *score = Max(*score, (double) instuples / Max(vacinsthresh, 1)); [2/2] Linking target src/backen

Re: contrib/sepgsql regression tests have been broken for months

2025-10-28 Thread Jacob Champion
On Tue, Oct 28, 2025 at 2:47 PM Joe Conway wrote: > I am not understanding why ssl_passphrase_callbackCheck is being run at > all, but that is currently where I am stuck ¯\_(ツ)_/¯. Old buildfarm client (REL_11). SSL tests aren't skipped until at least 12, it looks like. (I ran into similar proble

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Sergey Prokhorenko
First of all, I'm definitely a proponent of being able to encode UUIDsusing base32hex in Postgres. On Mon, 27 Oct 2025 at 23:37, Sergey Prokhorenko wrote: > I wanted to highlight an important discussion among the authors and > contributors of RFC 9562 regarding UUID text encoding: > > https://g

Re: C11: should we use char32_t for unicode code points?

2025-10-28 Thread Jeff Davis
On Wed, 2025-10-29 at 09:03 +1300, Thomas Munro wrote: > If you try to test for the existence of the type rather than the > header in meson/configure, won't you still have the configure-with-C > compile-with-C++ problem I must have misunderstood the first time. If we depend on HAVE_CHAR32_T, then

Re: contrib/sepgsql regression tests have been broken for months

2025-10-28 Thread Joe Conway
On 10/25/25 11:29, Álvaro Herrera wrote: On 2025-Oct-23, Tom Lane wrote: I think that rhinoceros is the only BF member testing with --with-selinux. As I recall, there is/was one other animal doing it, but I don't remember which one it is. I could be wrong, but I am not aware of there ever b

Re: contrib/sepgsql regression tests have been broken for months

2025-10-28 Thread Joe Conway
On 10/24/25 08:28, Joe Conway wrote: On 10/24/25 07:49, Joe Conway wrote: On 10/24/25 17:36, Tom Lane wrote: Anyway, we seem to need the attached in v18 and HEAD, and we really ought to get BF coverage going again. I will make those changes (and hope nothing breaks). And of course they did

Re: Optimize LISTEN/NOTIFY

2025-10-28 Thread Joel Jacobson
On Tue, Oct 28, 2025, at 07:46, Chao Li wrote: >>> But anyway, we should run some load tests to verify every solution to >>> see how much they really improve. Do you already have or plan to work >>> on a load test script? >> >> Yes, I'm currently working on a combined benchmark / correctness tes

Re: [PATCH] Fix ICU strength not being honored in collation rules

2025-10-28 Thread Daniel Verite
Luis Felippe wrote: > This fix changes this call to pass UCOL_DEFAULT instead. This way, > UCOL_TERTIARY is still specified by default, but the strength explicitly set > on the rules string is not overwritten. This is important because there is > currently no way to create a collation with

Re: another autovacuum scheduling thread

2025-10-28 Thread Nathan Bossart
On Tue, Oct 28, 2025 at 12:16:28PM +1300, David Rowley wrote: > I think it's reasonable to want to document how autovacuum prioritises > tables, but maybe not in too much detail. Longer term, I think it > would be good to have a pg_catalog view for this which showed the > relid or schema/relname, a

Re: another autovacuum scheduling thread

2025-10-28 Thread Nathan Bossart
On Tue, Oct 28, 2025 at 11:47:08AM +1300, David Rowley wrote: > 1. I think the following code at the bottom of > relation_needs_vacanalyze() can be deleted. You've added the check to > ensure *doanalyze never gets set to true for pg_statistic. > > /* ANALYZE refuses to work with pg_statistic */ >

Re: Include extension path on pg_available_extensions

2025-10-28 Thread Euler Taveira
On Tue, Oct 28, 2025, at 9:29 AM, Matheus Alcantara wrote: > So here it is, see attached. > I took another look at this patch. ! This adds a new "location" column on pg_available_extensions and ! pg_available_extension_versions views to show the path of locations that ! Postgres is seeing based o

Re: PG18 GIN parallel index build crash - invalid memory alloc request size

2025-10-28 Thread Gregory Smith
On Sun, Oct 26, 2025 at 5:52 PM Tomas Vondra wrote: > I like (a) more, because it's more consistent with how I understand m_w_m. > It's weird > to say "use up to 20GB of memory" and then the system overrides that with > "1GB". > I don't think it affects performance, though. > There wasn't really

Re: apply_scanjoin_target_to_paths and partitionwise join

2025-10-28 Thread Robert Haas
On Mon, Oct 27, 2025 at 5:12 PM Robert Haas wrote: > I haven't had a chance just yet to think through all the details of > the proposed patch, but I now believe we should commit something along > those lines. I still suspect that back-patching is unwise; even though > I now agree with Ashutosh's c

Re: C11: should we use char32_t for unicode code points?

2025-10-28 Thread Thomas Munro
On Wed, Oct 29, 2025 at 7:45 AM Peter Eisentraut wrote: > On 26.10.25 20:43, Jeff Davis wrote: > > +/* > > + * char16_t and char32_t > > + * Unicode code points. > > + */ > > +#ifndef __cplusplus > > +#ifdef HAVE_UCHAR_H > > +#include > > +#ifndef __STDC_UTF_16__ > > +#error "char16_t must u

Re: C11: should we use char32_t for unicode code points?

2025-10-28 Thread Jeff Davis
On Tue, 2025-10-28 at 19:45 +0100, Peter Eisentraut wrote: > This could be improved a bit. The reason for some of these > conditionals > is not clear.  Like, what does __cplusplus have to do with this?  I > think it would be more correct to write a configure/meson check for > the > actual types

Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

2025-10-28 Thread David E. Wheeler
On Oct 28, 2025, at 15:38, David E. Wheeler wrote: > This patch uses existing Postgres functions, of which btrim is one[1]. Accidentally cut out my link before sending! [1]: https://www.postgresql.org/docs/current/functions-string.html#FUNCTIONS-STRING D signature.asc Description: Message

Re: [BUG?] check_exclusion_or_unique_constraint false negative

2025-10-28 Thread Mihail Nikalayeu
And rebased :) From 6a4e379df251d27e42b8191bd153691f4d2d9886 Mon Sep 17 00:00:00 2001 From: nkey Date: Sat, 23 Nov 2024 13:25:11 +0100 Subject: [PATCH v16 1/2] This patch introduces new injection points and TAP tests to reproduce and verify conflict detection issues that arise during SNAPSHOT_DI

Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

2025-10-28 Thread David E. Wheeler
On Oct 22, 2025, at 22:43, Chao Li wrote: > I wonder if there is some consideration for the order? Feels that jpiSttLtrim > and the following jpiStrXXX should be placed above jpiTimeXXX. I wouldn’t think the order would matter. > I know “b” in “btrim” stands for “both”, just curious why trim b

Re: Feature: psql - display current search_path in prompt

2025-10-28 Thread Nathan Bossart
Committed. -- nathan

Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement

2025-10-28 Thread Philip Alger
Hi > > I am fine with v8. > > ERROR: trigger name cannot be schema qualified > > > > I’m fine with changing it to the other error message: > > ERROR: trigger name \"%s\" for table \"%s\" does not exist > The extra check is for the user experience because the function accepts `text`. A user cou

Re: Question about InvalidatePossiblyObsoleteSlot()

2025-10-28 Thread Masahiko Sawada
On Tue, Oct 28, 2025 at 1:58 AM Bertrand Drouvot wrote: > > Hi, > > On Mon, Oct 27, 2025 at 10:22:32AM -0700, Masahiko Sawada wrote: > > On Thu, Oct 23, 2025 at 3:07 AM Bertrand Drouvot > > > seems no longer match what this > > block of codes do. > > Agree. > > > It needs to be updated or moved to

Re: C11: should we use char32_t for unicode code points?

2025-10-28 Thread Peter Eisentraut
This patch looks good to me overall, it's a nice improvement in clarity. On 26.10.25 20:43, Jeff Davis wrote: +/* + * char16_t and char32_t + * Unicode code points. + */ +#ifndef __cplusplus +#ifdef HAVE_UCHAR_H +#include +#ifndef __STDC_UTF_16__ +#error "char16_t must use UTF-16 encoding"

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Masahiko Sawada
On Tue, Oct 28, 2025 at 9:41 AM Dagfinn Ilmari Mannsåker wrote: > > Dagfinn Ilmari Mannsåker writes: > > > Jelte Fennema-Nio writes: > > > >> Then combining that with UUID <-> bytea casting (which also > >> seems totally reasonable functionality to me), would give you the > >> functionality (but

Re: [BUG?] check_exclusion_or_unique_constraint false negative

2025-10-28 Thread Mihail Nikalayeu
Fixed race in tests caused https://cirrus-ci.com/task/5815107659235328?logs=test_world#L324 to fail. From 2a6a121c7cfe4823db0f8aec931c5dbcab672616 Mon Sep 17 00:00:00 2001 From: nkey Date: Wed, 3 Sep 2025 19:08:55 +0200 Subject: [PATCH v14 2/2] Fix logical replication conflict detection during tu

Re: C11: should we use char32_t for unicode code points?

2025-10-28 Thread Jeff Davis
On Tue, 2025-10-28 at 15:40 +1300, Thomas Munro wrote: > I was noticing that toupper_libc_mb() directly tests if a pg_wchar > value is in the ASCII range, which only makes sense given knowledge > of > pg_wchar's encoding, so perhap that should trigger this new coding > rule.  But I agree that's pre

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-28 Thread Bertrand Drouvot
Hi, On Tue, Oct 28, 2025 at 04:05:34PM +0200, Álvaro Herrera wrote: > > BTW we could use Coccinelle to replace all the XLogRecPtrIsInvalid() > calls with !XLogRecPtrIsValid(), as well as all places comparing an LSN > to InvalidXLogRecPtr or literal zero. I did v1 the old way (shell script) and d

Re: Bug in pg_stat_statements

2025-10-28 Thread Sami Imseih
> > > > On Fri, Oct 24, 2025 at 07:04:59PM -0500, Sami Imseih wrote: > > > v4 corrects some code comments. > > > > The fix in the first patch looks good, thanks. > > Yeah, I think this general idea is sensible. However, I think we should > take it one step further and just remove last_loc entirely

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

2025-10-28 Thread Sami Imseih
> > About the main issue, seems to me the consensus is that dropping unnamed > > portals more aggressively is the way to go? > > At the cost of one extra hash table lookup, that unlikely does not > matter for performance anyway. I guess so. AFAICT, we don’t need to introduce an extra hash lookup.

Re: Channel binding for post-quantum cryptography

2025-10-28 Thread Jacob Champion
On Tue, Oct 28, 2025 at 9:46 AM Nico Williams wrote: > RFC 5929 co-author here. We should take this to the IETF TLS WG mailing > list and update RFC 5929 and the tls-server-end-point registraion to fix > this. > > Options in the case that the certificate's signature algorithm does not > have a di

Re: Feature: psql - display current search_path in prompt

2025-10-28 Thread Nathan Bossart
On Tue, Oct 28, 2025 at 09:08:36AM +0800, Chao Li wrote: >> On Oct 28, 2025, at 04:29, Nathan Bossart wrote: >> Here is what I have staged for commit. I ended up simplifying the patch a >> bit. In particular, I thought better of the question mark business. It >> looks like we ordinarily just sk

Re: Bug in pg_stat_statements

2025-10-28 Thread Álvaro Herrera
On 2025-Oct-26, Dmitry Dolgov wrote: > > On Fri, Oct 24, 2025 at 07:04:59PM -0500, Sami Imseih wrote: > > v4 corrects some code comments. > > The fix in the first patch looks good, thanks. Yeah, I think this general idea is sensible. However, I think we should take it one step further and just

Missing post create object access hook in CreateForeignTable ?

2025-10-28 Thread Tanzeel Khan
Hi, I have noticed there is no post create object access hook invocation in CreateForeignTable, shouldn't there be one ? Thanks, Tanzeel

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-28 Thread Álvaro Herrera
On 2025-Oct-27, Euler Taveira wrote: > On Mon, Oct 27, 2025, at 2:58 PM, Bryan Green wrote: > > Thanks for even glancing at this. I did not add any regression > > tests because the output goes to the server log and not the client. > > Since Michael said WIN32-specific tests and mentioned lo

Re: Channel binding for post-quantum cryptography

2025-10-28 Thread Nico Williams
On Mon, Oct 20, 2025 at 05:06:12PM +0900, Michael Paquier wrote: > On Mon, Oct 20, 2025 at 09:12:52AM +0200, Filip Janus wrote: > > The problem is caused by a difference between the currently used algorithms > > and post-quantum ones. For example, commonly used algorithms like RSA have > > a define

Re: display hot standby state in psql prompt

2025-10-28 Thread Nathan Bossart
On Tue, Oct 28, 2025 at 12:03:48PM +0100, Jim Jones wrote: > On 28/10/2025 00:55, Fujii Masao wrote: >> If we mark transaction_read_only as GUC_REPORT, wouldn't the reset value >> be sent automatically at the end of the transaction? It seems like we >> wouldn't >> need any new mechanism for that.

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Jelte Fennema-Nio writes: > >> Then combining that with UUID <-> bytea casting (which also >> seems totally reasonable functionality to me), would give you the >> functionality (but not the defaults you want). > > +1 for adding casts. Here's a patch for that.

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

2025-10-28 Thread Fujii Masao
On Mon, Oct 27, 2025 at 6:13 PM Fujii Masao wrote: > One approach to address this issue is to keep calling PQgetResult() until > it returns NULL, and then check the connection status when getSQLErrorStatus() > determines the error state. If the connection status is CONNECTION_BAD > at that point,

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

2025-10-28 Thread Dimitrios Apostolou
Sorry to ping again, but was there a conclusion reached regarding adding the new file_extend_method setting?

Re: disallow alter individual column if partition key contains wholerow reference

2025-10-28 Thread Kirill Reshke
Hi all On Fri, 26 Sept 2025 at 23:46, Matt Dailis wrote: > > Hi Jian, > > I built postgres on commit 879c49 and verified that these commands > produce the error as described: > > =# drop table if exists t4; > NOTICE: table "t4" does not exist, skipping > DROP TABLE > =# CREATE TABLE t4(f1 int, f

Re: failed NUMA pages inquiry status: Operation not permitted

2025-10-28 Thread Christoph Berg
Re: To Tomas Vondra > So maybe PG should implement numa_available itself like that. Following our discussion at pgconf.eu last week, I just implemented that. The numa and pg_buffercache tests pass in Docker on Debian bookworm now. Christoph >From 0b0088145b42a4316fb15a0ea4363bbebfabdfd7 Mon Sep 1

Re: Channel binding for post-quantum cryptography

2025-10-28 Thread Jacob Champion
On Mon, Oct 27, 2025 at 10:55 PM Michael Paquier wrote: > Another thing that bugs me is that this patch would force sha-256 for > everything, without at least checks based on NID_ML_DSA_44, > NID_ML_DSA_65 or NID_ML_DSA_87. That may be more flexible, but I'm > wondering if it could become a probl

Re: failed NUMA pages inquiry status: Operation not permitted

2025-10-28 Thread Tomas Vondra
On 10/16/25 17:19, Christoph Berg wrote: >> So maybe all that's needed is a get_mempolicy() call in >> pg_numa_available() ? > > ... > > So maybe PG should implement numa_available itself like that. (Or > accept the output difference so the regression tests are passing.) > I'm not sure which of

Re: Making pg_rewind faster

2025-10-28 Thread Robert Haas
On Tue, Oct 28, 2025 at 12:02 AM Michael Paquier wrote: > I was thinking about this argument over the weekend, and I am > wondering if we could not do better here to detect if a file should be > copied or not. What if we included a checksum of each file if both > exist on the target and source, a

[Patch] Windows relation extension failure at 2GB and 4GB

2025-10-28 Thread Bryan Green
Hello, I found two related bugs in PostgreSQL's Windows port that prevent files from exceeding 2GB. While unlikely to affect most installations (default 1GB segments), the code is objectively wrong and worth fixing. The first bug is a pervasive use of off_t where pgoff_t should be used. On W

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Jelte Fennema-Nio
On Tue, 28 Oct 2025 at 15:29, Sergey Prokhorenko wrote: > I believe we should put the discussion about compact UUID text encoding in > PostgreSQL on hold for now. I agree with respect to the dedicated encode_uuid and decode_uuid functions. But I think having postgres support base32hex in encode

Re: Batching in executor

2025-10-28 Thread Daniil Davydov
Hi, As far as I understand, this work partially overlaps with what we did in the thread [1] (in short - we introduce support for batching within the ModifyTable node). Am I correct? It's worth saying that the patch in that thread is already quite old - now I have an improved implementation and te

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Sergey Prokhorenko
First of all, I'm definitely a proponent of being able to encode UUIDsusing base32hex in Postgres. On Mon, 27 Oct 2025 at 23:37, Sergey Prokhorenko wrote: > I wanted to highlight an important discussion among the authors and > contributors of RFC 9562 regarding UUID text encoding: > > https://g

Re: POC: make mxidoff 64 bits

2025-10-28 Thread Heikki Linnakangas
On 27/10/2025 17:54, Maxim Orlov wrote: Here is a new patch set @ 10b5bb3bffaee8 As previously stated, the patch set implements the concept of saving the "difference" between page offsets in order to save disc space. Hmm, is that safe? We do the assignment of multixact and offset, in the GetN

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-28 Thread Álvaro Herrera
On 2025-Oct-28, Michael Paquier wrote: > The annoying part with eliminating XLogRecPtrIsInvalid() or replacing > it is that a bunch of external code would be broken, particularly > backup tools. I'd rather leave the beast alone. Well, we don't have to remove it right away. We can simply not use

Re: Fix bug with accessing to temporary tables of other sessions

2025-10-28 Thread Daniil Davydov
Hi, I've rebased patches on the newest master. -- Best regards, Daniil Davydov From 57ea4c318664f6e0b72040d14e7a7d9f82d2036c Mon Sep 17 00:00:00 2001 From: Daniil Davidov Date: Mon, 18 Aug 2025 15:14:25 +0700 Subject: [PATCH v12 2/4] Logging for parallel autovacuum --- src/backend/access/heap/

Re: Batching in executor

2025-10-28 Thread Amit Langote
On Tue, Oct 28, 2025 at 1:18 AM Tomas Vondra wrote: > On 10/27/25 08:24, Amit Langote wrote: > > Thank you for reviewing the patch and taking the time to run those > > experiments. I appreciate the detailed feedback and questions. I also > > apologize for my late reply, I spent perhaps way too mu

Re: Extend injection_points_attach() to accept a user-defined function

2025-10-28 Thread Michael Paquier
On Tue, Oct 28, 2025 at 06:11:25PM +0530, Rahila Syed wrote: > I would like to propose providing a sql interface to link a > user-defined function to an injection point. > Currently, if a user wants an injection point to invoke a custom > function, they must first define an SQL > function that atta

Re: [PATCH] Check that index can return in get_actual_variable_range()

2025-10-28 Thread Maxime Schoemans
> On 28 Oct 2025, at 10:20, Peter Eisentraut wrote: > > I have committed the first patch. Great, thank you for looking at this. > The test suite is probably a bit too bulky for testing this particular niche > behavior. Also, it doesn't work with assertions enabled because of the > hardcode

Re: Batching in executor

2025-10-28 Thread Amit Langote
Hi Peter, Thanks for chiming in here. On Tue, Oct 28, 2025 at 2:37 AM Peter Geoghegan wrote: > > On Mon, Sep 29, 2025 at 7:01 AM Tomas Vondra wrote: > > While looking at the patch, I couldn't help but think about the index > > prefetching stuff that I work on. It also introduces the concept of

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-28 Thread Michael Paquier
On Tue, Oct 28, 2025 at 01:40:24PM +0200, Heikki Linnakangas wrote: > It's also a bit cumbersome that we have XLogRecPtrIsInvalid() rather than > XLogRecPtrIsValid(). That's inconsistent with OidIsValid and > TransactionIdInValid, and it leads to an awkward double negative 'if > (!XLogRecPtrIsInval

Re: POC: Parallel processing of indexes in autovacuum

2025-10-28 Thread Daniil Davydov
Hi, On Tue, Sep 16, 2025 at 1:50 AM Alexander Korotkov wrote: > > I've rebased this patchset to the current master. > That required me to move the new GUC definition to guc_parameters.dat. > Also, I adjusted typedefs.list and made pgindent. Thank you for looking into it! > > + { > + { >

Re: Add wal_fpi_bytes_[un]compressed to pg_stat_wal

2025-10-28 Thread Michael Paquier
On Tue, Oct 28, 2025 at 07:33:00PM +0900, Shinya Kato wrote: > I investigated previous discussions and found [0]. This thread > mentioned that XLogInsert() calls XLogRecordAssemble() multiple times > in its do-while loop, so the value might be invalid. > > Based on the discussion above, it seems m

Re: Issue with logical replication slot during switchover

2025-10-28 Thread Alexander Kukushkin
Hi all, I don't think we really need to have allow_overwrite. It is not possible to create logical slots on standby with failover=true, therefore we can safely rely on failover being true to understand that at some point this node was a primary and that this slot is supposed to be synced. Please s

Re: Logical Replication of sequences

2025-10-28 Thread vignesh C
On Tue, 28 Oct 2025 at 07:17, Chao Li wrote: > > > > > On Oct 27, 2025, at 17:11, Chao Li wrote: > > > > The changes in 0001 are straightforward, looks good. I haven’t reviewed > > 0004 yet. > > Comments for 0004: > > 1 - config.sgml > ``` > -In logical replication, this parameter also l

Extend injection_points_attach() to accept a user-defined function

2025-10-28 Thread Rahila Syed
Hi, I would like to propose providing a sql interface to link a user-defined function to an injection point. Currently, if a user wants an injection point to invoke a custom function, they must first define an SQL function that attaches the injection point to the target/custom function. This SQL f

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-28 Thread Bertrand Drouvot
Hi, On Tue, Oct 28, 2025 at 01:40:24PM +0200, Heikki Linnakangas wrote: > On 28/10/2025 10:53, Quan Zongliang wrote: > > On 10/28/25 4:13 PM, Bertrand Drouvot wrote: > > > While working on refactoring some code in [1], one of the changes was: > > > > > > -   if (initial_restart_lsn != Invalid

Re: Include extension path on pg_available_extensions

2025-10-28 Thread Matheus Alcantara
On Thu Oct 23, 2025 at 10:57 PM -03, Quan Zongliang wrote: > On 10/23/25 9:56 PM, Euler Taveira wrote: > >> >> * insufficient privilege: if the role doesn't have the sufficient privileges, >>return NULL or '' (similar to pg_stat_activity). I >>don't have a strong preference but the latter

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

2025-10-28 Thread Amit Kapila
On Tue, Oct 28, 2025 at 3:59 PM Amit Kapila wrote: > > On Mon, Oct 27, 2025 at 8:38 PM shveta malik wrote: > > > > On Mon, Oct 27, 2025 at 6:12 PM Amit Kapila wrote: > > > > > > > > Another related point is that, say we decide to disable decoding > > > because the last logical slot got invalidat

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Jelte Fennema-Nio
On Tue, 28 Oct 2025 at 12:53, Dagfinn Ilmari Mannsåker wrote: > If it's just one new form, do we need a separate decode function? Could > we not just make uuid_in() accept both forms (they're easily > distinguishable by length), like bytea_in accepts both the old escape > format and the new hex f

COPY FROM with RLS

2025-10-28 Thread jian he
hi. While working on other COPY related patches, I wonder whether it's doable to implement RLS for COPY FROM. COPY FROM is more simple that INSERT. we don't need to consider INSERT RETURNING and INSERT ON CONFLICT DO UPDATE, also no need to worry about MERGE ... INSERT. we also don't need to cons

Re: Enhance statistics reset functions to return reset timestamp

2025-10-28 Thread Shinya Kato
On Mon, Oct 27, 2025 at 12:50 PM David Rowley wrote: > > On Sat, 9 Aug 2025 at 10:38, Andres Freund wrote: > > On 2025-08-08 13:18:39 +0900, Shinya Kato wrote: > > > I would like to propose a series of patches that enhance the behavior > > > of various statistics reset functions by making them re

Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions

2025-10-28 Thread Dagfinn Ilmari Mannsåker
Jelte Fennema-Nio writes: > First of all, I'm definitely a proponent of being able to encode UUIDs > using base32hex in Postgres. > > On Mon, 27 Oct 2025 at 23:37, Sergey Prokhorenko > wrote: >> >> Regarding the proposal to couple UUID encoding with the bytea type >> through encode()/decode() fu

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-10-28 Thread Heikki Linnakangas
On 28/10/2025 10:53, Quan Zongliang wrote: On 10/28/25 4:13 PM, Bertrand Drouvot wrote: While working on refactoring some code in [1], one of the changes was: -   if (initial_restart_lsn != InvalidXLogRecPtr && -   initial_restart_lsn < oldestLSN) +   XLogRecPtr  restart_lsn = s

Re: display hot standby state in psql prompt

2025-10-28 Thread Jim Jones
On 28/10/2025 00:55, Fujii Masao wrote: > If we mark transaction_read_only as GUC_REPORT, wouldn't the reset value > be sent automatically at the end of the transaction? It seems like we wouldn't > need any new mechanism for that. However, the downside might be that > more ParameterStatus messag

Re: SQL:2011 Application Time Update & Delete

2025-10-28 Thread Peter Eisentraut
On 24.10.25 19:08, Paul A Jungwirth wrote: The first 3 doc patches all apply to features that we released in v18, so it would be nice to get those reviewed/merged soon if possible. I have looked through the documentation patches 0001 through 0003. I suggest making the Temporal Tables chapter a

Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement

2025-10-28 Thread Jim Jones
Hi Jian On 28/10/2025 07:06, jian he wrote: > SELECT pg_get_trigger_ddl('main_table', 'public.modified_a'); > should error out, I think. > but V7 will not error out, instead it will ignore text "public" and print out > DDL for the trigger name as "modified_a" which is not what I expected, so I > r

Re: Add wal_fpi_bytes_[un]compressed to pg_stat_wal

2025-10-28 Thread Shinya Kato
On Tue, Oct 28, 2025 at 4:32 PM Michael Paquier wrote: > Without the changes in instrument.c from patch 0002, patch 0001 that > implements the basics would not work. So.. I have moved the changes > of instrument.c to 0001, reordered the fields to be more consistent, > did two bumps (catalog, sta

Re: Bug in pg_stat_statements

2025-10-28 Thread Álvaro Herrera
On 2025-Oct-28, Michael Paquier wrote: > FWIW, the line defining the separation between pg_stat_statements.c > and queryjumblefuncs.c should rely on a pretty simple concept: > JumbleState can be written only by queryjumblefuncs.c and > src/backend/nodes/, and should remain in an untouched constant

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

2025-10-28 Thread Amit Kapila
On Mon, Oct 27, 2025 at 8:38 PM shveta malik wrote: > > On Mon, Oct 27, 2025 at 6:12 PM Amit Kapila wrote: > > > > > Another related point is that, say we decide to disable decoding > > because the last logical slot got invalidated and > > RequestDisableLogicalDecoding()->LogicalDecodingStatusCha

Re: Logical Replication of sequences

2025-10-28 Thread Amit Kapila
On Mon, Oct 27, 2025 at 8:23 AM Zhijie Hou (Fujitsu) wrote: > > On Friday, October 24, 2025 11:22 PM vignesh C wrote: > > > > On Thu, 23 Oct 2025 at 16:47, Amit Kapila wrote: > > > > > > On Thu, Oct 23, 2025 at 11:45 AM vignesh C wrote: > > > > > > > > The attached patch has the changes for the

  1   2   >