Re: meson vs tarballs

2024-03-13 Thread Peter Eisentraut
On 13.03.24 07:42, Andrew Dunstan wrote: On 2024-03-13 We 02:31, Andrew Dunstan wrote: On 2024-03-13 We 02:22, Peter Eisentraut wrote: On 13.03.24 07:11, Andrew Dunstan wrote: I and several colleagues have just been trying to build from a tarball with meson. That seems pretty awful and

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

2024-03-13 Thread Peter Eisentraut
On 08.03.24 17:05, Tristan Partin wrote: Ok, I figured this out. -Wall implies -Wformat=1. We set warning_level to 1 in the Meson project() call, which implies -Wall, and set -Wall in CFLAGS for autoconf. That's the reason we don't get issues building Postgres. A user making use of the pg_confi

Re: Disable LLVM bitcode generation with pgxs.mk framework.

2024-03-12 Thread Peter Eisentraut
On 12.03.24 14:38, Xing Guo wrote: When the PostgreSQL server is configured with --with-llvm, the pgxs.mk framework will generate LLVM bitcode for extensions automatically. Sometimes, I don't want to generate bitcode for some extensions. I can turn off this feature by specifying with_llvm=0 in th

Re: meson vs tarballs

2024-03-12 Thread Peter Eisentraut
On 13.03.24 07:11, Andrew Dunstan wrote: I and several colleagues have just been trying to build from a tarball with meson. That seems pretty awful and unfriendly and I didn't see anything about it in the docs. At https://www.postgresql.org/docs/16/install-requirements.html is says: """ Alt

Re: Sequence Access Methods, round two

2024-03-12 Thread Peter Eisentraut
On 12.03.24 00:44, Michael Paquier wrote: Anyway, there is one piece of this patch set that I think has a lot of value outside of the discussion with access methods, which is to redesign pg_sequence_last_value so as it returns a (last_value, is_called) tuple rather than a (last_value). This has

Re: Make attstattarget nullable

2024-03-12 Thread Peter Eisentraut
On 06.03.24 22:34, Tomas Vondra wrote: 0001 1) I think this bit in ALTER STATISTICS docs is wrong: - new_target + SET STATISTICS { integer | DEFAULT } because it means we now have list entries for name, ..., new_name, new_schema, and then suddenly "SET STATISTICS { integer | DEF

Re: Built-in CTYPE provider

2024-03-12 Thread Peter Eisentraut
On 08.03.24 02:00, Jeff Davis wrote: And here's v22 (I didn't post v21). I committed Unicode property tables and functions, and the simple case mapping. I separated out the full case mapping changes (based on SpecialCasing.txt) into patch 0006. 0002: Basic builtin collation provider that only

Re: Reducing output size of nodeToString

2024-03-11 Thread Peter Eisentraut
-Mark-location-fields-as-type-.patch This looks sensible, but maybe making Location a global type is a bit much? Maybe something more specific like ParseLocation, or ParseLoc, to keep it under 12 characters. From dee403f637f279813f0711bbc64c365cba82c18c Mon Sep 17 00:00:00 2001 From: Peter Eisen

Re: automating RangeTblEntry node support

2024-03-11 Thread Peter Eisentraut
On 20.02.24 08:57, Peter Eisentraut wrote: On 18.02.24 00:06, Matthias van de Meent wrote: I'm not sure that the cleanup which is done when changing a RTE's rtekind is also complete enough for this purpose. Things like inline_cte_walker change the node->rtekind, which could leave

Re: SQL:2011 application time

2024-03-11 Thread Peter Eisentraut
constraint UC that specifies PRIMARY KEY. The table constraint descriptor of UC shall not include an application time period name. """ So this case is apparently explicitly ruled out. (It might be ok to make an extension here, but then we should be explicit about it.) From ebc6f065

Re: Combine headerscheck and cpluspluscheck scripts

2024-03-10 Thread Peter Eisentraut
On 07.03.24 08:30, Michael Paquier wrote: On Thu, Mar 07, 2024 at 01:37:36PM +1300, Thomas Munro wrote: +1 Looking at the patch, nice cleanup. Committed, thanks.

Re: pipe_read_line for reading arbitrary strings

2024-03-08 Thread Peter Eisentraut
On 06.03.24 10:54, Daniel Gustafsson wrote: On 6 Mar 2024, at 10:07, Peter Eisentraut wrote: On 22.11.23 13:47, Alvaro Herrera wrote: On 2023-Mar-07, Daniel Gustafsson wrote: The attached POC diff replace fgets() with pg_get_line(), which may not be an Ok way to cross the streams (it&#

Re: Call perror on popen failure

2024-03-08 Thread Peter Eisentraut
On 08.03.24 11:05, Daniel Gustafsson wrote: If popen fails in pipe_read_line we invoke perror for the error message, and pipe_read_line is in turn called by find_other_exec which is used in both frontend and backend code. This is an old codepath, and it seems like it ought to be replaced with th

Re: Support a wildcard in backtrace_functions

2024-03-08 Thread Peter Eisentraut
On 08.03.24 12:25, Jelte Fennema-Nio wrote: On Fri, 8 Mar 2024 at 10:59, Alvaro Herrera wrote: On 2024-Mar-08, Bharath Rupireddy wrote: This works only if '* 'is specified as the only one character in backtrace_functions = '*', right? If yes, what if someone sets backtrace_functions = 'foo,

Re: RangeTblEntry.inh vs. RTE_SUBQUERY

2024-03-07 Thread Peter Eisentraut
On 03.03.24 11:02, Peter Eisentraut wrote: On 29.02.24 19:14, Tom Lane wrote: Peter Eisentraut writes: In nodes/parsenodes.h, it says both   This *must* be false for RTEs other than RTE_RELATION entries. Well, that's true in the parser ... and also puts it under   Fields val

Re: Adding deprecation notices to pgcrypto documentation

2024-03-06 Thread Peter Eisentraut
On 05.03.24 11:50, Daniel Gustafsson wrote: * Should we actually document the exact list of algorithms along with detailed reasons? This list seems prone to becoming outdated. If we don't detail the list then I think that it's not worth doing, doing the research isn't entirely trivial as one

Re: pipe_read_line for reading arbitrary strings

2024-03-06 Thread Peter Eisentraut
On 22.11.23 13:47, Alvaro Herrera wrote: On 2023-Mar-07, Daniel Gustafsson wrote: The attached POC diff replace fgets() with pg_get_line(), which may not be an Ok way to cross the streams (it's clearly not a great fit), but as a POC it provided a neater interface for reading one-off lines from

Re: MERGE ... RETURNING

2024-03-06 Thread Peter Eisentraut
On 29.02.24 20:49, Jeff Davis wrote: To summarize, most of the problem has been in retrieving the action (INSERT/UPDATE/DELETE) taken or the WHEN-clause number applied to a particular matched row. The reason this is important is because the row returned is the old row for a DELETE action, and the

Re: UUID v7

2024-03-05 Thread Peter Eisentraut
On 30.01.24 14:35, Andrey M. Borodin wrote: On 30 Jan 2024, at 15:33, Junwang Zhao wrote: It's always good to add a newline at the end of a source file, though this might be nitpicky. Thanks, also fixed warning found by CFBot. I have various comments on this patch: - doc/src/sgml/func.sg

Re: pg_upgrade --copy-file-range

2024-03-05 Thread Peter Eisentraut
On 05.01.24 13:40, Jakub Wartak wrote: Random patch notes: - main meat is in v3-0002*, I hope i did not screw something seriously - in worst case: it is opt-in through switch, so the user always can stick to the classic copy - no docs so far - pg_copyfile_offload_supported() should actually be fi

Re: abi-compliance-checker

2024-03-04 Thread Peter Eisentraut
On 27.02.24 14:25, Alvaro Herrera wrote: I like this idea and I think we should integrate it with the objective of it becoming the workhorse of ABI-stability testing. However, I do not think that the subsequent patches should be part of the tree at all; certainly not the produced .xml files in y

Re: Extract numeric filed in JSONB more effectively

2024-03-04 Thread Peter Eisentraut
On 09.02.24 10:05, Andy Fan wrote: 2. Where is the current feature blocked for the past few months? It's error message compatible issue! Continue with above setup: master: select * from tb where (a->'b')::numeric > 3::numeric; ERROR: cannot cast jsonb string to type numeric select * from tb

Re: RangeTblEntry.inh vs. RTE_SUBQUERY

2024-03-03 Thread Peter Eisentraut
On 29.02.24 19:14, Tom Lane wrote: Peter Eisentraut writes: In nodes/parsenodes.h, it says both This *must* be false for RTEs other than RTE_RELATION entries. Well, that's true in the parser ... and also puts it under Fields valid in all RTEs: which are both wrong on opp

Re: pread, pwrite, etc return ssize_t not int

2024-03-01 Thread Peter Eisentraut
On 01.03.24 22:23, Thomas Munro wrote: For the overflow of the input length (size_t -> DWORD), I don't think we actually need to do anything. The size argument would be truncated, but the callers would just repeat the calls with the remaining size, so in effect they will read the data in chunks

Re: Make query cancellation keys longer

2024-03-01 Thread Peter Eisentraut
On 29.02.24 22:25, Heikki Linnakangas wrote: Currently, cancel request key is a 32-bit token, which isn't very much entropy. If you want to cancel another session's query, you can brute-force it. In most environments, an unauthorized cancellation of a query isn't very serious, but it neverthele

Re: pread, pwrite, etc return ssize_t not int

2024-03-01 Thread Peter Eisentraut
On 27.02.24 12:21, Thomas Munro wrote: Patches attached. PS Correction to my earlier statement about POSIX: the traditional K&R interfaces were indeed in the original POSIX.1 1988 but it was the 1990 edition (approximately coinciding with standard C) that adopted void, size_t, const and invented

Re: Improve readability by using designated initializers when possible

2024-03-01 Thread Peter Eisentraut
On 01.03.24 05:08, Michael Paquier wrote: On Thu, Feb 29, 2024 at 12:41:38PM +0100, Peter Eisentraut wrote: On 27.02.24 08:57, Alvaro Herrera wrote: On 2024-Feb-27, Michael Paquier wrote: These would cause compilation failures. Saying that, this is a very nice cleanup, so I've fixed

Re: RangeTblEntry jumble omissions

2024-02-29 Thread Peter Eisentraut
On 26.02.24 02:08, Michael Paquier wrote: On Fri, Feb 23, 2024 at 06:52:54PM -0500, Tom Lane wrote: Julien Rouhaud writes: On Fri, Feb 23, 2024 at 04:26:53PM +0100, Peter Eisentraut wrote: - funcordinality This was probably just forgotten. It should be included because the WITH ORDINALITY

Re: RangeTblEntry.inh vs. RTE_SUBQUERY

2024-02-29 Thread Peter Eisentraut
On 23.02.24 16:19, Tom Lane wrote: Dean Rasheed writes: On Fri, 23 Feb 2024 at 14:35, Peter Eisentraut wrote: Various code comments say that the RangeTblEntry field inh may only be set for entries of kind RTE_RELATION. Yes, it's explained a bit more clearly/accurate

Re: Improve readability by using designated initializers when possible

2024-02-29 Thread Peter Eisentraut
r example. This doesn't seem to be a problem in practice; see patch. From c3acb638301b7a00d18baaf464c29f742734629a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 29 Feb 2024 12:06:15 +0100 Subject: [PATCH] Remove ObjectClass --- src/backend/catalog/dependency.c|

Re: SQL Property Graph Queries (SQL/PGQ)

2024-02-23 Thread Peter Eisentraut
On 16.02.24 20:23, Andres Freund wrote: One aspect that I m concerned with structurally is that the transformation, from property graph queries to something postgres understands, is done via the rewrite system. I doubt that that is a good idea. For one it bars the planner from making plans that b

RangeTblEntry jumble omissions

2024-02-23 Thread Peter Eisentraut
geTblEntry.patchFrom 8176e6f91abd8809e79e1c8e9335522031da2755 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 23 Feb 2024 16:10:57 +0100 Subject: [PATCH] Add more RangeTblEntry fields to jumble --- src/backend/nodes/queryjumblefuncs.c | 4 1 file changed, 4 insertions(+) diff --git a/src/backend/nodes/queryjumblefu

RangeTblEntry.inh vs. RTE_SUBQUERY

2024-02-23 Thread Peter Eisentraut
Various code comments say that the RangeTblEntry field inh may only be set for entries of kind RTE_RELATION. For example *inh is true for relation references that should be expanded to include *inheritance children, if the rel has any. This *must* be false for *RTEs other than

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

2024-02-22 Thread Peter Eisentraut
On 22.02.24 11:00, Daniel Gustafsson wrote: On 22 Feb 2024, at 10:55, Ashutosh Bapat wrote: On Thu, Feb 22, 2024 at 3:03 PM Daniel Gustafsson wrote: Somebody looking for dump/restore tests wouldn't search src/bin/pg_upgrade, I think. Quite possibly not, but pg_upgrade is already today an i

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

2024-02-22 Thread Peter Eisentraut
On 22.02.24 02:01, Michael Paquier wrote: On Wed, Feb 21, 2024 at 12:18:45PM +0530, Ashutosh Bapat wrote: Even with 1 and 2 the test is useful to detect dump/restore anomalies. I think we should improve 3, but I don't have a good and simpler solution. I didn't find any way to compare two given c

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2024-02-20 Thread Peter Eisentraut
On 21.02.24 07:40, Michael Paquier wrote: This means that all partitioned tables would have pg_class.relam set, and that relam would never be 0: - The USING clause takes priority over default_table_access_method. - If no USING clause, default_table_access_method is the AM used Any partitions cre

Re: What about Perl autodie?

2024-02-20 Thread Peter Eisentraut
On 14.02.24 17:52, Peter Eisentraut wrote: A gentler way might be to start using some perlcritic policies like InputOutput::RequireCheckedOpen or the more general InputOutput::RequireCheckedSyscalls and add explicit error checking at the sites it points out. Here is a start for that. I

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2024-02-20 Thread Peter Eisentraut
On 19.07.23 20:13, Justin Pryzby wrote: On Thu, Jun 01, 2023 at 08:50:50AM -0400, Michael Paquier wrote: On Wed, May 31, 2023 at 06:35:34PM -0500, Justin Pryzby wrote: What do you think the comment ought to say ? It already says: src/backend/catalog/heap.c- * Make a dependency li

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-02-20 Thread Peter Eisentraut
On 20.02.24 12:39, Daniel Gustafsson wrote: A fifth option is to throw away our in-tree implementations and use the OpenSSL API's for everything, which is where this thread started. If the effort to payoff ratio is palatable to anyone then patches are for sure welcome. The problem is that, as

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-02-20 Thread Peter Eisentraut
On 20.02.24 12:27, Robert Haas wrote: I don't think the first two of these proposals help anything. AIUI, FIPS mode is supposed to be a system wide toggle that affects everything on the machine. The third one might help if you can be compliant by just choosing not to install that extension, and t

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-02-20 Thread Peter Eisentraut
On 20.02.24 11:09, Daniel Gustafsson wrote: On 20 Feb 2024, at 10:56, Koshi Shibagaki (Fujitsu) wrote: Let me confirm the discussion in threads. I think there are two topics. 1. prohibit the use of ciphers disallowed in FIPS mode at the level of block cipher (crypt-bf, etc...) in crypt() and

Re: table inheritance versus column compression and storage settings

2024-02-20 Thread Peter Eisentraut
I have reverted the patch for now (and re-opened the commitfest entry). We should continue to work on this and see if we can at least try to get the pg_dump test coverage suitable. On 19.02.24 12:34, Ashutosh Bapat wrote: On Fri, Feb 16, 2024 at 11:54 PM Tom Lane wrote: I wrote: I find it

Re: automating RangeTblEntry node support

2024-02-19 Thread Peter Eisentraut
On 18.02.24 00:06, Matthias van de Meent wrote: I'm not sure that the cleanup which is done when changing a RTE's rtekind is also complete enough for this purpose. Things like inline_cte_walker change the node->rtekind, which could leave residual junk data in fields that are currently dropped dur

Re: speed up a logical replica setup

2024-02-19 Thread Peter Eisentraut
Some review of the v21 patch: - commit message Mention pg_createsubscriber in the commit message title. That's the most important thing that someone doing git log searches in the future will be looking for. - doc/src/sgml/ref/allfiles.sgml Move the new entry to alphabetical order. - doc

Re: CI and test improvements

2024-02-19 Thread Peter Eisentraut
On 13.02.24 20:10, Justin Pryzby wrote: On Mon, Mar 13, 2023 at 07:39:52AM +0100, Peter Eisentraut wrote: On 03.02.23 15:26, Justin Pryzby wrote: 9baf41674ad pg_upgrade: tap test: exercise --link and --clone This seems like a good idea. On Wed, Mar 15, 2023 at 10:58:41AM +0100, Peter

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-02-16 Thread Peter Eisentraut
On 16.02.24 14:30, Daniel Gustafsson wrote: On 16 Feb 2024, at 13:57, Peter Eisentraut wrote: On 16.02.24 10:16, Daniel Gustafsson wrote: 2. The crypt() and gen_salt() methods built on top of them (modes of operation, kind of) are not FIPS-compliant. I wonder if it's worth trying to

Re: table inheritance versus column compression and storage settings

2024-02-16 Thread Peter Eisentraut
I have committed this. It is great to get this behavior fixed and also to get the internals more consistent. Thanks.

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-02-16 Thread Peter Eisentraut
On 16.02.24 10:16, Daniel Gustafsson wrote: 2. The crypt() and gen_salt() methods built on top of them (modes of operation, kind of) are not FIPS-compliant. I wonder if it's worth trying to make pgcrypto disallow non-FIPS compliant ciphers when the compiled against OpenSSL is running with FIPS

Re: Add trim_trailing_whitespace to editorconfig file

2024-02-16 Thread Peter Eisentraut
v3-0001-Remove-non-existing-file-from-.gitattributes.patch I have committed that one. v3-0002-Require-final-newline-in-.po-files.patch The .po files are imported from elsewhere, so I'm not sure this is going to have the desired effect. Perhaps it's worth cleaning up, but it would require mor

Re: Add trim_trailing_whitespace to editorconfig file

2024-02-15 Thread Peter Eisentraut
On 15.02.24 10:26, Jelte Fennema-Nio wrote: On Wed, 14 Feb 2024 at 23:19, Daniel Gustafsson wrote: +1 from me. But when do we want it to be false? That is, why not declare it true for all file types? Regression test .out files commonly have spaces at the end of the line. (Not to mention the

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-02-15 Thread Peter Eisentraut
On 15.02.24 13:42, Koshi Shibagaki (Fujitsu) wrote: However, crypt() and gen_salt() do not use OpenSSL as mentioned in [2]. Therefore, if we run crypt() and gen_salt() on a machine with FIPS mode enabled, they are not affected by FIPS mode. This means we can use encryption algorithms disallowed i

Re: Reducing output size of nodeToString

2024-02-15 Thread Peter Eisentraut
Thanks, this patch set is a good way to incrementally work through these changes. I have looked at v4-0001-pg_node_tree-Omit-serialization-of-fields-with-de.patch today. Here are my thoughts: I believe we had discussed offline to not omit enum fields with value 0 (WRITE_ENUM_FIELD). This i

Re: Allow passing extra options to initdb for tests

2024-02-15 Thread Peter Eisentraut
On 14.02.24 06:22, Ian Lawrence Barwick wrote: I had a longer look at this and can't find any issues with the code or documentation changes. Thanks, committed. I did wonder whether it would be worth mentioning that any initdb options set in "PG_TEST_INITDB_EXTRA_OPTS" will override those whic

Re: What about Perl autodie?

2024-02-14 Thread Peter Eisentraut
On 08.02.24 16:53, Tom Lane wrote: Daniel Gustafsson writes: On 8 Feb 2024, at 08:01, Peter Eisentraut wrote: I suppose we could start using it for completely new scripts. +1, it would be nice to eventually be able to move to it everywhere so starting now with new scripts may make the

Re: make dist using git archive

2024-02-12 Thread Peter Eisentraut
On 12.02.24 18:26, Tristan Partin wrote: On Sun Feb 11, 2024 at 5:09 PM CST, Peter Eisentraut wrote: Small update: I noticed that on Windows (at least the one that is running the CI job), I need to use git -c core.autocrlf=false, otherwise git archive does line-ending conversion for the files

Re: Built-in CTYPE provider

2024-02-12 Thread Peter Eisentraut
On 13.02.24 03:01, Jeff Davis wrote: 1. The SQL spec mentions the capitalization of "ß" as "SS" specifically. Should UCS_BASIC use the unconditional mappings in SpecialCasing.txt? I already have some code to do that (not posted yet). It is my understanding that "correct" Unicode case conversion

Re: backend *.c #include cleanup (IWYU)

2024-02-12 Thread Peter Eisentraut
On 10.02.24 21:13, Nathan Bossart wrote: (Interestingly, IWYU has been mentioned in src/tools/pginclude/README since 2012. Has anyone else played with it? Was it not mature enough back then?) I haven't played with it at all, but the topic reminds me of this thread: https://postgr.es/

Re: Support a wildcard in backtrace_functions

2024-02-12 Thread Peter Eisentraut
On 12.02.24 14:27, Jelte Fennema-Nio wrote: And honestly wanting to get backtraces for non-ERROR log entries seems quite niche to me, which to me makes it a weird default. I think one reason for this is that non-ERRORs are fairly unique in their wording, so you don't have to isolate them by fu

Re: table inheritance versus column compression and storage settings

2024-02-12 Thread Peter Eisentraut
On 08.02.24 08:20, Ashutosh Bapat wrote: On Wed, Feb 7, 2024 at 12:47 PM Ashutosh Bapat wrote: 0001 fixes compression inheritance 0002 fixes storage inheritance The first patch does not update compression_1.out which makes CI unhappy. Here's patchset fixing that. The changed behavior look

Re: clarify equalTupleDescs()

2024-02-12 Thread Peter Eisentraut
On 06.02.24 16:14, Tom Lane wrote: Peter Eisentraut writes: The first want to compare what I call row-type equality, which means they want to check specifically for equal number of attributes, and the same attribute names, types, and typmods for each attribute. Most callers actually want that

Re: clarify equalTupleDescs()

2024-02-12 Thread Peter Eisentraut
On 07.02.24 04:06, jian he wrote: /* * hashRowType * * If two tuple descriptors would be considered equal by equalRowTypes() * then their hash value will be equal according to this function. */ uint32 hashRowType(TupleDesc desc) { uint32 s; int i; s = hash_combine(0, hash_uint32(desc->

Re: SQL:2011 application time

2024-02-12 Thread Peter Eisentraut
I have done a review of the temporal foreign key patches in this patch series (0002 and 0003, v24). The patch set needs a rebase across c85977d8fef. I was able to do it manually, but it's a bit tricky, so perhaps you can post a new set to help future reviews. (Also, the last (0007) patch has so

Re: make dist using git archive

2024-02-11 Thread Peter Eisentraut
:00 2001 From: Peter Eisentraut Date: Sun, 11 Feb 2024 23:58:42 +0100 Subject: [PATCH v3 1/2] make dist uses git archive Discussion: https://www.postgresql.org/message-id/flat/40e80f77-a294-4f29-a16f-e21bc7bc75fc%40eisentraut.org --- GNUmakefile.in | 34

Re: Catalog domain not-null constraints

2024-02-11 Thread Peter Eisentraut
On 08.02.24 13:17, jian he wrote: I think I found a bug. connotnull already set to not null. every execution of `alter domain connotnull add not null value ;` would concatenate 'NOT NULL VALUE' for the "Check" column, I would have expected that. Each invocation adds a new constraint. But I s

Re: Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN

2024-02-08 Thread Peter Eisentraut
On 08.02.24 07:04, Ashutosh Bapat wrote: The patch looks ok. +seqstmt->sequence->relpersistence = cxt->rel ? cxt->rel->rd_rel->relpersistence : cxt->relation->relpersistence; + This condition looks consistent with the other places in the code around line 435, 498. Ah good, that pattern al

Re: Sequence Access Methods, round two

2024-02-08 Thread Peter Eisentraut
On 19.01.24 00:27, Michael Paquier wrote: The reason why this stuff has bumped into my desk is that we have no good solution in-core for globally-distributed transactions for active-active deployments. First, anything we have needs to be plugged into default expressions of attributes like with [

Re: pg_get_expr locking

2024-02-08 Thread Peter Eisentraut
On 07.02.24 16:26, Tom Lane wrote: What workaround should we use if there are conflicts created by concurrent regression tests? Just move the tests around a bit until the issue goes away? Why would a test be applying pg_get_expr to a table it doesn't control? I think the situation is that on

Re: Reducing connection overhead in pg_upgrade compat check phase

2024-02-08 Thread Peter Eisentraut
On 07.02.24 14:25, Daniel Gustafsson wrote: On 6 Feb 2024, at 17:47, Daniel Gustafsson wrote: On 6 Feb 2024, at 17:32, Nathan Bossart wrote: On Fri, Feb 02, 2024 at 12:18:25AM +0530, vignesh C wrote: With no update to the thread and the patch still not applying I'm marking this as returned

Re: Make documentation builds reproducible

2024-02-08 Thread Peter Eisentraut
On 23.01.24 02:06, Peter Smith wrote: This has been working forever, but seems to have broken due to commit [1] having an undeclared variable. runtime error: file stylesheet-html-common.xsl line 452 element if Variable 'autolink.index.see' has not been declared. make: *** [html-stamp] Error 10

Put genbki.pl output into src/include/catalog/ directly

2024-02-07 Thread Peter Eisentraut
So I restricted this patch to src/{backend,include}/catalog/, especially because it would be good to keep the catalog lists aligned.)From e9f3bfeeff47d96c2557836e7c964adba2d9edb5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 8 Feb 2024 08:31:21 +0100 Subject: [PATCH] Put genbki.pl output

Re: Testing autovacuum wraparound (including failsafe)

2024-02-07 Thread Peter Eisentraut
On 08.02.24 05:05, Masahiko Sawada wrote: On Thu, Feb 8, 2024 at 3:11 AM Peter Eisentraut wrote: The way src/test/modules/xid_wraparound/meson.build is written, it installs the xid_wraparound.so module into production installations. For test modules, a different installation code needs to be

Re: What about Perl autodie?

2024-02-07 Thread Peter Eisentraut
On 08.02.24 07:03, Tom Lane wrote: John Naylor writes: On Wed, Feb 7, 2024 at 11:52 PM Greg Sabino Mullane wrote: No drawbacks. I've been using it heavily for many, many years. Came out in 5.10.1, which should be available everywhere at this point (2009 was the year of release) We moved

Re: Testing autovacuum wraparound (including failsafe)

2024-02-07 Thread Peter Eisentraut
The way src/test/modules/xid_wraparound/meson.build is written, it installs the xid_wraparound.so module into production installations. For test modules, a different installation code needs to be used. See neighboring test modules such as src/test/modules/test_rbtree/meson.build for examples.

Combine headerscheck and cpluspluscheck scripts

2024-02-07 Thread Peter Eisentraut
x27;s easier to keep updated. The attached patch adds an option --cplusplus to headerscheck, with which it does the same thing as cpluspluscheck, and cpluspluscheck is removed. The top-level make targets stay the same.From 097e135bc421af98dc6298510d4cb4d8d778e3fe Mon Sep 17 00:00:00 2001 From:

Re: Change GUC hashtable to use simplehash?

2024-02-07 Thread Peter Eisentraut
On 22.01.24 03:03, John Naylor wrote: I wrote: fasthash_init(&hs, sizeof(Datum), kind); fasthash_accum(&hs, (char *) &value, sizeof(Datum)); return fasthash_final32(&hs, 0); It occurred to me that it's strange to have two places that length can be passed. That was a side effect of the

What about Perl autodie?

2024-02-07 Thread Peter Eisentraut
which seems as good or better than the stuff we produce manually.From 4ada07b13ecde8b3c0d120583202a38de062239f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 7 Feb 2024 14:59:36 +0100 Subject: [PATCH] WIP: Make some use of Perl autodie pragma --- src/backend/catalog/Catalog.pm | 11 ++

Re: Possibility to disable `ALTER SYSTEM`

2024-02-07 Thread Peter Eisentraut
, suppose we refuse ALTER SYSTEM if $PGDATA/disable_alter_system exists, or something like that. On Tue, 6 Feb 2024 at 15:10, Peter Eisentraut wrote: How about ALTER SYSTEM is disabled if the file postgresql.auto.conf.disabled exists? This is somewhat similar to making the file read-only, but doesn&#

Re: Postgres and --config-file option

2024-02-07 Thread Peter Eisentraut
On 02.02.24 22:27, David G. Johnston wrote: On Fri, Feb 2, 2024 at 2:23 PM David G. Johnston mailto:david.g.johns...@gmail.com>> wrote: On Mon, Jan 15, 2024 at 4:35 AM Aleksander Alekseev mailto:aleksan...@timescale.com>> wrote: PFA the patch. It's short but I think it mitigate

Re: Built-in CTYPE provider

2024-02-07 Thread Peter Eisentraut
Review of the v16 patch set: (Btw., I suppose you started this patch series with 0002 because some 0001 was committed earlier. But I have found this rather confusing. I think it's ok to renumber from 0001 for each new version.) * v16-0002-Add-Unicode-property-tables.patch Various comments

pg_get_expr locking

2024-02-07 Thread Peter Eisentraut
The function pg_get_expr(), which is used in various system views and information schema views, does not appear to lock the table passed as the second argument, and so appears to be liable to fail if there is a concurrent drop of the table. There is a (probable) case of this being discussed at

Re: Catalog domain not-null constraints

2024-02-07 Thread Peter Eisentraut
On 18.01.24 07:53, Peter Eisentraut wrote: On 17.01.24 13:15, vignesh C wrote: One of the test has failed in CFBot at [1] with: diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/domain.out /tmp/cirrus-ci-build/src/test/regress/results/domain.out --- /tmp/cirrus-ci-build/src/test/regress

Re: Where can I find the doxyfile?

2024-02-06 Thread Peter Eisentraut
On 02.02.24 01:19, John Morris wrote: Here is the updated patch. It should fix the meson issue when no doxygen is present. I think all the explanatory messages in doc/doxygen/meson.build are a bit much. I think it's enough to just not define the target when the required conditions (dependenc

Re: Where can I find the doxyfile?

2024-02-06 Thread Peter Eisentraut
On 05.02.24 18:29, John Morris wrote: The purpose of the filter is to bring existing Postgres comments into the doxygen output. While I haven’t done a full survey, the majority of Postgres code has comments describing functions, globals, macros and structure fields. Currently, those comments

Re: Possibility to disable `ALTER SYSTEM`

2024-02-06 Thread Peter Eisentraut
On 31.01.24 11:16, Gabriele Bartolini wrote: I very much like the idea of a file in the data directory that also controls the copy operations. Just wanted to highlight though that in our operator we have already applied the read-only postgresql.auto.conf trick to disable the system (see http

clarify equalTupleDescs()

2024-02-06 Thread Peter Eisentraut
[0]: https://www.postgresql.org/message-id/202401101316.k4s3fomwjx52@alvherre.pgsqlFrom 7212a249b56eb5ac339dcd029526e7fb380932fe Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 6 Feb 2024 13:02:41 +0100 Subject: [PATCH v0] Separate equalRowTypes() from equalTupleDescs() This introduces

Allow passing extra options to initdb for tests

2024-02-06 Thread Peter Eisentraut
o explain the new method and distinguish it from the previously documented methods. [0]: https://www.postgresql.org/docs/devel/regress-run.html#REGRESS-RUN-CUSTOM-SETTINGS From f2dad8de9af12852ac022e7b43c2996b343aeb23 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 6 Feb 2024 10:44:55

Re: meson: catalog/syscache_ids.h isn't installed

2024-02-05 Thread Peter Eisentraut
On 05.02.24 02:29, Sutou Kouhei wrote: catalog/syscache_ids.h is referred by utils/syscache.h but it's not installed with Meson. This has been fixed. (Somebody else reported it in a different thread also.)

Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN

2024-02-05 Thread Peter Eisentraut
, 16)From a3cb389a3aaaea8df9371ef389d9d61ecede3713 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 5 Feb 2024 11:22:01 +0100 Subject: [PATCH] Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN Fix for 344d62fb9a9: That commit introduced unlogged sequences and made

Re: Clean up some pg_dump tests

2024-02-05 Thread Peter Eisentraut
On 02.10.23 09:12, Peter Eisentraut wrote: 1) Remove useless entries from "unlike" lists.  Runs that are not    listed in "like" don't need to be excluded in "unlike". 2) Ensure there is always a "like" list, even if it is empty.  This    makes th

Improve pg_trigger.tgargs representation

2024-02-05 Thread Peter Eisentraut
Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 4 Feb 2024 19:13:20 +0100 Subject: [PATCH] Improve pg_trigger.tgargs representation Before, the trigger argument list was encoded into a bytea column. Replace this with a list of nodes in a pg_node_tree. This makes the internal code much s

Re: Clean up command argument assembly

2024-02-04 Thread Peter Eisentraut
On 05.07.23 07:22, Peter Eisentraut wrote: It's a bit bogus to use PQExpBuffer for these. If you run out of memory, you silently get an empty string instead. StringInfo, which exits the process on OOM, would be more appropriate. We have tons of such inappropriate uses of PQExpBuffer in al

Re: [PATCH] Add native windows on arm64 support

2024-01-31 Thread Peter Eisentraut
On 31.01.24 16:20, Andrew Dunstan wrote: - PostgreSQL will only build for the x64 architecture on 64-bit Windows. + PostgreSQL will only build for the x64 and ARM64 architecture on 64-bit Windows. Are there any other 64-bit architectures for Windows? Possibly, the original sentence was meant

Re: Reducing output size of nodeToString

2024-01-31 Thread Peter Eisentraut
On 30.01.24 12:26, Matthias van de Meent wrote: Most of the other defaults I'm doubtful about. First, we are colliding here between the goals of minimizing the storage size and making the debug output more readable. I've never really wanted to make the output "more readable". The current one is

Re: make dist using git archive

2024-01-31 Thread Peter Eisentraut
On 26.01.24 22:18, Eli Schwartz wrote: Hello, meson developer here. Hello, and thanks for popping in! 3. Meson does not support tar.bz2 archives. Simple enough to add, but I'm a bit surprised as usually people seem to want either gzip for portability or xz for efficient compression. We ma

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Peter Eisentraut
On 31.01.24 06:28, Tom Lane wrote: The idea of adding a file to the data directory appeals to me. optional_runtime_features.conf alter_system=enabled copy_from_program=enabled copy_to_program=disabled ... so, exactly what keeps an uncooperative superuser from overwriting that file? The point

Re: Should we remove -Wdeclaration-after-statement?

2024-01-30 Thread Peter Eisentraut
On 29.01.24 16:03, Jelte Fennema-Nio wrote: I feel like this is the type of change where there's not much discussion to be had. And the only way to resolve it is to use some voting to gauge community opinion. So my suggestion is for people to respond with -1, -0.5, +-0, +0.5, or +1 to indicate s

Re: meson + libpq_pipeline

2024-01-30 Thread Peter Eisentraut
On 29.01.24 18:37, Alvaro Herrera wrote: I just realized while looking at Jelte's patch for the new nonblocking query cancel stuff that the Meson build doesn't run the libpq_pipeline tests :-( Is there any way to wire the tests to make it work? I think it is running already. For example, here

Re: PG versus libxml2 2.12.x

2024-01-29 Thread Peter Eisentraut
On 27.01.24 20:04, Tom Lane wrote: Buildfarm member caiman has been failing build for a couple weeks now. The reason turns out to be that recent libxml2 has decided to throw a "const" into the signature required for custom error handlers. (API compatibility? What's that?) I don't mind adopting

Re: tablecmds.c/MergeAttributes() cleanup

2024-01-26 Thread Peter Eisentraut
On 24.01.24 07:27, Ashutosh Bapat wrote: While working on identity support and now while looking at the compression problem you referred to, I found MergeAttribute() to be hard to read. It's hard to follow high level logic in that function since the function is not modular. I took a stab at modul

Re: make dist using git archive

2024-01-25 Thread Peter Eisentraut
mented and might not have been an intentional change, but you can trace it in the meson source code, and it shows in the PostgreSQL CI. That's also why for the above bzip2 issue I have to use custom_target in place of your run_target. From 48ddd079c1530baaabf92a5650ff9a7bfa7ac3d6 Mon Sep 17 0

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