Re: may be a buffer overflow problem

2024-06-18 Thread Peter Eisentraut
On 18.06.24 04:35, Andres Freund wrote: On 2024-06-17 23:52:54 +0200, Daniel Gustafsson wrote: Since sqlca is, according to our docs, present in other database systems we should probably keep it a 5-char array for portability reasons. Adding a padding character should be fine though. How abou

Re: jsonpath: Missing regex_like && starts with Errors?

2024-06-18 Thread Peter Eisentraut
On 18.06.24 04:17, Chapman Flack wrote: On 06/17/24 19:17, David E. Wheeler wrote: [1]: https://github.com/postgres/postgres/blob/82ed67a/src/backend/utils/adt/jsonpath_exec.c#L2058-L2059 Huh, I just saw something peculiar, skimming through the code: https://github.com/postgres/postgres/blob

jsonapi type fixups

2024-06-18 Thread Peter Eisentraut
ually works to parse larger than 2 GB chunks (not tested).From 24546d9043f0bbde185dafca74f9eb7225267a68 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 18 Jun 2024 13:42:23 +0200 Subject: [PATCH 1/3] jsonapi: Use size_t Use size_t instead of int for object sizes in the jsonapi. This makes

Re: altering a column's collation leaves an invalid foreign key

2024-06-18 Thread Peter Eisentraut
On 08.06.24 06:14, jian he wrote: if FK is nondeterministic, then it looks PK more like FK. the following example, one FK row is referenced by two PK rows. DROP TABLE IF EXISTS fktable, pktable; CREATE TABLE pktable (x text COLLATE "C" PRIMARY KEY); CREATE TABLE fktable (x text COLLATE ignore_ac

Re: consider -Wmissing-variable-declarations

2024-06-18 Thread Peter Eisentraut
at in all cases. From 6f3d2c1ee18cc7e7cbc5656d21012f504ccc0c7c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 8 May 2024 13:49:37 +0200 Subject: [PATCH v2 01/10] Add -Wmissing-variable-declarations to the standard compilation flags This warning flag detects global variables not declared

CompilerWarnings task does not catch C++ warnings

2024-06-18 Thread Peter Eisentraut
reasonable use of COPT nowadays, so making that more robust seems useful. I don't think there is a need for a separate make variable for C++ here.From dbd1f09836e59fe163f72c4170d628f302bf5587 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 17 Jun 2024 10:33:19 +0200 Subject: [PA

replace strtok()

2024-06-18 Thread Peter Eisentraut
on Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 10 Jun 2024 16:08:08 +0200 Subject: [PATCH v1 1/4] Replace some strtok() with strsep() strtok() considers adjacent delimiters to be one delimiter, which is arguably the wrong behavior in some cases. Replace with strsep(), which has the

Re: State of pg_createsubscriber

2024-06-17 Thread Peter Eisentraut
On 18.06.24 05:59, Amit Kapila wrote: 1. After promotion, the pre-existing replication objects should be removed (either optionally or always), otherwise, it can lead to a new subscriber not being able to restart or getting some unwarranted data. [1][2]. 2. Retaining synced slots on new subscrib

Re: speed up a logical replica setup

2024-06-17 Thread Peter Eisentraut
On 07.06.24 11:17, Hayato Kuroda (Fujitsu) wrote: Other minor comments are included by the attached diff file. It contains changes to follow conventions and pgindent/pgperltidy. I have included some of your changes in the patches from Euler that I committed today. The 0004 patch might get rer

Re: speed up a logical replica setup

2024-06-17 Thread Peter Eisentraut
On 07.06.24 05:49, Euler Taveira wrote: Here it is a patch series to fix the issues reported in recent discussions. The patches 0001 and 0003 aim to fix the buildfarm issues. The patch 0002 removes synchronized failover slots on subscriber since it has no use. I also included an optional patch

Re: Contributing test cases to improve coverage

2024-06-13 Thread Peter Eisentraut
On 12.06.24 18:44, J F wrote: (a) The regression test suite is run by a parallel scheduler, with some test cases dependent on previous test cases. If I just add my test case as part of the parallel scheduler’s tests, it might not work, since previous test cases in the scheduler might already cr

Re: Conflict Detection and Resolution

2024-06-13 Thread Peter Eisentraut
On 23.05.24 08:36, shveta malik wrote: Conflict Resolution a) latest_timestamp_wins:The change with later commit timestamp wins. b) earliest_timestamp_wins: The change with earlier commit timestamp wins. c) apply: Always apply the remote change. d) skip:Remote change

Re: Proposal: Document ABI Compatibility

2024-06-13 Thread Peter Eisentraut
On 12.06.24 16:47, Robert Haas wrote: On Mon, Jun 3, 2024 at 3:39 PM Tom Lane wrote: Me either. There are degrees of ABI compatibility Exactly this! What I think would be useful to document is our usual practices e.g. adding new struct members at the end of structs, trying to avoid changing

Re: Changing default -march landscape

2024-06-13 Thread Peter Eisentraut
On 13.06.24 04:00, Nathan Bossart wrote: That's true, but my point is that as soon as we start avoiding function pointers more commonly, it becomes difficult to justify adding them back in order to support new instruction sets. Should we just compile in the SSE 4.2 version, or should we take a c

Re: Add support to TLS 1.3 cipher suites and curves lists

2024-06-12 Thread Peter Eisentraut
On 12.06.24 10:51, Jelte Fennema-Nio wrote: On Mon, 10 Jun 2024 at 12:31, Daniel Gustafsson wrote: Regarding the ciphersuites portion of the patch. I'm not particularly thrilled about having a GUC for TLSv1.2 ciphers and one for TLSv1.3 ciphersuites, users not all that familiar with TLS will l

Re: Proposal: Document ABI Compatibility

2024-06-12 Thread Peter Eisentraut
On 11.06.24 16:55, David E. Wheeler wrote: On Jun 10, 2024, at 15:39, Andres Freund wrote: That's 6 years ago, not sure we can really learn that much from that. And it's not like it's actually impossible, #ifdefs aren't great, but they are better than nothing. Right, it’s just that extensio

Re: Add support to TLS 1.3 cipher suites and curves lists

2024-06-07 Thread Peter Eisentraut
On 07.06.24 08:10, Erica Zhang wrote: I’m a Postgres user and I’m looking into restricting the set of allowed ciphers on Postgres and configure a concrete set of curves on our postgres instances. Out of curiosity, why is this needed in practice? Could you please help to review to see if you a

Re: meson: Specify -Wformat as a common warning flag for extensions

2024-06-07 Thread Peter Eisentraut
On 29.05.24 08:47, Sutou Kouhei wrote: In <4707d4ed-f268-43c0-b4dd-cdbc7520f...@eisentraut.org> "Re: meson: Specify -Wformat as a common warning flag for extensions" on Tue, 28 May 2024 23:31:05 -0700, Peter Eisentraut wrote: On 07.04.24 18:01, Sutou Kouhei wrote:

Re: small fix for llvm build

2024-06-06 Thread Peter Eisentraut
On 28.05.24 17:17, Peter Eisentraut wrote: I'm getting build failures when building with meson and llvm enabled, like this: [1/112] Generating src/backend/jit/llvm/llvmjit_types.bc with a custom command FAILED: src/backend/jit/llvm/llvmjit_types.bc /usr/local/bin/ccache /usr/local/C

report on not thread-safe functions

2024-06-06 Thread Peter Eisentraut
In the context of the multithreaded-server project, I looked into potentially not thread-safe functions. (See proposed next steps at the end of this message.) Here is a list of functions in POSIX that are possibly not thread-safe: https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_ch

Re: Logical Replication of sequences

2024-06-05 Thread Peter Eisentraut
On 04.06.24 12:57, Amit Kapila wrote: 2. Provide a command say Alter Subscription ... Replicate Sequences (or something like that) which users can perform before shutdown of the publisher node during upgrade. This will allow copying all the sequences from the publisher node to the subscriber nod

Re: Build with LTO / -flto on macOS

2024-06-04 Thread Peter Eisentraut
On 04.06.24 18:41, Tom Lane wrote: Relevant to this: I wonder what we think the supported macOS versions are, anyway. AFAICS, the buildfarm only covers current (Sonoma) and current-1 (Ventura) major versions, and only the latest minor versions in those OS branches. For other OS lines I think w

Re: Volatile write caches on macOS and Windows, redux

2024-06-04 Thread Peter Eisentraut
On 03.06.24 17:28, Nathan Bossart wrote: I agree, two states should be enough. It could basically just be pg_fsync(int fd) { #if macos fcntl(fd, F_FULLFSYNC); #else fsync(fd); #endif } IIUC with this approach, anyone who is using a file system that fails fcntl(F_FULLSYNC) with ENOSUP

Re: meson "experimental"?

2024-06-04 Thread Peter Eisentraut
On 04.06.24 17:24, Robert Haas wrote: On Wed, May 29, 2024 at 2:41 AM Peter Eisentraut wrote: "Alternatively, PostgreSQL can be built using Meson. This is the only option for building PostgreSQL in Windows using Visual Something[*]. For other platforms, using Meson is currently experim

Re: Build with LTO / -flto on macOS

2024-06-04 Thread Peter Eisentraut
On 03.06.24 17:07, Wolfgang Walther wrote: I don't mind addressing this in PG18, but I would hesitate with backpatching.  With macOS, it's always hard to figure out whether these kinds of options work the same way going versions back. All the versions for ld64 are in [1]. It seems this was int

Re: Proposal: Document ABI Compatibility

2024-06-04 Thread Peter Eisentraut
On 04.06.24 02:11, Laurenz Albe wrote: On Mon, 2024-06-03 at 15:38 -0400, Tom Lane wrote: Andres Freund writes: On 2024-06-03 14:43:17 -0400, David E. Wheeler wrote: * The ABI is guaranteed to change only in backward compatible ways in minor releases. If for some reason it doesn’t it’s a bug

Re: meson: Specify -Wformat as a common warning flag for extensions

2024-06-04 Thread Peter Eisentraut
On 29.05.24 08:47, Sutou Kouhei wrote: In <4707d4ed-f268-43c0-b4dd-cdbc7520f...@eisentraut.org> "Re: meson: Specify -Wformat as a common warning flag for extensions" on Tue, 28 May 2024 23:31:05 -0700, Peter Eisentraut wrote: On 07.04.24 18:01, Sutou Kouhei wrote:

Re: Build with LTO / -flto on macOS

2024-06-03 Thread Peter Eisentraut
On 03.06.24 16:22, Wolfgang Walther wrote: Building with clang and -flto on macOS currently fails with errors similar to [1]. This is because the --export-dynamic flag is called -export_dynamic [2] instead and we have not been passing this variant to the linker, so far. It's probably worth cl

Re: pgsql: Add more SQL/JSON constructor functions

2024-06-03 Thread Peter Eisentraut
On 02.06.24 21:46, Tom Lane wrote: If you don't like our current behavior, then either you have to say that RETURNING with a length-limited target type is illegal (which is problematic for the spec, since they have no such type) or that the cast behaves like an implicit cast, with errors for over

Re: Schema variables - new implementation for Postgres 15

2024-06-02 Thread Peter Eisentraut
On 25.05.24 12:50, Pavel Stehule wrote: It looks odd - It is not intuitive, it introduces new inconsistency inside Postgres, or with solutions in other databases. No other database has a similar rule, so users coming from Oracle, Db2, or MSSQL, Firebird will be confused. Users that use PL/pgSQL

Re: Switch background worker on/off in runtime.

2024-06-02 Thread Peter Eisentraut
On 31.05.24 11:28, ISHAN CHHANGANI . wrote: Is it possible to switch on/off a background worker in runtime? worker.bgw_flags =BGWORKER_SHMEM_ACCESS; worker.bgw_start_time =BgWorkerStart_PostmasterStart; I want to switch off the worker based on some flag value, etc, either from the main proces

Re: pgsql: Add more SQL/JSON constructor functions

2024-06-02 Thread Peter Eisentraut
On 29.05.24 18:44, Tom Lane wrote: Amit Langote writes: On Mon, May 27, 2024 at 7:10 PM Alvaro Herrera wrote: On 2024-May-27, Alvaro Herrera wrote: I just noticed this behavior, which looks like a bug to me: select json_serialize('{"a":1, "a":2}' returning varchar(5)); json_serialize ───

Re: Volatile write caches on macOS and Windows, redux

2024-05-29 Thread Peter Eisentraut
On 25.05.24 04:01, Jelte Fennema-Nio wrote: Is this the only reason why you're suggesting adding fsync=full, instead of simply always setting F_FULLFSYNC when fsync=true on MacOS. If so, I'm not sure we really gain anything by this tri-state. I think people either care about data loss on power lo

meson "experimental"?

2024-05-28 Thread Peter Eisentraut
In installation.sgml it says """ Alternatively, PostgreSQL can be built using Meson. This is currently experimental. """ Do we want to alter this statement for PG17, considering that this is now the only way to build for Windows using MSVC? (A joke response is that the Windows port itself

Re: meson: Specify -Wformat as a common warning flag for extensions

2024-05-28 Thread Peter Eisentraut
On 07.04.24 18:01, Sutou Kouhei wrote: +# We don't have "warning_level == 3" and "warning_level == +# 'everything'" here because we don't use these warning levels. +if warning_level == '1' + common_builtin_flags += ['-Wall'] +elif warning_level == '2' + common_builtin_flags += ['-Wall', '-Wextr

small fix for llvm build

2024-05-28 Thread Peter Eisentraut
I'm getting build failures when building with meson and llvm enabled, like this: [1/112] Generating src/backend/jit/llvm/llvmjit_types.bc with a custom command FAILED: src/backend/jit/llvm/llvmjit_types.bc /usr/local/bin/ccache /usr/local/Cellar/llvm/18.1.6/bin/clang -c -o src/backend/jit/llv

Re: Improve conditional compilation for direct I/O alignment checks

2024-05-26 Thread Peter Eisentraut
On 26.05.24 09:16, Junwang Zhao wrote: This patch refactors the alignment checks for direct I/O to preprocess phase, thereby reducing some CPU cycles. This patch replaces for example if (PG_O_DIRECT != 0 && PG_IO_ALIGN_SIZE <= BLCKSZ) Assert((uintptr_t) buffer == TYPEALIGN(PG_IO_AL

Re: Upgrade Debian CI images to Bookworm

2024-05-24 Thread Peter Eisentraut
On 13.05.24 12:57, Nazir Bilal Yavuz wrote: Bookworm versions of the Debian CI images are available now [0]. The patches to use these images are attached. 'v1-0001-Upgrade-Debian-CI-images-to-Bookworm_REL_16+.patch' patch can be applied to both upstream and REL_16 and all of the tasks finish suc

Re: Convert node test compile-time settings into run-time parameters

2024-05-24 Thread Peter Eisentraut
ssion coverage still needs to be maintained by hand, so it's more often valuable to have it checked automatically. From 80f35c90e3414dabd879e8832ce1b89c685e5de5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 24 May 2024 11:42:02 +0200 Subject: [PATCH v2] Convert node test

Re: AIX support

2024-05-22 Thread Peter Eisentraut
On 22.05.24 18:15, Sriram RK wrote: Please find the attached patch. Apart from the AIX specific changes, there is a minor change in this file wrt to XLC, below is the error for which we removed inline. Later, the build and tests passed for both XLC(16.1.0.18) and gcc(12) as well. I think w

Re: Virtual generated columns

2024-05-22 Thread Peter Eisentraut
On 29.04.24 20:54, Corey Huinker wrote:  -- generation expression must be immutable -CREATE TABLE gtest_err_4 (a int PRIMARY KEY, b double precision GENERATED ALWAYS AS (random()) STORED); +CREATE TABLE gtest_err_4 (a int PRIMARY KEY, b double precision GENERATED ALWAYS AS (r

Re: Schema variables - new implementation for Postgres 15

2024-05-22 Thread Peter Eisentraut
On 18.05.24 13:29, Alvaro Herrera wrote: I want to note that when we discussed this patch series at the dev meeting in FOSDEM, a sort-of conclusion was reached that we didn't want schema variables at all because of the fact that creating a variable would potentially change the meaning of queries

Re: Pgoutput not capturing the generated columns

2024-05-22 Thread Peter Eisentraut
On 08.05.24 09:13, Shubham Khanna wrote: The attached patch has the changes to support capturing generated column data using ‘pgoutput’ and’ test_decoding’ plugin. Now if the ‘include_generated_columns’ option is specified, the generated column information and generated column data also will be s

Re: tydedef extraction - back to the future

2024-05-22 Thread Peter Eisentraut
On 20.05.24 23:11, Andrew Dunstan wrote: Attached is an attempt to thread this needle. The core is a new perl module that imports the current buildfarm client logic. The intention is that once we have this, the buildfarm client will switch to using the module (if found) rather than its own buil

Re: in parentesis is not usual on DOCs

2024-05-22 Thread Peter Eisentraut
On 20.05.24 02:00, jian he wrote: removing parentheses means we need to rephrase this sentence? So I come up with the following rephrase: The context_item specifies the input data to query, the path_expression is a JSON path expression defining the query, json_path_name is an optional name for t

Re: Convert node test compile-time settings into run-time parameters

2024-05-21 Thread Peter Eisentraut
On 20.05.24 15:59, Tom Lane wrote: Peter Eisentraut writes: This patch converts the compile-time settings COPY_PARSE_PLAN_TREES WRITE_READ_PARSE_PLAN_TREES RAW_EXPRESSION_COVERAGE_TEST into run-time parameters debug_copy_parse_plan_trees

Re: Speed up clean meson builds by ~25%

2024-05-20 Thread Peter Eisentraut
On 19.05.24 00:09, Andres Freund wrote: On 2024-05-18 00:35:08 +0200, Peter Eisentraut wrote: I retested the patch from 2024-04-07 (I think that's the one that "fixed that"? There are multiple "v1" patches in this thread.) using gcc-14 and clang-18, with ccache

Convert node test compile-time settings into run-time parameters

2024-05-20 Thread Peter Eisentraut
PGC_SUSET? Another thought: Do we really need three separate settings? From 568c620eb97f82aa8eab850cb3ce703c5c94a912 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 20 May 2024 09:13:23 +0200 Subject: [PATCH v1] Convert node test compile-time settings into run-time parameters Thi

Re: [PATCH] Avoid mixing custom and OpenSSL BIO functions

2024-05-19 Thread Peter Eisentraut
On 19.05.24 20:07, David Benjamin wrote: On Sun, May 19, 2024 at 12:21 PM Tom Lane > wrote: Per the cfbot [1], this patch needs a rebase over the ALPN-related commits.  It still isn't likely to get human attention before the July commitfest, but you can sav

Re: Speed up clean meson builds by ~25%

2024-05-17 Thread Peter Eisentraut
On 17.05.24 23:01, Robert Haas wrote: On Fri, May 17, 2024 at 4:59 PM Tom Lane wrote: As I mentioned upthread, I'm more worried about confusing error reports than the machine time. Well, Jelte fixed that. I grant that there are people who are more affected, but still, I'd just as soon not c

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-17 Thread Peter Eisentraut
On 17.05.24 14:42, Joe Conway wrote: Namely, the week before commitfest I don't actually know if I will have the time during that month, but I will make sure my patch is in the commitfest just in case I get a few clear days to work on it. Because if it isn't there, I can't take advantage of tho

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-17 Thread Peter Eisentraut
On 17.05.24 09:32, Heikki Linnakangas wrote: Dunno about having to click a link or sparkly gold borders, but +1 on having a free-form text box for notes like that. Things like "cfbot says this has bitrotted" or "Will review this after other patch this depends on". On the mailing list, notes lik

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-17 Thread Peter Eisentraut
On 17.05.24 13:36, Daniel Gustafsson wrote: On 17 May 2024, at 13:13, Robert Haas wrote: But if we are to guess what those reasons might be, Tom has already admitted he does that for CI, and I do the same, so probably other people also do it. I also suspect that some people are essentially us

Re: GUC names in messages

2024-05-17 Thread Peter Eisentraut
On 17.05.24 05:31, Peter Smith wrote: I think we should accept your two patches v6-0001-GUC-names-docs.patch v6-0002-GUC-names-add-quotes.patch which effectively everyone was in favor of and which seem to be the most robust and sustainable solution. (The remaining three patches from the v6 set

Re: Ignore Visual Studio's Temp Files While Working with PG on Windows

2024-05-16 Thread Peter Eisentraut
On 17.05.24 08:09, Yasir wrote: I have been playing with PG on the Windows platform recently. An annoying thing I faced is that a lot of Visual Studio's temp files kept appearing in git changed files. Therefore, I am submitting this very trivial patch to ignore these temp files. Our general r

Re: Minor cleanups in the SSL tests

2024-05-16 Thread Peter Eisentraut
On 16.05.24 23:27, Daniel Gustafsson wrote: On 16 May 2024, at 11:43, Peter Eisentraut wrote: You might want to run your patch through pgperltidy. The result doesn't look bad, but a bit different than what you had crafted. Ugh, I thought I had but clearly had forgotten. Fixe

Re: Why does pgindent's README say to download typedefs.list from the buildfarm?

2024-05-16 Thread Peter Eisentraut
On 16.05.24 16:45, Tom Lane wrote: Peter Eisentraut writes: In these cases, I think for NotificationHash ResourceOwnerData WalSyncMethod we can just get rid of the typedef. I have no objection to dealing with NotificationHash as you have here. ReadBuffersFlags shouldn't be an enum a

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-16 Thread Peter Eisentraut
On 17.05.24 04:26, Robert Haas wrote: I do*emphatically* think we need a parking lot. People seem to like this idea; I'm not quite sure I follow it. If you just want the automated patch testing, you can do that on your own by setting up github/cirrus for your own account. If you keep email

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-16 Thread Peter Eisentraut
On 17.05.24 00:13, Tom Lane wrote: So a third status that encompasses the various other situations like maybe forgotten by author, disagreements between author and reviewer, process difficulties, needs some senior developer intervention, etc. could be helpful. Hmm, "forgotten by author" seems t

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-16 Thread Peter Eisentraut
On 16.05.24 23:46, Tom Lane wrote: Peter Eisentraut writes: The problem is if we have 180 patches in Needs Review, and only 20 are really actually ready to be reviewed. And a second-order problem is that if you already know that this will be the case, you give up before even looking. Right

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-16 Thread Peter Eisentraut
On 16.05.24 23:06, Joe Conway wrote: On 5/16/24 16:57, Jacob Champion wrote: On Thu, May 16, 2024 at 1:31 PM Joe Conway wrote: Maybe we should just make it a policy that *nothing* gets moved forward from commitfest-to-commitfest and therefore the author needs to care enough to register for the

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-16 Thread Peter Eisentraut
On 16.05.24 23:04, Tom Lane wrote: I think it'd be great if we could separate "I'm actively reviewing this" from "I'm interested in this". As a bonus, adding yourself to the "interested" list would be a fine proxy for the thumbs-up or star markers mentioned upthread. If those were separate colu

Re: commitfest.postgresql.org is no longer fit for purpose

2024-05-16 Thread Peter Eisentraut
On 16.05.24 22:46, Melanie Plageman wrote: I was reflecting on why a general purpose patch tracker sounded appealing to me, and I realized that, at least at this time of year, I have a few patches that really count as "waiting on author" that I know I need to do additional work on before they nee

avoid MERGE_ACTION keyword?

2024-05-16 Thread Peter Eisentraut
hich could use similar treatment. Thoughts?From 6e0132ca3f3472fb6c5f8c5b2ec7296de1f83811 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 16 May 2024 16:09:57 +0200 Subject: [PATCH] WIP: Avoid MERGE_ACTION keyword --- src/backend/parser/gram.y | 12 +- src/backend/parser/pa

Re: Adding the extension name to EData / log_line_prefix

2024-05-16 Thread Peter Eisentraut
On 15.05.24 17:50, Tom Lane wrote: We kind of already have something like this, for NLS. If you look for pg_bindtextdomain(TEXTDOMAIN) and ereport_domain(), this information already trickles into the vicinity of the error data. Maybe the same thing could just be used for this, by wiring up the

Re: GUC names in messages

2024-05-16 Thread Peter Eisentraut
On 04.01.24 07:53, Peter Smith wrote: Now that I read this again, I think this is wrong. We should decide the quoting for a category, not the actual content. Like, quote all file names; do not quote keywords. This led to the attempted patch to decide the quoting of GUC parameter names dynamical

Re: [PATCH] Add --syntax to postgres for SQL syntax checking

2024-05-16 Thread Peter Eisentraut
On 15.05.24 21:05, Robert Haas wrote: I don't think it's at all obvious that this belongs on the server side rather than the client side. I think it could be done in either place, or both. I just think we don't have the infrastructure to do it cleanly, at present. I think if you're going to do

Re: An improved README experience for PostgreSQL

2024-05-16 Thread Peter Eisentraut
On 15.05.24 21:34, Nathan Bossart wrote: On Wed, May 15, 2024 at 07:23:19AM +0200, Peter Eisentraut wrote: I think for CONTRIBUTING.md, a better link would be <https://www.postgresql.org/developer/>. WFM This patch version looks good to me.

Re: Why does pgindent's README say to download typedefs.list from the buildfarm?

2024-05-16 Thread Peter Eisentraut
On 16.05.24 01:32, Tom Lane wrote: As for the remainder, they aren't showing up because no variable or field is declared using them, which means no debug symbol table entry is made for them. This means we could just drop those typedefs and be little the worse off notationally. I experimented wi

Re: Minor cleanups in the SSL tests

2024-05-16 Thread Peter Eisentraut
On 16.05.24 09:24, Daniel Gustafsson wrote: When writing a new SSL test for another patch it struck me that the SSL tests are doing configuration management without using the test framework API's. The attached patches cleans this up, no testcases are altered as part of this. 0001 makes the test

Re: SQL:2011 application time

2024-05-16 Thread Peter Eisentraut
On 15.05.24 11:39, Peter Eisentraut wrote: Attached are the individual revert patches.  I'm supplying these here mainly so that future efforts can use those instead of the original patches, since that would have to redo all the conflict resolution and also miss various typo fixes etc.

Re: Underscore in positional parameters?

2024-05-15 Thread Peter Eisentraut
On 16.05.24 01:11, Michael Paquier wrote: On Wed, May 15, 2024 at 01:59:36PM +0200, Peter Eisentraut wrote: On 14.05.24 18:07, Erik Wienhold wrote: Patch 0002 replaces atol with pg_strtoint32_safe in the backend parser and strtoint in ECPG. This fixes overflows like: Seems like a good idea

Re: Adding the extension name to EData / log_line_prefix

2024-05-15 Thread Peter Eisentraut
On 14.05.24 01:11, Tom Lane wrote: The mechanism that Andres describes for sourcing the name seems a bit overcomplex though. Why not just allow/require each extension to specify its name as a constant string? We could force the matter by redefining PG_MODULE_MAGIC as taking an argument:

Re: cataloguing NOT NULL constraints

2024-05-15 Thread Peter Eisentraut
for constraints on relations. I think the release notes don't properly address the ones on domains. I think it's at least these two commits: -Author: Peter Eisentraut -2024-03-20 [e5da0fe3c] Catalog domain not-null constraints -Author: Peter Eisentraut -2024-04-15 [9895b35cb] Fix AL

Re: Underscore in positional parameters?

2024-05-15 Thread Peter Eisentraut
On 14.05.24 18:07, Erik Wienhold wrote: Patch 0001 changes rules param and param_junk to only accept digits 0-9. I have committed this patch to PG16 and master. I was a little bit on the fence about what the behavior should be, but I checked Perl for comparison: print 1000; # ok print 1_0

Re: doc: some fixes for environment sections in ref pages

2024-05-15 Thread Peter Eisentraut
On 13.05.24 13:02, Daniel Gustafsson wrote: On 13 May 2024, at 10:48, Peter Eisentraut wrote: Patches attached. All patches look good. I think the first one is a bug fix. Agreed. Committed, thanks.

Re: Postgres and --config-file option

2024-05-15 Thread Peter Eisentraut
On 15.05.24 04:07, Michael Paquier wrote: Not sure that these additions in --help or the docs are necessary. The rest looks OK. -"You must specify the --config-file or -D invocation " +"You must specify the --config-file (or equivalent -c) or -D invocation " How about "You must specify

Re: pgsql: Fix overread in JSON parsing errors for incomplete byte sequence

2024-05-14 Thread Peter Eisentraut
On 15.05.24 02:00, Michael Paquier wrote: On Tue, May 14, 2024 at 10:39:36AM +0200, Peter Eisentraut wrote: I saw the same thing. The problem is that there is incomplete dependency information in the makefiles (not meson) between src/common/ and what is using it. So whenever anything changes

Re: An improved README experience for PostgreSQL

2024-05-14 Thread Peter Eisentraut
On 14.05.24 19:33, Nathan Bossart wrote: On Tue, May 14, 2024 at 06:12:26PM +0200, Alvaro Herrera wrote: On 2024-May-14, Tom Lane wrote: I don't have a position on whether we want these additional files or not; but if we do, I think the best answer is to stick 'em under .github/ where they are

Re: Requiring LLVM 14+ in PostgreSQL 18

2024-05-14 Thread Peter Eisentraut
On 15.05.24 06:21, Thomas Munro wrote: And as I'm looking up how this was previously handled, I notice that this list of clang-NN versions was last updated equally sneakily as part of your patch to trim off LLVM <10 (820b5af73dc). I wonder if the original intention of that configure code was tha

Re: pgsql: Fix overread in JSON parsing errors for incomplete byte sequence

2024-05-14 Thread Peter Eisentraut
On 10.05.24 14:23, Alvaro Herrera wrote: On 2024-May-10, Alvaro Herrera wrote: Not sure what's going on here, or why it fails for me while the buildfarm is all happy. Ah, I ran 'git clean -dfx' and now it works correctly. I must have had an incomplete rebuild. I saw the same thing. The pr

Re: An improved README experience for PostgreSQL

2024-05-14 Thread Peter Eisentraut
On 13.05.24 17:26, Nathan Bossart wrote: On Sun, May 12, 2024 at 05:17:42PM +0200, Peter Eisentraut wrote: I don't know, I find these files kind of "yelling". It's fine to have a couple, but now it's getting a bit much, and there are more that could be added. I&#x

Re: An improved README experience for PostgreSQL

2024-05-14 Thread Peter Eisentraut
On 13.05.24 17:43, Alvaro Herrera wrote: On 2024-May-13, Nathan Bossart wrote: If we want to enhance the GitHub experience, we can also add these files to the organization instead: https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-commu

Re: consider -Wmissing-variable-declarations

2024-05-13 Thread Peter Eisentraut
On 10.05.24 11:53, Heikki Linnakangas wrote: On 09/05/2024 12:23, Peter Eisentraut wrote: In [0] I had noticed that we have no automated verification that global variables are declared in header files.  (For global functions, we have this through -Wmissing-prototypes.)  As I mentioned there, I

Re: Large files for relations

2024-05-13 Thread Peter Eisentraut
On 06.03.24 22:54, Thomas Munro wrote: Rebased. I had intended to try to get this into v17, but a couple of unresolved problems came up while rebasing over the new incremental backup stuff. You snooze, you lose. Hopefully we can sort these out in time for the next commitfest: * should pg_comb

Re: SQL:2011 application time

2024-05-13 Thread Peter Eisentraut
On 03.04.24 07:30, Paul Jungwirth wrote: But is it *literally* unique? Well two identical keys, e.g. (5, '[Jan24,Mar24)') and (5, '[Jan24,Mar24)'), do have overlapping ranges, so the second is excluded. Normally a temporal unique index is *more* restrictive than a standard one, since it forbids

doc: some fixes for environment sections in ref pages

2024-05-13 Thread Peter Eisentraut
.From 3f573c5935d46b20de7e7129cd0bf69abed1df6c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 13 May 2024 10:10:21 +0200 Subject: [PATCH 1/3] doc: Remove claims that initdb and pg_ctl use libpq environment variables Erroneously introduced by 571df93cff8. --- doc/src/sgml/ref/initdb.sgml

Re: Converting README documentation to Markdown

2024-05-13 Thread Peter Eisentraut
On 08.04.24 21:29, Daniel Gustafsson wrote: Over in [0] I asked whether it would be worthwhile converting all our README files to Markdown, and since it wasn't met with pitchforks I figured it would be an interesting excercise to see what it would take (my honest gut feeling was that it would be

Convert sepgsql tests to TAP

2024-05-12 Thread Peter Eisentraut
d tests in some way. From 2f8e73932b1068caf696582487de9e100fcd46be Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 13 May 2024 07:55:55 +0200 Subject: [PATCH v1] Convert sepgsql tests to TAP Add a TAP test for sepgsql. This automates the previously required manual setup before the test. The actual tests are still r

Re: elog/ereport VS misleading backtrace_function function address

2024-05-12 Thread Peter Eisentraut
On 07.05.24 09:43, Jakub Wartak wrote: NOTE: in case one will be testing this: one cannot ./configure with --enable-debug as it prevents the compiler optimizations that actually end up with the ".cold" branch optimizations that cause backtrace() to return the wrong address. Is that configuratio

Re: An improved README experience for PostgreSQL

2024-05-12 Thread Peter Eisentraut
On 17.04.24 04:36, Nathan Bossart wrote: On Wed, Feb 28, 2024 at 02:21:49PM -0600, Nathan Bossart wrote: I see many projects have files like SECURITY.md, CODE_OF_CONDUCT.md, and CONTRIBUTING.md, and I think it would be relatively easy to add content to each of those for PostgreSQL, even if they

Re: Requiring LLVM 14+ in PostgreSQL 18

2024-05-12 Thread Peter Eisentraut
On 24.04.24 01:43, Thomas Munro wrote: Rebased over ca89db5f. These patches look fine to me. The new cut-off makes sense, and it does save quite a bit of code. We do need to get the Cirrus CI Debian images updated first, as you had already written. As part of this patch, you also sneak in

Re: Logging which interface was connected to in log_line_prefix

2024-05-12 Thread Peter Eisentraut
On 01.05.24 19:04, Greg Sabino Mullane wrote: Thank you for taking the time to review this. I've attached a new rebased version, which has no significant changes. There is a comment in the patch that states: /* We do not need clean_ipv6_addr here: just report verbatim */ I am not

Re: Logging which interface was connected to in log_line_prefix

2024-05-12 Thread Peter Eisentraut
On 06.03.24 16:59, Greg Sabino Mullane wrote: Someone on -general was asking about this, as they are listening on multiple IPs and would like to know which exact one clients were hitting. I took a quick look and we already have that information, so I grabbed some stuff from inet_server_addr and

Re: [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS

2024-05-12 Thread Peter Eisentraut
On 19.04.24 11:47, Aleksander Alekseev wrote: Thanks. I see a few pieces of code that use special FOO_NUMBER enum values instead of a macro. Should we refactor these pieces accordingly? PFA another patch. I think this is a sensible improvement. But please keep the trailing commas on the last e

Re: Build the docs if there are changes in docs and don't run other tasks if the changes are only in docs

2024-05-12 Thread Peter Eisentraut
On 14.12.23 14:40, Nazir Bilal Yavuz wrote: On Fri, 6 Oct 2023 at 17:07, Tom Lane wrote: As a quick cross-check, I searched our commit log to see how many README-only commits there were so far this year. I found 11 since January. (Several were triggered by the latest round of pgindent code a

Re: Add TAP tests for backtrace functionality (was Re: Add test module for verifying backtrace functionality)

2024-05-12 Thread Peter Eisentraut
On 16.03.24 05:25, Bharath Rupireddy wrote: Postgres has a good amount of code for dealing with backtraces - two GUCs backtrace_functions and backtrace_on_internal_error, errbacktrace; all of which use core function set_backtrace from elog.c. I've not seen this code being tested at all, see code

Re: SQL:2011 application time

2024-05-10 Thread Peter Eisentraut
ed to e305f715, addressing Peter's feedback. I'm still working on integrating jian he's suggestions for the last patch, so I've omitted that one here. On 5/8/24 06:51, Peter Eisentraut wrote: About v2-0001-Fix-ON-CONFLICT-DO-NOTHING-UPDATE-for-temporal-in.patch, I think the idea

consider -Wmissing-variable-declarations

2024-05-09 Thread Peter Eisentraut
vious practice. These should be organized into appropriate header files. [0]: https://www.postgresql.org/message-id/c4ac402f-9d7b-45fa-bbc1-4a5bf0a9f...@eisentraut.orgFrom 296a1c465de6cfea333bf7bb7950f02b3ef80b12 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 8 May 2024 13:49:37

Re: SQL:2011 application time

2024-05-08 Thread Peter Eisentraut
On 30.04.24 18:39, Paul Jungwirth wrote: On 4/30/24 09:24, Robert Haas wrote: Peter, could you have a look at http://postgr.es/m/47550967-260b-4180-9791-b224859fe...@illuminatedcomputing.com and express an opinion about whether each of those proposals are (a) good or bad ideas and (b) whether th

<    1   2   3   4   5   6   7   8   9   10   >