Re: Update Unicode data to Unicode 16.0.0

2025-03-14 Thread Jeremy Schneider
On Fri, 07 Mar 2025 13:11:18 -0800 Jeff Davis wrote: > On Wed, 2025-03-05 at 20:43 -0600, Nathan Bossart wrote: > > I see.  Do we provide any suggested next steps for users to assess > > the > > potentially-affected relations? > > I don't know exactly where we should document it, but I've atta

Re: Allow default \watch interval in psql to be configured

2025-03-14 Thread Michael Paquier
On Fri, Mar 14, 2025 at 09:11:15AM -0400, Greg Sabino Mullane wrote: > New patch looks good. TIL I learned you can even use things like > > \set WATCH_INTERVAL 0xAp-4 > > :) You have taste. -- Michael signature.asc Description: PGP signature

Re: More Perl cleanups

2025-03-14 Thread Michael Paquier
On Fri, Mar 14, 2025 at 05:39:30PM +, Dagfinn Ilmari Mannsåker wrote: > In some recent-ish commits (ce1b0f9d, fd4c4ede and cc2c9fa6) we > converted a lot of the TAP tests to use long command line options and > fat commas (=>) to separate command line options from their arguments, > so that perl

Re: long-standing data loss bug in initial sync of logical replication

2025-03-14 Thread Amit Kapila
On Thu, Mar 13, 2025 at 2:12 PM Hayato Kuroda (Fujitsu) wrote: > > > Workload C. DDL is happening on publication but on unrelated table > > We did not run the workload because we expected this could be same results as > D. > 588acf6 is needed to optimi

Re: Reducing the log spam

2025-03-14 Thread Laurenz Albe
On Fri, 2025-03-14 at 06:58 +0100, Laurenz Albe wrote: > On Tue, 2025-03-11 at 10:46 +0100, Laurenz Albe wrote: > > Attached is the fifth version of the patch. > > ... and here, for good measure, a pgindented version > Apart from that, no changes. ... and here is v7, improved in the spirit of htt

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-14 Thread Peter Smith
On Sat, Mar 15, 2025 at 4:52 PM Peter Smith wrote: > > On Fri, Mar 14, 2025 at 5:39 PM David G. Johnston > wrote: > > > > On Tuesday, March 11, 2025, Peter Smith wrote: > >> > >> > >> Choice 3. Implement some option that has an argument saying what to delete > >> > >> Implement an option that ta

Re: how to see the generated nodetags.h

2025-03-14 Thread jian he
On Sat, Mar 15, 2025 at 2:26 AM Hao Zhang wrote: > > Hello Hackers > > It seems nodetags.h is generated by gen_node_support.pl. Where and how can I > see this generated header to get a full list of all possible node tags? Thx > > > typedef enum NodeTag > { > T_Invalid = 0, > > #include "nodes

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-14 Thread Peter Smith
On Fri, Mar 14, 2025 at 5:39 PM David G. Johnston wrote: > > On Tuesday, March 11, 2025, Peter Smith wrote: >> >> >> Choice 3. Implement some option that has an argument saying what to delete >> >> Implement an option that takes some argument saying what objects to remove. >> >> Here, the current

Re: AIO v2.5

2025-03-14 Thread Andres Freund
Hi, On 2025-03-14 15:43:15 -0400, Andres Freund wrote: > Open items: > > - The upstream BAS_BULKREAD is so small that throughput is substantially worse > once a table reaches 1/4 shared_buffers. That patch in the patchset as-is is > probably not good enough, although I am not sure about that >

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-14 Thread David G. Johnston
On Mon, Mar 10, 2025 at 5:00 PM Peter Smith wrote: > > 6. > The test code remains difficult to review because I can't see the > forest for the trees due to the dozens of S->S1 node name changes. > These name changes are unrelated to the new feature so please separate > them into a different prere

Re: 64 bit numbers vs format strings

2025-03-14 Thread Thomas Munro
On Mon, Mar 10, 2025 at 10:49 PM Peter Eisentraut wrote: > On 02.03.25 22:08, Thomas Munro wrote: > > Good plan, thanks. Here's a rebase. > > I think this went ok, and we can proceed here. Cool, I'll post a new patch soon, but first a question about this bit: > - I don't think it's proper to as

Re: Dubious server log messages after pg_upgrade

2025-03-14 Thread Michael Paquier
On Wed, Mar 12, 2025 at 08:41:29PM -0400, Tom Lane wrote: > So this may have been going on for quite some time without our > noticing. The "corrupted statistics file" whine is most likely > caused by pg_upgrade copying the old system's pgstat.stat file > into the new installation --- is that a goo

Re: PG_CFLAGS rpath Passthrough Issue

2025-03-14 Thread David E. Wheeler
On Mar 14, 2025, at 17:13, Laurenz Albe wrote: > It is a quoting issue. > > Trial and error showed my that the following works: > > make CFLAGS='-Wl,-rpath,\$$ORIGIN' > > ... at least when I run it on the shell. Putting it into an RPM spec file > might require more escaping, no idea. Confir

Not-terribly-safe checks for CRC intrinsic support

2025-03-14 Thread Tom Lane
I noticed that our configuration-time checks for the presence of CRC intrinsics generally look like unsigned int crc = 0; crc = __crc32cb(crc, 0); crc = __crc32ch(crc, 0); crc = __crc32cw(crc, 0); crc = __crc32cd(crc, 0); /* return computed value, to prevent the above being

Re: like pg_shmem_allocations, but fine-grained for DSM registry ?

2025-03-14 Thread Florents Tselai
On Fri, Mar 14, 2025 at 4:16 PM Nathan Bossart wrote: > On Thu, Mar 13, 2025 at 06:54:09PM +0200, Florents Tselai wrote: > > I扉e been working with the DSM registry API. > > I was wondering if it is possible (it doesn愒 look like it) or if it has > been discussed: > > can we expose a view like pg_s

Re: Proposal: manipulating pg_control file from Perl

2025-03-14 Thread Aleksander Alekseev
Hi, > > It is my understanding that Perl is not extremely aware of alignment. > > For instance if I want to modify the checksum of the file and the > > offset of the checksum is let's say 200 bytes on one platform, 204 on > > another and 208 on a third, pack/unpack will not help me. > > > > Or did

Re: PG_CFLAGS rpath Passthrough Issue

2025-03-14 Thread Laurenz Albe
On Fri, 2025-03-14 at 12:58 -0400, David E. Wheeler wrote: > I'm trying to compile an extension with PG_CFLAGS1[1]: > > ```sh > make PG_CFLAGS='-Wl,-rpath,$ORIGIN' > ``` > > This works, but for some reason the rpath value is truncated: > > ```console > # chrpath -l src/semver.so > src/semver.so:

Re: Doc: fix the rewrite condition when executing ALTER TABLE ADD COLUMN

2025-03-14 Thread Álvaro Herrera
Hello, I have pushed this patch now, with some tiny changes. (I am not a believer of the semicolon added by commit d31e2a495b6f before the word "and"). Also, I didn't think that changing a column type was sufficiently close to the restrictions of column addition to belong in the same enumeration

Re: lwlocknames.h beautification attempt

2025-03-14 Thread Álvaro Herrera
On 2025-Mar-01, Gurjeet Singh wrote: > I propose the following change to the generation script, > generate-lwlocknames.pl > > -print $h "#define ${lockname}Lock (&MainLWLockArray[$lockidx].lock)\n"; > +printf $h "#define %-30s %s\n", "${lockname}Lock", > "(&MainLWLockArray[$lockidx].lock)

Re: vacuumdb changes for stats import/export

2025-03-14 Thread Nathan Bossart
Out of curiosity, I generated many relations with the following command (stolen from [0]): do $$ begin for i in 1..10 loop execute format('create table t%s (f1 int unique, f2 int unique);', i); execute format('insert into t%s select x, x from generate_series(1,1000) x', i)

Re: encode/decode support for base64url

2025-03-14 Thread Florents Tselai
On Tue, Mar 11, 2025 at 10:08 AM Florents Tselai wrote: > > > On Tue, Mar 11, 2025 at 12:51 AM Cary Huang wrote: > >> > Oh well - you're probably right. >> > I guess I was blinded by my convenience. >> > Adding a 'base64url' option there is more appropriate. >> >> I agree with it too. It is neat

Re: PATCH: warn about, and deprecate, clear text passwords

2025-03-14 Thread Greg Sabino Mullane
I'd rather not sit on this another year, if we can help it. We really should be warning people about this practice. The exact wording of the hint can be up for debate (or postponed - we technically don't have to say anything other than 'bad idea'). Having the ability to disable clear text password

Re: Optimization for lower(), upper(), casefold() functions.

2025-03-14 Thread Jeff Davis
On Fri, 2025-03-14 at 13:16 +0200, Heikki Linnakangas wrote: > Attached are fixes for those and some other minor things. Thank you, I agree and I have applied your changes. Regards, Jeff Davis

More Perl cleanups

2025-03-14 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, In some recent-ish commits (ce1b0f9d, fd4c4ede and cc2c9fa6) we converted a lot of the TAP tests to use long command line options and fat commas (=>) to separate command line options from their arguments, so that perltidy does't break lines between them. However, those patches were no

Re: Disabling vacuum truncate for autovacuum

2025-03-14 Thread Nathan Bossart
On Thu, Mar 06, 2025 at 08:54:59AM +0900, Fujii Masao wrote: > +1 to having the reloption (if specified) override the GUC setting. > That is, I think that autovacuum_vacuum_truncate as defining > the default behavior for VACUUM truncation, and that the GUC should > only apply when neither the TRUNC

Re: Available disk space per tablespace

2025-03-14 Thread Christoph Berg
Re: Quan Zongliang > According to the statvfs documentation for macOS > f_frsize The size in bytes of the minimum unit of allocation on this > file system. > f_bsizeThe preferred length of I/O requests for files on this file > system. Thanks for catching that. f_frsize is the correct

Re: Proposal: Progressive explain

2025-03-14 Thread Rafael Thofehrn Castro
Thanks for the valuable inputs Euler. Adjusted most of your recommendations. > I found a crash. It is simple to reproduce. Indeed, I failed to test plain EXPLAIN after the addition of the new GUC progressive_explain_min_duration. This is fixed. > You call this feature "progressive explain". My f

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-14 Thread David G. Johnston
On Fri, Mar 14, 2025 at 12:26 AM Zhijie Hou (Fujitsu) < houzj.f...@fujitsu.com> wrote: > For logical replication, there is a frequent need to automatically delete > all > objects (including publications) on replicas that are no longer needed. > This > requirement comes from a common use case in lo

Re: Add “FOR UPDATE NOWAIT” lock details to the log.

2025-03-14 Thread Fujii Masao
On 2025/03/11 22:24, Fujii Masao wrote: On 2025/03/11 16:50, Yuki Seino wrote: Instead, wouldn't it be simpler to update LockAcquireExtended() to take a new argument, like logLockFailure, to control whether a lock failure should be logged directly? I’ve adjusted the patch accordingly and at

Re: Proposal: manipulating pg_control file from Perl

2025-03-14 Thread Dagfinn Ilmari Mannsåker
Aleksander Alekseev writes: > Hi Dagfinn, > >> Notwitstanding Tom's objections, these are not reasons for not being >> able to manipulate these values from Perl. The `i` and `I` formats for >> pack/unpack (see https://perldoc.perl.org/functions/pack) use what the C >> compiler calls `int`, in te

Re: Get rid of WALBufMappingLock

2025-03-14 Thread Tomas Vondra
Hi, I've briefly looked at this patch this week, and done a bit of testing. I don't have any comments about the correctness - it does seem correct to me and I haven't noticed any crashes/issues, but I'm not familiar with the WALBufMappingLock enough to have insightful opinions. I have however dec

Re: Proposal: manipulating pg_control file from Perl

2025-03-14 Thread Christoph Berg
Re: Aleksander Alekseev > Do you think pg_resetwall should be able to do more than it currently > does, or merely pointing out that we already have a tool for editing > pg_control file? I don't know if being able to mess with these fields makes sense, but if so, pg_resetwal seems like the correct

Re: like pg_shmem_allocations, but fine-grained for DSM registry ?

2025-03-14 Thread Nathan Bossart
On Thu, Mar 13, 2025 at 06:54:09PM +0200, Florents Tselai wrote: > I´ve been working with the DSM registry API. > I was wondering if it is possible (it doesn´t look like it) or if it has been > discussed: > can we expose a view like pg_shmem_allocations, but fine-grained for every > named segment

Re: Proposal: manipulating pg_control file from Perl

2025-03-14 Thread Aleksander Alekseev
Hi Christoph, > Re: Aleksander Alekseev > > 1) Provide a tool written in C that allows changing pg_control, e.g. > > `pg_writecontoldata` or maybe a flat like `pg_controldata -w`. > > I thought we already had pg_resetwal for that. That's a good point. In the case I referred to [1] however I want

Re: Optimizing FastPathTransferRelationLocks()

2025-03-14 Thread Fujii Masao
On 2025/03/13 0:32, Ashutosh Bapat wrote: Fair enough. The code is more readable this way. That itself is an improvement. I stared at c4d5cb71d229095a39fda1121a75ee40e6069a2a to see whether there's any reason this was left aside at that time. I am convinced that it was just missed. I think th

Re: Proposal: manipulating pg_control file from Perl

2025-03-14 Thread Aleksander Alekseev
Hi Dagfinn, > Notwitstanding Tom's objections, these are not reasons for not being > able to manipulate these values from Perl. The `i` and `I` formats for > pack/unpack (see https://perldoc.perl.org/functions/pack) use what the C > compiler calls `int`, in terms of both endianness and size. > >

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-03-14 Thread Evgeny
Hello Hackers! > I think this is going too far. The new function BootStrapSlruPage() now > is being used for things other than bootstrapping, and that doesn't seem > appropriate to me. I think we should leave the things that aren't > bootstrap out of this patch. For instance, ExtendCLOG was mo

Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions

2025-03-14 Thread Nazir Bilal Yavuz
Hi, Here is the v2. Changes prior to v1 are: - pg_buffercache_evict_relation() function is introduced. Which takes a relation as an argument and evicts all shared buffers in the relation. - It is mentioned in the docs that the #buffers_flushed in the pg_buffercache_evict_relation() and pg_bufferc

Re: Allow default \watch interval in psql to be configured

2025-03-14 Thread Greg Sabino Mullane
New patch looks good. TIL I learned you can even use things like \set WATCH_INTERVAL 0xAp-4 :) Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support

Re: bogus error message for ALTER TABLE ALTER CONSTRAINT

2025-03-14 Thread Álvaro Herrera
On 2025-Mar-11, Amul Sul wrote: > I was thinking of something like the attached, which includes your > test cases from 0001. Perhaps the macro name could be improved. FWIW I like this general idea. I don't like the proposed names much though, especially the abuse of ALL_CAPS; and because they op

Re: Changing the state of data checksums in a running cluster

2025-03-14 Thread Tomas Vondra
On 3/14/25 00:11, Tomas Vondra wrote: > ... >> One issue I ran into is the postmaster does not seem to be processing >> the barriers, and thus not getting info about the data_checksum_version >> changes. > > Makes sense, that seems like a pretty reasonable constraint for the >>

Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.

2025-03-14 Thread Nisha Moond
Hi Shubham, Here are a few comments for the v12 patch. doc/src/sgml/ref/pg_createsubscriber.sgml : 1. + + For all source server non-template databases create subscriptions for + create subscriptions for databases with the same names on the + target server. is “create sub

Re: Draft for basic NUMA observability

2025-03-14 Thread Bertrand Drouvot
Hi, On Fri, Mar 14, 2025 at 11:05:28AM +0100, Jakub Wartak wrote: > On Thu, Mar 13, 2025 at 3:15 PM Bertrand Drouvot > wrote: > > Hi, > > Thank you very much for the review! I'm answering to both reviews in > one go and the results is attached v12, seems it all should be solved > now: Thanks f

Re: Reducing memory consumed by RestrictInfo list translations in partitionwise join planning

2025-03-14 Thread Amit Langote
Hi Ashutosh, On Tue, Feb 25, 2025 at 8:04 PM Ashutosh Bapat wrote: > On Thu, Feb 20, 2025 at 5:28 PM Ashutosh Bapat > wrote: > > On Tue, Feb 4, 2025 at 4:07 PM Ashutosh Bapat > > wrote: > > > If we are not interested in saving memory, there is a simpler way to > > > improve planning time by a

Re: doc: Mention clock synchronization recommendation for hot_standby_feedback

2025-03-14 Thread vignesh C
On Wed, 5 Mar 2025 at 11:46, Amit Kapila wrote: > > On Tue, Mar 4, 2025 at 4:44 PM Jakub Wartak > > I can go with the last patch as you observed that in a real-world > case, and we can look at others (if any) on a case-to-case basis. > Fujii-San, others, do you have any opinion on this? +1 for th

Re: Draft for basic NUMA observability

2025-03-14 Thread Jakub Wartak
On Thu, Mar 13, 2025 at 3:15 PM Bertrand Drouvot wrote: Hi, Thank you very much for the review! I'm answering to both reviews in one go and the results is attached v12, seems it all should be solved now: > > > === 2 > > > > > > +else > > > + as_fn_error $? "header file is required for --with-

Re: Allow default \watch interval in psql to be configured

2025-03-14 Thread Daniel Gustafsson
On 13 Mar 2025, at 15:03, Greg Sabino Mullane wrote:Patch looks good. One minor issue:greg=# \set WATCH_INTERVAL -1invalid value "-1" for "WATCH_INTERVAL": must be greater than 0.00greg=# \set WATCH_INTERVAL 0.00greg=#We should disallow 0 as the error message impliesAh, nice catch, fixed in the at

Re: Separate GUC for replication origins

2025-03-14 Thread vignesh C
On Fri, 14 Mar 2025 at 06:25, Euler Taveira wrote: > > On Thu, Mar 13, 2025, at 11:10 AM, vignesh C wrote: > > Few comments: > > > Thanks for taking a look. > > 1) After selecting max_active_replication_origins setting in the > SELECT query having order by, the first record returned will be the >

Re: Some read stream improvements

2025-03-14 Thread Thomas Munro
I have pushed the new pin limit patches, after some more testing and copy editing. I dropped an unnecessary hunk (in read_stream_reset(), a change I'd like to make but it didn't belong in this commit) and dropped the word "Soft" from GetSoftPinLimit() as it wasn't helping comprehension and isn't ev

Add time spent in posix_fadvise() in I/O read time ?

2025-03-14 Thread Frédéric Yhuel
Hi, I'm currently looking at how we can integrate effective_io_concurrency into the planner cost model. This is actually a big overstatement, as I have only done a bunch of tests so far. One thing I've noticed is that posix_fadvise(,,POSIX_FADV_WILLNEED) isn't always non-blocking on Linux. As

Re: Use Python "Limited API" in PL/Python

2025-03-14 Thread Peter Eisentraut
On 05.03.25 17:40, Peter Eisentraut wrote: On 03.03.25 11:17, Peter Eisentraut wrote: Update for the hackers list: This patch set was briefly committed but had to be reverted because it crashed on some older Python versions; see [0]. I have locally reproduced the problem with Python 3.6 and 3

Re: Minor rework of ALTER TABLE SET RelOptions code

2025-03-14 Thread Álvaro Herrera
On 2025-Mar-07, Nikolay Shaplov wrote: > Patch description is following: > > 1. `isnull` variable is actually needed in a very narrow scope, so > > it is better to keep it in that scope, not keeping it in mind in while > > dealing with the rest of the code.

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-03-14 Thread Daniel Gustafsson
> On 14 Mar 2025, at 00:02, Abhishek Chanda wrote: > > Thanks, Daniel. > > Should there be the ifdef guard in here as well? > > + {"sslkeylogfile", NULL, NULL, NULL, > + "SSL-Key-Log-File", "", 0, /* sizeof("") = 0 */ > + offsetof(struct pg_conn, sslkeylogfile)}, No, we want the option to work

Re: pg_attribute_noreturn(), MSVC, C11

2025-03-14 Thread Peter Eisentraut
On 13.03.25 13:43, Peter Eisentraut wrote: I committed the first two patches (squashed together) (about pg_noreturn).  I had to make one change: I put back the GCC fallback that I had removed between v1 and v2.  This is needed for GCC versions before C11 became the default (gcc 5) and also for

RE: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-03-14 Thread Zhijie Hou (Fujitsu)
On 2025/03/14 15:25:00 wrote: On Wed, Mar 12, 2025 at 12:13 PM David G. Johnston wrote: > On Tuesday, March 11, 2025, Amit Kapila > wrote: > > On Tue, Mar 11, 2025 at 8:21 PM David G. Johnston > > mailto:david.g.johns...@gmail.com> > wrote: > > > > > > On Tue,

Re: SQL/JSON json_table plan clause

2025-03-14 Thread Amit Langote
Hi Nikita, I was looking at the patch you posted on Feb 3. Two high-level comments: * The documentation additions are missing. * It looks like the patch mixes refactoring changes with new functionality, which makes it harder to follow what's existing vs. new. Could you separate these changes so