Re: Parallel CREATE INDEX for GIN indexes

2025-03-15 Thread Alexander Korotkov
Hi Matthias, On Fri, Mar 7, 2025 at 4:08 AM Matthias van de Meent wrote: > > On Tue, 4 Mar 2025 at 20:50, Tomas Vondra wrote: > > > > I pushed the two smaller parts today. > > > > Here's the remaining two parts, to keep cfbot happy. I don't expect to > > get these into PG18, though. > > As promi

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-15 Thread Alvaro Herrera
On 2025-Mar-12, Ashutosh Bapat wrote: > If the test passes for you, can you please try the patches at [1] on > top of your patches? Please apply those, set and export environment > variable PG_TEST_EXTRA=regress_dump_test, and run 002_pg_upgrade test? > I intended to do this but can not do it sinc

Re: Proposal: manipulating pg_control file from Perl

2025-03-15 Thread Dagfinn Ilmari Mannsåker
Aleksander Alekseev writes: > Hi, > > Previously it was pointed out [1] that manipulating the pg_control > file from Cluster.pm may be beneficial under certain conditions. [...] > Unfortunately this can't be done at the moment. One of the reasons is > that the ControlFileData structure stores pla

PG_CFLAGS rpath Passthrough Issue

2025-03-15 Thread David E. Wheeler
Hello Hackers, 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: RUNPATH=RIGIN ``` Do I need to do something different to includ

Re: Disabling vacuum truncate for autovacuum

2025-03-15 Thread Laurenz Albe
On Fri, 2025-03-14 at 10:42 -0500, Nathan Bossart wrote: > One other difference in my version of the patch [0] is to call this GUC > vacuum_truncate and have it apply to both autovacuum and VACUUM. I agree that that is the way to go. It makes no sense to restrict the feature to autovacuum. Yours,

Re: vacuumdb changes for stats import/export

2025-03-15 Thread Nathan Bossart
On Mon, Mar 10, 2025 at 12:35:22PM +0700, John Naylor wrote: > I have no further comments. Thanks. I'll give this a little more time for review before committing. We'll still need to update the recommendation in pg_upgrade's documentation. I'm going to keep that separate because the stats impor

Re: Improve CRC32C performance on SSE4.2

2025-03-15 Thread John Naylor
On Wed, Mar 12, 2025 at 3:57 AM Devulapalli, Raghuveer wrote: > > > I've gone ahead and added the generated AVX-512 algorithm in v14-0005 > I'm a little confused. Why is v14 missing the earlier versions of pclmul > implementation that works without avx-512? As I mentioned upthread, the 128-bit

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-15 Thread Rushabh Lathia
On Thu, Feb 27, 2025 at 3:25 PM Rushabh Lathia wrote: > Thank Alvaro for the fixup patch. > > > > > On Fri, Feb 21, 2025 at 11:43 AM Alvaro Herrera > wrote: > >> Hello, >> >> Thanks! >> >> I noticed a typo 'constrint' in several places; fixed in the attached. >> >> I discovered that this sequenc

Re: SQL Property Graph Queries (SQL/PGQ)

2025-03-15 Thread Junwang Zhao
Hi Amit, On Tue, Mar 11, 2025 at 5:06 PM Amit Langote wrote: > > Hi Ashutosh, Junwang, > > On Tue, Mar 11, 2025 at 4:22 PM Ashutosh Bapat > wrote: > > On Wed, Feb 26, 2025 at 8:04 PM Junwang Zhao wrote: > > > I added a trivial fix(v12-0014) that called table_open/table_close in > > > rewriteGra

Re: NOT ENFORCED constraint feature

2025-03-15 Thread Alexandra Wang
Hi Amul, On Thu, Feb 27, 2025 at 12:57 AM Amul Sul wrote: > Attached is the rebased patch set against the latest master head, > which also includes a *new* refactoring patch (0001). In this patch, > I’ve re-added ATExecAlterChildConstr(), which is required for the main > feature patch (0008) to

RE: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET

2025-03-15 Thread Bykov Ivan
Hello! > Since then, I see that Ivan > has already submitted a patch that accounts for NULL nodes and adds a > byte to the jumble buffer to account for NULLs. This seems quite clean > and simple. However, Sami seems to have concerns about the overhead of > doing this. Is that warranted at all? Pot

Re: Question about duplicate JSONTYPE_JSON check

2025-03-15 Thread Maciek Sakrejda
Thanks for the quick fix. I was able to reproduce the assertion failure and to confirm that it's resolved with the patch. Looks good to me.

Re: Add pg_accept_connections_start_time() for better uptime calculation

2025-03-15 Thread Fujii Masao
On 2025/03/06 21:55, Robins Tharakan wrote: Hi, Thanks for taking a look at the patch, and for your feedback. On Wed, 5 Mar 2025 at 03:22, Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: On 2025/02/16 16:05, Robins Tharakan wrote: > This patch introduces a new function pg_a

Re: Statistics Import and Export

2025-03-15 Thread Corey Huinker
> > > https://www.postgresql.org/docs/current/ddl-priv.html > > The above text indicates that we should do the check, but also that > it's not terribly important for actual security. > Ok, I'm convinced. > > > If we do, we'll want to change downgrade the following errors to > > warn+return fals

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-15 Thread Alvaro Herrera
On 2025-Mar-10, Rushabh Lathia wrote: > I adjusted the set_attnotnull() API and removed the added > queue_validation parameter. Rather, the function start using wqueue > input parameter as a check. > If wqueue is NULL, skip the queue_validation. Attaching patch here, > but not sure how clear it

Re: Random pg_upgrade 004_subscription test failure on drongo

2025-03-15 Thread Andrew Dunstan
On 2025-03-13 Th 5:04 AM, vignesh C wrote: Hi, In one of the recent buildfarm runs, the test pg_upgrade/004_subscription test fails at [1]. It has failed with the following: Restoring database schemas in the new cluster *failure* Consult the last few lines of "C:/prog/bf/root/HEAD/pgsql.build

Re: Vacuum statistics

2025-03-15 Thread Kirill Reshke
On Thu, 27 Feb 2025 at 23:00, Alena Rybakina wrote: > > Hi! > On 17.02.2025 17:46, Alena Rybakina wrote: > > On 04.02.2025 18:22, Alena Rybakina wrote: > >> Hi! Thank you for your review! > >> > >> On 02.02.2025 23:43, Alexander Korotkov wrote: > >>> On Mon, Jan 13, 2025 at 3:26 PM Alena Rybakina

Re: pg_attribute_noreturn(), MSVC, C11

2025-03-15 Thread Peter Eisentraut
On 10.03.25 14:58, Andres Freund wrote: diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c index ec8eddad863..d32c0d318fb 100644 --- a/src/backend/utils/mmgr/slab.c +++ b/src/backend/utils/mmgr/slab.c @@ -601,8 +601,8 @@ SlabAllocFromNewBlock(MemoryContext context, Size si

Re: Add XMLNamespaces to XMLElement

2025-03-15 Thread newtglobal postgresql_contributors
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi Pavel, I have tested this patch, and it proves to be highly useful when h

Re: vacuumdb changes for stats import/export

2025-03-15 Thread John Naylor
On Fri, Mar 7, 2025 at 4:47 AM Nathan Bossart wrote: > > On Thu, Mar 06, 2025 at 06:30:59PM +0700, John Naylor wrote: > > IIUC correctly, pg_statistic doesn't store stats on itself, so this > > causes the query result to always contain pg_statistic -- does that > > get removed elsewhere? > > Good

how to see the generated nodetags.h

2025-03-15 Thread Hao Zhang
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

Re: JSON_VALUE() behavior when RETURNING bytea (expected base64 decoding)

2025-03-15 Thread Shay Rojansky
> > If the behavior of RETURNING is meant to be identical to that of simply >> applying a cast, is there any actual advantage in using JSON_VALUE with >> RETURNING? In other words, why not just do JSON_VALUE(json '"AQID"', >> '$')::bytea instead of using RETURNING? I thought the point was precisely

Re: vacuumdb changes for stats import/export

2025-03-15 Thread John Naylor
On Wed, Mar 12, 2025 at 12:00 AM Nathan Bossart wrote: > > On Mon, Mar 10, 2025 at 10:08:49AM -0500, Nathan Bossart wrote: > > On Mon, Mar 10, 2025 at 12:35:22PM +0700, John Naylor wrote: > >> I have no further comments. > > > > Thanks. I'll give this a little more time for review before committi

Re: Parallel CREATE INDEX for GIN indexes

2025-03-15 Thread Matthias van de Meent
On Tue, 4 Mar 2025 at 20:50, Tomas Vondra wrote: > > I pushed the two smaller parts today. > > Here's the remaining two parts, to keep cfbot happy. I don't expect to > get these into PG18, though. As promised on- and off-list, here's the 0001 patch, polished, split, and further adapted for perfor

Re: protocol support for labels

2025-03-15 Thread Kirill Reshke
On Tue, 11 Mar 2025 at 11:09, Jeremy Schneider wrote: > observability frameworks like OpenTelemetry support tracing through all > layers of a stack, and trace_ids can even be passed into sql with > extensions like sqlcommenter. however sqlcommenter puts the trace_id > into a comment which effecti

Re: track generic and custom plans in pg_stat_statements

2025-03-15 Thread Sami Imseih
> Thank you for your patch. It is really useful for tracking the history > of generic and custom plan usage. Thanks for the review! > 1. Is there any reason for the double check of cplan != NULL? It seems > unnecessary, and we could simplify it to: > > -if (cplan && cplan->status == PLAN_CACHE_ST

Re: Proposal: manipulating pg_control file from Perl

2025-03-15 Thread Christoph Berg
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. Christoph

Re: ZStandard (with dictionaries) compression support for TOAST compression

2025-03-15 Thread Aleksander Alekseev
Hi Nikhil, Many thanks for working on this. I proposed a similar patch some time ago [1] but the overall feedback was somewhat mixed so I choose to focus on something else. Thanks for peeking this up. > test=# select build_zstd_dict_for_attribute('"public"."zstd"', 1); > build_zstd_dict_for_attri

Re: Update Unicode data to Unicode 16.0.0

2025-03-15 Thread Jeff Davis
On Sat, 2025-03-15 at 12:15 -0400, Tom Lane wrote: > On the other hand, if we keep up with the Joneses by updating the > Unicode data, we can hopefully put those behavioral changes into > effect *before* they'd affect any real data. That's a good point. Regards, Jeff Davis

Re: AIO v2.5

2025-03-15 Thread Tom Lane
Andres Freund writes: > While looking at the view I felt motivated to tackle the one FIXME in the > implementation of the view. Namely that the "error_desc" column wasn't > populated (the view did show that there was an error, but not what the error > was). > Which lead me down a sad sad rabbit h

Assert(TransactionIdPrecedesOrEquals(TransactionXmin, RecentXmin));

2025-03-15 Thread Tomas Vondra
Hi, while stress-testing a physical replication to test another patch, I've repeatedly hit this assert in GetSnapshotDataReuse: Assert(TransactionIdPrecedesOrEquals(TransactionXmin, RecentXmin)); AFAICS the backtrace always looks exactly the same - a couple frames from the top: #4 0x

Re: Update Unicode data to Unicode 16.0.0

2025-03-15 Thread Jeff Davis
On Fri, 2025-03-14 at 23:54 -0700, Jeremy Schneider wrote: > From my perspective, the whole point of the builtin collation was to > one option that avoids these problems that come with updating both > ICU > and glibc. > > So I guess the main point of the builtin provider just that it's > faster >

Re: PGSERVICEFILE as part of a normal connection string

2025-03-15 Thread Ryo Kanbayashi
On Thu, Mar 13, 2025 at 9:42 AM Michael Paquier wrote: > > On Thu, Mar 13, 2025 at 08:53:49AM +0900, Ryo Kanbayashi wrote: > > If you can't work for ther patch for a while because you are busy or > > other some reason, > > I can become additinal reviewer and apply review comments from Micael > >

Re: Test to dump and restore objects left behind by regression

2025-03-15 Thread Alvaro Herrera
Hello When running these tests, I encounter this strange diff in the dumps, which seems to be that the locale for type money does not match. I imagine the problem is that the locale is not set correctly when initdb'ing one of them? Grepping the regress_log for initdb, I see this: $ grep -B1 'Ru

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

2025-03-15 Thread Tomas Vondra
On 3/15/25 17:26, Andres Freund wrote: > Jo. > > On 2025-03-15 16:50:02 +0100, Tomas Vondra wrote: >> Thanks, here's an updated patch version > > FWIW, this fails in CI; > > https://cirrus-ci.com/build/4678473324691456 > On all OSs: > [16:08:36.331] # Failed test 'options --locale-provider=icu

Re: Commitfest app release on Feb 17 with many improvements

2025-03-15 Thread Jelte Fennema-Nio
On Thu, 6 Mar 2025 at 16:36, vignesh C wrote: > But it applies neatly for me and Jim also at [3]. Any idea why patch > apply fails with CFbot whereas it passes in our environment? Okay, the cause of this seems to be that the CFbot currently uses "git apply --3way", not "git am --3way". For some r

Re: Statistics Import and Export

2025-03-15 Thread Andres Freund
On 2025-03-06 13:47:51 -0500, Corey Huinker wrote: > I'm at the same conclusion. This would mean keeping the one > getAttributeStats query perrelation, Why does it have to mean that? It surely would be easier with separate queries, but I don't think there's anything inherently blocking us from doi

Re: Available disk space per tablespace

2025-03-15 Thread Christoph Berg
Re: Thomas Munro > > Hmm. Is looping on EINTR worth the trouble? > > I was just wondering if it might be one of those oddballs that ignores > SA_RESTART, but I guess that doesn't seem too likely (I mean, first > you'd probably have to have a reason to sleep or some other special > reason, and who

Re: Patch: Cover POSITION(bytea,bytea) with tests

2025-03-15 Thread Peter Smith
+1 for this. Some minor comments: 1. I thought the new test cases should be located earlier in the file where there were already a couple of POSITION tests. (see "-- E021-11 position expression") 2. Maybe one of your test cases can be identical to the example from the docs [1]. position('\x5678'

Re: New subscriber - looking for an overview of the code

2025-03-15 Thread Roberto Mello
On Sat, Mar 15, 2025 at 2:27 PM Lateef Sagar wrote: > Hello devs, > I am a coding enthusiast. I have downloaded code in a Ubuntu VMWare > machine and I am able to compile the code. > > I am looking for a course / site that can give me an overview of the code > like: > 1. How is the code organized

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

2025-03-15 Thread Alexander Borisov
15.03.2025 23:07, Jeff Davis wrote: On Fri, 2025-03-14 at 15:00 +0300, Alexander Borisov wrote: I tried adding a loop to create tables, and everything looks fine (v7). [...] I prefer to generalize when we have the other code in place. As it was, it was a bit confusing why the extra arguments

New subscriber - looking for an overview of the code

2025-03-15 Thread Lateef Sagar
Hello devs,I am a coding enthusiast. I have downloaded code in a Ubuntu VMWare machine and I am able to compile the code. I am looking for a course / site that can give me an overview of the code like:1. How is the code organized and which file/folder has these components?     * Core RDBMS engin

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

2025-03-15 Thread Jeff Davis
On Sat, Mar 15, 2025 at 1:11 PM Tom Lane wrote: > Jeff Davis writes: > > Committed. Thank you! > > crake doesn't like your perl style: > > ./src/common/unicode/generate-unicode_case_table.pl: Loop iterator is not > lexical at line 638, column 2. See page 108 of PBP. I suppose pgperltidy didn'

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

2025-03-15 Thread Tom Lane
Jeff Davis writes: > On Sat, Mar 15, 2025 at 1:11 PM Tom Lane wrote: >> crake doesn't like your perl style: >> ./src/common/unicode/generate-unicode_case_table.pl: Loop iterator is not >> lexical at line 638, column 2. See page 108 of PBP. > I suppose pgperltidy didn't catch that. I will fix it

Proposal: Deferred Replica Filtering for PostgreSQL Logical Replication

2025-03-15 Thread Dean
Hi hackers, I'd like to propose an enhancement to PostgreSQL's logical replication system: Deferred Replica Filtering (DRF). The goal of this feature is to provide more granular control over which rows are replicated by applying publication filters *after* the WAL decoding process, before sending

Re: PG_CFLAGS rpath Passthrough Issue

2025-03-15 Thread David E. Wheeler
On Mar 15, 2025, at 07:58, Álvaro Herrera wrote: > It's make. From its info manual: Oh, that explains it. It hadn’t occurred to me that make could eval strings passed to it like that, but of course it does. > > I'm surprised that you don't need \$\$ though. I wonder if > make CFLAGS='-Wl,-r

Re: Statistics Import and Export

2025-03-15 Thread Corey Huinker
On Thu, Mar 6, 2025 at 3:48 AM Jeff Davis wrote: > On Wed, 2025-03-05 at 23:04 -0500, Corey Huinker wrote: > > > > Anyway, here's a rebased set of the existing up-for-consideration > > patches, plus the optimization of avoiding querying on non-expression > > indexes. > > Comments on 0003: > > * A

Re: dsm_registry: Add detach and destroy features

2025-03-15 Thread Nathan Bossart
On Fri, Mar 14, 2025 at 10:46:58AM +0900, Sungwoo Chang wrote: > I also made some fix in GetNamedDSMSegment function where it throws an > exception if the found entry's size field does not match the user input. It > looks like dshash_release_lock needs to be called and MemoryContext needs > to be s

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-03-15 Thread Peter Eisentraut
On 13.03.25 19:31, Tom Lane wrote: Jacob Champion writes: Adding the PG prefix to the envvar name addresses my collision concern, but I think Tom's comment upthread [1] was saying that we should not provide any envvar at all: I think it might be safer if we only accepted it as a connection p

Re: Available disk space per tablespace

2025-03-15 Thread Thomas Munro
On Sun, Mar 16, 2025 at 1:17 AM Laurenz Albe wrote: > On Sat, 2025-03-15 at 13:09 +0100, Christoph Berg wrote: > > Do we care about any of these? > > > > AIX > > We dropped support for it, but there are efforts to change that. FWIW AIX does have it, according to its manual, in case it comes back.

Re: Proposal: Adding compression of temporary files

2025-03-15 Thread Alexander Korotkov
On Sun, Jan 5, 2025 at 1:43 AM Filip Janus wrote: > > I apologize for multiple messages, but I found a small bug in the previous > version. > > -Filip- Great, thank you for your work. I think the patches could use a pgindent run. I don't see a reason why the temp file compression method sh

Re: Add an option to skip loading missing publication to avoid logical replication failure

2025-03-15 Thread Amit Kapila
On Thu, Mar 13, 2025 at 7:26 PM Dilip Kumar wrote: > > On Thu, Mar 13, 2025 at 3:20 PM Amit Kapila wrote: > > > > > > I think that is too much related to pub-sub model, and ideally, > > pgoutput should not care about it. I have written a comment > > considering somebody using pgoutput decoding mo

Re: Disabling vacuum truncate for autovacuum

2025-03-15 Thread Fujii Masao
On 2025/03/15 0:42, Nathan Bossart wrote: I should also mention that we just have a few weeks left in the v18 development cycle. The code itself seems pretty straightforward, so if we can agree on behavior and nomenclature, I'll do my darndest to get this responsibly committed in time. +1

Re: Update Unicode data to Unicode 16.0.0

2025-03-15 Thread Joe Conway
On 3/15/25 03:26, Laurenz Albe wrote: On Fri, 2025-03-14 at 23:54 -0700, Jeremy Schneider wrote: On Fri, 07 Mar 2025 13:11:18 -0800 It seems the consensus is to update unicode in core... FWIW, I'm still in favor of leaving it alone because ICU is there for when I need up-to-date unicode versions

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

2025-03-15 Thread David G. Johnston
On Friday, March 14, 2025, Amit Kapila wrote: > On Sat, Mar 15, 2025 at 11:35 AM Peter Smith > wrote: > > > > 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

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-03-15 Thread Melanie Plageman
On Thu, Mar 13, 2025 at 5:41 PM Melanie Plageman wrote: > > Overall, I feel pretty good about merging this once Thomas merges the > read stream patches. This was committed in 944e81bf99db2b5b70b, 2b73a8cd33b745c, and c3953226a07527a1e2. I've marked it as committed in the CF app. As we continue t

Re: Assert when executing query on partitioned table

2025-03-15 Thread Joseph Koshakow
On Sat, Mar 8, 2025 at 4:28 PM Joseph Koshakow wrote: > > The assert was introduced commit f16241 > > So if I understand correctly, at the time the assert was added, we in > fact did not support UPDATE of INSERT ON CONFLICT for a partitioned > table. However, since then we've added support but nob

Re: Add column name to error description

2025-03-15 Thread Erik Wienhold
On 2025-03-07 04:05 +0100, Tom Lane wrote: > Erik Wienhold writes: > > But I don't see the point in keeping variables atttypid and atttypmod > > around when those values are now available via outatt. Removing these > > two variables makes the code easier to read IMO. Done so in the > > attached

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

2025-03-15 Thread Andres Freund
Jo. On 2025-03-15 16:50:02 +0100, Tomas Vondra wrote: > Thanks, here's an updated patch version FWIW, this fails in CI; https://cirrus-ci.com/build/4678473324691456 On all OSs: [16:08:36.331] # Failed test 'options --locale-provider=icu --locale=und --lc-*=C: no stderr' [16:08:36.331] # at

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

2025-03-15 Thread Heikki Linnakangas
On 14/03/2025 05:43, Jeff Davis wrote: On Wed, 2025-03-12 at 23:39 +0300, Alexander Borisov wrote: v5 attached. Attached v6j. * marked arrays as "static const" rather than just "static" * ran pgindent * changed data types where appropriate (uint32->pg_wchar) * modified perl code so that it pr

Re: ZStandard (with dictionaries) compression support for TOAST compression

2025-03-15 Thread Yura Sokolov
06.03.2025 19:29, Nikhil Kumar Veldanda пишет: > Hi, > >> Overall idea is great. >> >> I just want to mention LZ4 also have API to use dictionary. Its dictionary >> will be as simple as "virtually prepended" text (in contrast to complex >> ZStd dictionary format). >> >> I mean, it would be great i

Re: vacuumdb changes for stats import/export

2025-03-15 Thread Nathan Bossart
On Thu, Mar 06, 2025 at 06:30:59PM +0700, John Naylor wrote: > +This option can only be used in conjunction with > +--analyze-only and > --analyze-in-stages. > > + /* Prohibit --missing-only without --analyze-only or --analyze-in-stages */ > + if (vacopts.missing_only && !vacopts.a

Re: Available disk space per tablespace

2025-03-15 Thread Thomas Munro
On Sat, Mar 15, 2025 at 4:40 AM Christoph Berg wrote: > I'm still unconvinced if we should use statfs() instead of statvfs() > on *BSD or if their manpage is just trolling us and statvfs is just > fine. > > DESCRIPTION >The statvfs() and fstatvfs() functions fill the structure pointed to b

Re: Statistics Import and Export

2025-03-15 Thread Andres Freund
Hi, On 2025-03-06 12:16:44 -0500, Corey Huinker wrote: > > > > To be honest, I am a bit surprised that we decided to enable this by > > default. It's not obvious to me that statistics should be regarded as > > part of the database in the same way that table definitions or table > > data are. That

Re: per backend WAL statistics

2025-03-15 Thread Michael Paquier
On Wed, Mar 12, 2025 at 05:37:11AM +, Bertrand Drouvot wrote: > Thanks for the report! I think that it's better to remove the > PendingBackendStats > initializer (instead of adding extra braces). The reason is that I'm concerned > about padding bytes (that could be added to the struct in the f

Re: Update Unicode data to Unicode 16.0.0

2025-03-15 Thread Tom Lane
Jeremy Schneider writes: > On Fri, 07 Mar 2025 13:11:18 -0800 > Jeff Davis wrote: >> The change in Unicode that I'm focusing on is the addition of U+A7DC, >> which is unassigned in Unicode 15.1 and assigned in Unicode 16, which >> lowercases to U+019B. The examples assume that the user is using >

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

2025-03-15 Thread Daniel Gustafsson
> On 14 Mar 2025, at 13:20, Tomas Vondra wrote: > I experimented with this a little bit, and unfortunately I ran into not > one, but two race conditions in this :-( I don't have reproducers, all > of this was done by manually adding sleep() calls / gdb breakpoints to > pause the processes for a w

Re: SQL/JSON json_table plan clause

2025-03-15 Thread Nikita Malakhov
Hi Amit! Thank you for your feedback, I'll check it out in a couple of days and reply. -- Regards, Nikita Malakhov Postgres Professional The Russian Postgres Company https://postgrespro.ru/

Re: JSON_VALUE() behavior when RETURNING bytea (expected base64 decoding)

2025-03-15 Thread Shay Rojansky
> > For whatever it's worth, I'll note that SQL Server's OPENJSON does do > > this (so when a JSON string property is extracted as a binary type, > > base64 encoding is assumed). Other databases also have very specific > > documented conversion rules for JSON_VALUE RETURNING (Oracle > docs.oracle.

Re: [Doc] Improve hostssl related descriptions and option presentation

2025-03-15 Thread David G. Johnston
On Sunday, March 9, 2025, vignesh C wrote: > On Fri, 28 Feb 2025 at 00:08, David G. Johnston > wrote: > > > > On Mon, Apr 22, 2024 at 2:20 PM David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> > >> Thoughts anyone? > >> > >> On Thu, Feb 1, 2024 at 3:47 PM David G. Johnston < > david.g

Re: Clarification on Role Access Rights to Table Indexes

2025-03-15 Thread Nathan Bossart
On Sun, Mar 09, 2025 at 11:48:05AM -0400, Tom Lane wrote: > Nathan Bossart writes: >> On Sat, Mar 08, 2025 at 05:17:40PM -0500, Tom Lane wrote: >>> ReindexIndex() faces this same problem and solves it with some >>> very complex code that manages to get the table's lock first. > >> I noticed that

Re: [PATCH] Fixed creation of empty .log files during log rotation

2025-03-15 Thread vignesh C
On Tue, 29 Oct 2024 at 13:38, Арсений Косицын wrote: > > > Hi everyone! > > A situation has been discovered in which empty .log files are being created. > > --Reproduce: > > 1) You need to set the following parameters in the "postgresql.conf" file: > > log_destination = 'csvlog' > logging_collecto

Re: Available disk space per tablespace

2025-03-15 Thread Thomas Munro
On Sun, Mar 16, 2025 at 1:09 AM Christoph Berg wrote: > Hmm. Is looping on EINTR worth the trouble? I was just wondering if it might be one of those oddballs that ignores SA_RESTART, but I guess that doesn't seem too likely (I mean, first you'd probably have to have a reason to sleep or some othe

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

2025-03-15 Thread Tom Lane
Jeff Davis writes: > Committed. Thank you! crake doesn't like your perl style: ./src/common/unicode/generate-unicode_case_table.pl: Loop iterator is not lexical at line 638, column 2. See page 108 of PBP. ([Variables::RequireLexicalLoopIterators] Severity: 5) regard

Re: Dubious server log messages after pg_upgrade

2025-03-15 Thread Andres Freund
Hi, On 2025-03-12 20:41:29 -0400, Tom Lane wrote: > I happened to notice these entries in a log file on a > buildfarm member [1]: > > 2025-03-12 15:39:53.265 UTC [7296] WARNING: found incorrect redo LSN > 0/159FB60 (expected 0/4028) > 2025-03-12 15:39:53.265 UTC [7296] LOG: corrupted stati

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

2025-03-15 Thread Jeff Davis
On Fri, 2025-03-14 at 15:00 +0300, Alexander Borisov wrote: > I tried adding a loop to create tables, and everything looks fine > (v7). > Also removed unnecessary (hanging) global variables. Changed. I used a loop more similar to your first one (hash of arrays), and I left case_map_special outside

Re: Dubious server log messages after pg_upgrade

2025-03-15 Thread Andres Freund
Hi, On 2025-03-15 16:14:10 -0400, Andres Freund wrote: > On 2025-03-12 20:41:29 -0400, Tom Lane wrote: > > I happened to notice these entries in a log file on a > > buildfarm member [1]: > > > > 2025-03-12 15:39:53.265 UTC [7296] WARNING: found incorrect redo LSN > > 0/159FB60 (expected 0/4

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-15 Thread Rushabh Lathia
On Wed, Mar 12, 2025 at 11:50 PM Alvaro Herrera wrote: > On 2025-Mar-12, Rushabh Lathia wrote: > > > Hi Alvaro, > > > > Here are the latest patches, which includes the regression fix. > > Thank you. > > Taking a step back after discussing this with some colleagues, I need to > contradict what I s

Re: SQLFunctionCache and generic plans

2025-03-15 Thread Tom Lane
I spent some time today going through the actual code in this patch. I realized that there's no longer any point in 0001: the later patches don't move or repeatedly-call that bit of code, so it can be left as-is. What I think we could stand to split out, though, is the changes in the plancache sup

Re: Draft for basic NUMA observability

2025-03-15 Thread Bertrand Drouvot
Hi, On Thu, Mar 13, 2025 at 02:15:14PM +, Bertrand Drouvot wrote: > > > === 19 > > > > > > > Can you please take a look again on this > > Sure, will do. > I'll have a look at v11 soon. About 0001: === 1 git am produces: .git/rebase-apply/patch:378: new blank line at EOF. + .git/rebase

Re: Clarification on Role Access Rights to Table Indexes

2025-03-15 Thread Tom Lane
Nathan Bossart writes: > On Sat, Mar 08, 2025 at 05:17:40PM -0500, Tom Lane wrote: >> ReindexIndex() faces this same problem and solves it with some >> very complex code that manages to get the table's lock first. > I noticed that amcheck's bt_index_check_internal() handles this problem, > ... >

Re: Parallel heap vacuum

2025-03-15 Thread Masahiko Sawada
On Sun, Mar 9, 2025 at 11:12 PM Amit Kapila wrote: > > On Wed, Mar 5, 2025 at 6:25 AM Masahiko Sawada wrote: > > > > On Mon, Mar 3, 2025 at 3:24 PM Masahiko Sawada > > wrote: > > > > > > > > > Another performance regression I can see in the results is that heap > > > vacuum phase (phase III) go

Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

2025-03-15 Thread Oliver Ford
On Fri, Feb 28, 2025 at 11:49 AM Tatsuo Ishii wrote: > >> BTW, I noticed that in the code path where > >> ignorenulls_getfuncarginframe() is called, WinSetMarkPosition() is > >> never called? > >> > >> Attached version uses the mark_pos at the end. > > I did simple performance test against v8. >

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

2025-03-15 Thread Nathan Bossart
On Mon, Mar 03, 2025 at 01:54:59PM -0500, Robert Haas wrote: > Oh, good point. I don't know. I just have heard a LOT of complaining > about passwords showing up in the log, and I'm not sure insisting that > they have to all be encrypted is going to make all of the complaining > stop. +1. At this

Re: Update Unicode data to Unicode 16.0.0

2025-03-15 Thread Laurenz Albe
On Fri, 2025-03-14 at 23:54 -0700, Jeremy Schneider wrote: > On Fri, 07 Mar 2025 13:11:18 -0800 > It seems the consensus is to update unicode in core... FWIW, I'm still > in favor of leaving it alone because ICU is there for when I need > up-to-date unicode versions. Me too. > From my perspective

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

2025-03-15 Thread Amit Kapila
On Sat, Mar 15, 2025 at 11:35 AM Peter Smith wrote: > > 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 ha

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

2025-03-15 Thread Florents Tselai
On Fri, Mar 14, 2025 at 11:44 PM Florents Tselai wrote: > > 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 i

Re: Enhancing Memory Context Statistics Reporting

2025-03-15 Thread Alexander Korotkov
Hi, Rahila! On Thu, Mar 13, 2025 at 3:57 PM Rahila Syed wrote: > > Please find attached updated and rebased patches. It has the following changes > > 1. To prevent memory leaks, ensure that the latest statistics published by a > process > are freed before it exits. This can be achieved by callin

Re: Available disk space per tablespace

2025-03-15 Thread Christoph Berg
Re: Thomas Munro > Hah, I see this in my local FreeBSD man page. I guess this might be a > reference to POSIX's 100% get-out clause "it is unspecified whether > all members of the statvfs structure have meaningful values on all > file systems". Yeah I could hear someone being annoyed by POSIX ech

Re: PG_CFLAGS rpath Passthrough Issue

2025-03-15 Thread Álvaro Herrera
On 2025-Mar-14, David E. Wheeler wrote: > But, just. WAT. 30 years in this business and shell string escaping > continues to elude me. I tried lots of different combinations of > escaping, but this weird double-$ never occurred to me. It's make. From its info manual: 6.1 Basics of Variable Ref

Re: Available disk space per tablespace

2025-03-15 Thread Laurenz Albe
On Sat, 2025-03-15 at 13:09 +0100, Christoph Berg wrote: > Do we care about any of these? > > AIX We dropped support for it, but there are efforts to change that. Yours, Laurenz Albe

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-03-15 Thread Andres Freund
Hi, On 2025-03-15 10:43:45 -0400, Melanie Plageman wrote: > On Thu, Mar 13, 2025 at 5:41 PM Melanie Plageman > wrote: > > > > Overall, I feel pretty good about merging this once Thomas merges the > > read stream patches. > > This was committed in 944e81bf99db2b5b70b, 2b73a8cd33b745c, and > c3953

Re: Disabling vacuum truncate for autovacuum

2025-03-15 Thread Gurjeet Singh
+Andres Freund, since an old email of his is quoted here. On Fri, Mar 14, 2025 at 8:45 AM Nathan Bossart wrote: > > 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_trun

Re: Update Unicode data to Unicode 16.0.0

2025-03-15 Thread Jeremy Schneider
> On Mar 15, 2025, at 10:22 AM, Jeff Davis wrote: > > On Sat, 2025-03-15 at 12:15 -0400, Tom Lane wrote: >> On the other hand, if we keep up with the Joneses by updating the >> Unicode data, we can hopefully put those behavioral changes into >> effect *before* they'd affect any real data. > >

Re: Dubious server log messages after pg_upgrade

2025-03-15 Thread Michael Paquier
On Sat, Mar 15, 2025 at 04:15:26PM -0400, Andres Freund wrote: > Ugh, sorry, that went out unintentionally. No problem. Thanks. -- Michael signature.asc Description: PGP signature

Re: Disabling vacuum truncate for autovacuum

2025-03-15 Thread Laurenz Albe
On Sat, 2025-03-15 at 17:14 -0700, Gurjeet Singh wrote: > > One other difference in my version of the patch [0] is to call this GUC > > vacuum_truncate and have it apply to both autovacuum and VACUUM. I did > > this for the following reasons: > > +1 for the GUC name for the reasons you identified

Re: Add contrib/pg_logicalsnapinspect

2025-03-15 Thread Masahiko Sawada
On Thu, Mar 13, 2025 at 6:20 PM Euler Taveira wrote: > > On Tue, Mar 11, 2025, at 7:34 PM, Masahiko Sawada wrote: > > Pushed. > > > pgindent is saying this commit included some extra tabs. > > git diff > diff --git a/contrib/pg_logicalinspect/pg_logicalinspect.c > b/contrib/pg_logicalinspect/pg_l