Re: pg_waldump: add test for coverage

2023-07-05 Thread Peter Eisentraut
On 29.06.23 21:16, Tristen Raab wrote: I've reviewed your latest v3 patches on Ubuntu 23.04. Both patches apply correctly and all the tests run and pass as they should. Execution time was normal for me, I didn't notice any significant latency when compared to other tests. The only other

Re: Clean up command argument assembly

2023-07-04 Thread Peter Eisentraut
On 04.07.23 14:14, Heikki Linnakangas wrote: On 26/06/2023 12:33, Peter Eisentraut wrote: This is a small code cleanup patch. Several commands internally assemble command lines to call other commands.  This includes initdb, pg_dumpall, and pg_regress.  (Also pg_ctl, but that is different

Re: Initdb-time block size specification

2023-07-04 Thread Peter Eisentraut
On 01.07.23 00:21, Tomas Vondra wrote: Right, that's the dance we do to protect against torn pages. But Andres suggested that if you have modern storage and configure it correctly, writing with 4kB pages would be atomic. So we wouldn't need to do this FPI stuff, eliminating pretty significant

Re: Remove incidental md5() function uses from several tests

2023-07-04 Thread Peter Eisentraut
On 07.06.23 10:19, Daniel Gustafsson wrote: Unlike for the main regression tests, I didn't write a fipshash() wrapper here, because that would have been too repetitive and wouldn't really save much here. In some cases it was easier to remove one layer of indirection by changing column types

Re: Optionally using a better backtrace library?

2023-07-03 Thread Peter Eisentraut
On 02.07.23 20:31, Andres Freund wrote: A lot of platforms have "libbacktrace" available, e.g. as part of gcc. I think we should consider using it, when available, to produce more useful backtraces. I hacked it up for ereport() to debug something, and the backtraces are considerably better:

Re: Make uselocale protection more consistent

2023-07-03 Thread Peter Eisentraut
On 03.07.23 15:21, Tristan Partin wrote: I think it would be better to keep HAVE_LOCALE_T as encompassing any of the various locale_t-using functions, rather than using HAVE_USELOCALE as a proxy for them. Otherwise you create weird situations like having #ifdef HAVE_WCSTOMBS_L inside #ifdef

Re: Make uselocale protection more consistent

2023-07-03 Thread Peter Eisentraut
On 03.07.23 08:24, Thomas Munro wrote: I propose[1] that we get rid of HAVE_LOCALE_T completely and make "libc" provider support unconditional. It's standardised, and every target system has it, even Windows. But Windows doesn't have uselocale(). [1]

Re: cataloguing NOT NULL constraints

2023-07-03 Thread Peter Eisentraut
conname to the select list here as well, for consistency with nearby queries. From c481b58c3e48ff0ab4738e5cf2440d2ad6fc3e47 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 3 Jul 2023 15:44:59 +0200 Subject: [PATCH] fixup! Add pg_constraint rows for NOT NULL constraints --- doc/

Re: Consider \v to the list of whitespace characters in the parser

2023-07-03 Thread Peter Eisentraut
On 21.06.23 08:45, Michael Paquier wrote: One thing I was wondering: has the SQL specification anything specific about the way vertical tabs should be parsed? SQL has "whitespace", which includes any Unicode character with the White_Space property (which includes \v), and , which is

Re: [PATCH] Remove unnecessary unbind in LDAP search+bind mode

2023-07-03 Thread Peter Eisentraut
On 23.03.23 02:45, Anatoly Zaretsky wrote: Comments in src/backend/libpq/auth.c [1] say: (after successfully finding the final DN to check the user-supplied password against) /* Unbind and disconnect from the LDAP server */ and later /* * Need to re-initialize the LDAP connection, so that we

Re: Improve list manipulation in several places

2023-07-03 Thread Peter Eisentraut
On 09.05.23 05:13, Richard Guo wrote: On Tue, May 9, 2023 at 1:26 AM Alvaro Herrera > wrote: The problem I see is that each of these new functions has a single caller, and the only one that looks like it could have a performance advantage is

Re: patch: improve "user mapping not found" error message

2023-07-03 Thread Peter Eisentraut
On 23.06.23 09:45, Ian Lawrence Barwick wrote: if (!HeapTupleIsValid(tp)) + { + ForeignServer *server = GetForeignServer(serverid); + ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), -

Re: CI and test improvements

2023-07-03 Thread Peter Eisentraut
On 12.04.23 03:05, Justin Pryzby wrote: The patch is rebased now that meson is updated to avoid the windows python warnings (thanks Andres). To keep this moving along, I have committed [PATCH 3/8] cirrus/freebsd: define ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS

Re: Add information about command path and version of flex in meson output

2023-07-03 Thread Peter Eisentraut
On 03.07.23 09:30, Michael Paquier wrote: On Mon, Jul 03, 2023 at 08:34:39AM +0200, Peter Eisentraut wrote: Maybe this could be combined into one command? On clarity ground, I am not sure that combining both is a good idea. Perhaps the use of a different variable, like bison a few lines above

Re: pg_upgrade --copy-file-range

2023-07-03 Thread Peter Eisentraut
On 02.06.23 21:30, Thomas Munro wrote: I was just in a pg_upgrade unconference session at PGCon where the lack of $SUBJECT came up. This system call gives the kernel the option to use fast block cloning on XFS, ZFS (as of very recently), etc, and works on Linux and FreeBSD. It's probably much

Re: Cleaning up threading code

2023-07-03 Thread Peter Eisentraut
On 10.06.23 07:26, Andres Freund wrote: -### -# Threading -### - -# XXX: About to rely on thread safety in the autoconf build, so not worth -# implementing a fallback.

Re: Fix regression tests to work with REGRESS_OPTS=--no-locale

2023-07-03 Thread Peter Eisentraut
On 20.06.23 05:46, Michael Paquier wrote: On Thu, Jun 15, 2023 at 03:52:13PM +0900, Michael Paquier wrote: It took some time to notice that, which makes me wonder how relevant this stuff is these days.. Anyway, I would like to do like the others and fix it, so I am proposing the attached.

Re: Should heapam_estimate_rel_size consider fillfactor?

2023-07-03 Thread Peter Eisentraut
On 14.06.23 20:41, Corey Huinker wrote: So maybe we should make table_block_relation_estimate_size smarter to also consider the fillfactor in the "no statistics" branch, per the attached patch. I like this a lot. The reasoning is obvious, the fix is simple,it doesn't upset any

Re: Add information about command path and version of flex in meson output

2023-07-03 Thread Peter Eisentraut
On 11.04.23 07:58, Michael Paquier wrote: While doing a few things on Windows with meson, I have noticed that, while we output some information related to bison after a setup step, there is nothing about flex. I think that adding something about flex in the "Programs" section would be pretty

Re: Fix last unitialized memory warning

2023-07-03 Thread Peter Eisentraut
On 07.06.23 16:31, Tristan Partin wrote: This patch is really not necessary from a functional point of view. It is only necessary if we want to silence a compiler warning. Tested on `gcc (GCC) 13.1.1 20230511 (Red Hat 13.1.1-2)`. After silencing this warning, all I am left with (given my build

Re: Make uselocale protection more consistent

2023-07-03 Thread Peter Eisentraut
On 27.06.23 17:02, Tristan Partin wrote: This is a patch which implements an issue discussed in bug #17946[0]. It doesn't fix the overarching issue of the bug, but merely a consistency issue which was found while analyzing code by Heikki. I had originally submitted the patch within that thread,

Re: several attstattarget-related improvements

2023-07-02 Thread Peter Eisentraut
On 28.06.23 23:30, Tomas Vondra wrote: On 6/28/23 16:52, Peter Eisentraut wrote: Here are a few patches related to attstattarget: - 0001: Change type of pg_statistic_ext.stxstattarget, to match attstattarget.  Maybe this should go into PG16, for consistency? - 0002: Add macro for maximum

Re: Meson build updates

2023-06-29 Thread Peter Eisentraut
On 13.06.23 22:47, Tristan Partin wrote: Forgot that I had gotten a review from a Meson maintainer. The last two patches in this set are new. One is just a simple spelling correction. I have committed patches 0001-0006, 0008, 0010, 0013, 0014, 0016, which are all pretty much cosmetic. The

Re: Assistance Needed: Issue with pg_upgrade and --link option

2023-06-28 Thread Peter Eisentraut
On 28.06.23 12:46, Laurenz Albe wrote: On Wed, 2023-06-28 at 15:40 +0530, Pradeep Kumar wrote: I was under the impression that the --link option would create hard links between the old and new cluster's data files, but it appears that the entire old cluster data was copied to the new cluster,

tablecmds.c/MergeAttributes() cleanup

2023-06-28 Thread Peter Eisentraut
. There shouldn't be any change in behavior.From 60a671aeb03293bdec65fd86f2a393c3aced6eb9 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 27 Jun 2023 17:10:25 +0200 Subject: [PATCH 01/17] Remove obsolete comment about OID support --- src/backend/catalog/heap.c | 6 +++--- 1 file changed, 3

several attstattarget-related improvements

2023-06-28 Thread Peter Eisentraut
out of VacAttrStats. This simplifies some code, especially for extended statistics, which had to have weird workarounds.From f01d4c9aba44cc5b9028200b21a6d1df9770c5a2 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 27 Jun 2023 16:38:00 +0200 Subject: [PATCH 1/3] Change type

Re: Assistance Needed: Issue with pg_upgrade and --link option

2023-06-28 Thread Peter Eisentraut
On 28.06.23 08:24, Laurenz Albe wrote: On Wed, 2023-06-28 at 11:49 +0530, Pradeep Kumar wrote: I was under the impression that the --link option would create hard links between the old and new cluster's data files, but it appears that the entire old cluster data was copied to the new cluster,

Re: [PATCH] Honor PG_TEST_NOCLEAN for tempdirs

2023-06-28 Thread Peter Eisentraut
On 27.06.23 17:54, Dagfinn Ilmari Mannsåker wrote: However, the docs (https://www.postgresql.org/docs/16/regress-tap.html#REGRESS-TAP-VARS) say "If the environment variable PG_TEST_NOCLEAN is set", not "is set to a true value", and the existing test in PostgreSQL::Test::Cluster's END block is:

Re: Detecting use-after-free bugs using gcc's malloc() attribute

2023-06-28 Thread Peter Eisentraut
On 26.06.23 21:54, Andres Freund wrote: For something like pg_list.h the malloc(free) attribute is a bit awkward to use, because one a) needs to list ~30 functions that can free a list and b) the referenced functions need to be declared. Hmm. Saying list_concat() "deallocates" a list is

Re: Changing types of block and chunk sizes in memory contexts

2023-06-28 Thread Peter Eisentraut
In memory contexts, block and chunk sizes are likely to be limited by some upper bounds. Some examples of those bounds can be MEMORYCHUNK_MAX_BLOCKOFFSET and MEMORYCHUNK_MAX_VALUE. Both values are only 1 less than 1GB. This makes memory contexts to have blocks/chunks with sizes less than 1GB.

Re: pg_waldump: add test for coverage

2023-06-27 Thread Peter Eisentraut
On 14.06.23 09:16, Peter Eisentraut wrote: On 06.09.22 07:57, Peter Eisentraut wrote: I wrote a test for coverage. Unfortunately, it seems to take quite a while to run the test. I want to improve these execution times, but I don't know exactly what to do. Therefore, I want to hear feedback

Clean up command argument assembly

2023-06-26 Thread Peter Eisentraut
dbd9d7b7ff2c069a131c9efa8bff2597c0d9e1c8 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 26 Jun 2023 11:30:24 +0200 Subject: [PATCH] Clean up command argument assembly Several commands internally assemble command lines to call other commands. This includes initdb, pg_dumpall, and pg_regress. (Also pg_ctl

Re: [PATCH] pg_regress.c: Fix "make check" on Mac OS X: Pass DYLD_LIBRARY_PATH

2023-06-23 Thread Peter Eisentraut
On 22.06.23 21:08, David Zhang wrote: Currently, there is a description suggesting a workaround by running a 'make install' command first, but I find it to be somewhat inaccurate. It would be better to update the existing description to provide more precise instructions on how to overcome this

Re: Add GUC to tune glibc's malloc implementation.

2023-06-23 Thread Peter Eisentraut
On 22.06.23 15:35, Ronan Dunklau wrote: The thing is, by default, those parameters are adjusted dynamically by the glibc itself. It starts with quite small thresholds, and raises them when the program frees some memory, up to a certain limit. This patch proposes a new GUC allowing the user to

Re: Remove deprecation warnings when compiling PG ~13 with OpenSSL 3.0~

2023-06-23 Thread Peter Eisentraut
On 23.06.23 00:22, Michael Paquier wrote: Also, note that the documentation claims that the minimum version of OpenSSL supported is 0.9.8, which is something that commit 9b7cd59 has done, impacting Postgres 10~. So your argument looks incorrect to me? Considering that, yes.

Re: Remove deprecation warnings when compiling PG ~13 with OpenSSL 3.0~

2023-06-22 Thread Peter Eisentraut
On 22.06.23 01:53, Michael Paquier wrote: Looking at the relevant thread from 2020, this was still at the point where we did not consider supporting 3.0 for all the stable branches because 3.0 was in alpha:

Re: pgindent vs. pgperltidy command-line arguments

2023-06-21 Thread Peter Eisentraut
On 21.06.23 13:35, Andrew Dunstan wrote: If not, part of my patch would still be useful.  Maybe I should commit my posted patch for PG16, to keep consistency with pgindent, and then your work would presumably be considered for PG17. That sounds like a good plan. done

Re: pgindent vs. pgperltidy command-line arguments

2023-06-21 Thread Peter Eisentraut
On 20.06.23 17:38, Andrew Dunstan wrote: +1, although I wonder if we shouldn't follow pgindent's new lead and require some argument(s). That makes sense to me.  Here is a small update with this behavior change and associated documentation update. I'm intending to add some of the new

Re: Remove deprecation warnings when compiling PG ~13 with OpenSSL 3.0~

2023-06-21 Thread Peter Eisentraut
On 21.06.23 09:43, Michael Paquier wrote: On Wed, Jun 21, 2023 at 09:16:38AM +0200, Daniel Gustafsson wrote: Agreed, I'd be more inclined to go with OPENSSL_API_COMPAT. If we still get warnings with that set then I feel those warrant special consideration rather than a blanket suppression.

Re: Order changes in PG16 since ICU introduction

2023-06-16 Thread Peter Eisentraut
On 14.06.23 23:24, Jeff Davis wrote: On Mon, 2023-06-12 at 23:04 +0200, Peter Eisentraut wrote: Patch 0003: Makes LOCALE apply to all providers. The overall feel after this patch is that "locale" now means the collation locale, and LC_COLLATE/LC_CTYPE are for the server environment.

Re: [17] collation provider "builtin"

2023-06-16 Thread Peter Eisentraut
On 15.06.23 00:55, Jeff Davis wrote: The locale "C" (and equivalently, "POSIX") is not really a libc locale; it's implemented internally with memcmp for collation and pg_ascii_tolower, etc., for ctype. The attached patch implements a new collation provider, "builtin", which only supports "C"

Re: [DOC] Update ALTER SUBSCRIPTION documentation v3

2023-06-16 Thread Peter Eisentraut
On 15.06.23 04:49, Amit Kapila wrote: I wanted to backpatch the following change which provides somewhat accurate information about what a user needs to do when it faces an error. To proceed in - this situation, disassociate the subscription from the replication slot by - executing ALTER

Re: [DOC] Update ALTER SUBSCRIPTION documentation v3

2023-06-14 Thread Peter Eisentraut
On 14.06.23 05:09, Amit Kapila wrote: The latest version looks good to me as well. I think we should backpatch this change as this is a user-facing message change in docs and code. What do you guys think? Isn't that a reason *not* to backpatch it?

Re: pgindent vs. pgperltidy command-line arguments

2023-06-14 Thread Peter Eisentraut
On 25.05.23 15:20, Tom Lane wrote: Peter Eisentraut writes: Until PG15, calling pgindent without arguments would process the whole tree. Now you get No files to process at ./src/tools/pgindent/pgindent line 372. Is that intentional? It was intentional, cf b16259b3c and the linked discussion

Re: pg_waldump: add test for coverage

2023-06-14 Thread Peter Eisentraut
On 06.09.22 07:57, Peter Eisentraut wrote: I wrote a test for coverage. Unfortunately, it seems to take quite a while to run the test. I want to improve these execution times, but I don't know exactly what to do. Therefore, I want to hear feedback from many people. I think having some more

Re: Improving FTS for Greek

2023-06-13 Thread Peter Eisentraut
On 07.06.23 00:30, Florents Tselai wrote: On 7 Jun 2023, at 12:13 AM, Peter Eisentraut wrote: On 03.06.23 19:47, Florents Tselai wrote: There’s another previous relevant patch [0] but was never merged. I’ve included these stop words and added some more (info in README.md). For my personal

Re: Meson build updates

2023-06-12 Thread Peter Eisentraut
On 12.06.23 20:48, Tristan Partin wrote: Attached you will find a v3 with the offending commits removed. I did leave the overrides in since you didn't mention it in your last email. Patches 1-14 look ok to me. (But I didn't test anything, so some caveats about whether the non-cosmetic

Re: Shouldn't construct_array_builtin and deconstruct_array_builtin agree on types?

2023-06-12 Thread Peter Eisentraut
On 12.06.23 22:38, Tomas Vondra wrote: I noticed that these two function, introduced in d746021de18b, disagree on what types they support. I ran into this for INT4OID. Sure, I can just lookup the stuff and use the regualr deconstruct_array, but the asymmetry seems a bit strange. Is that

Re: Order changes in PG16 since ICU introduction

2023-06-12 Thread Peter Eisentraut
locale, they can specify those directly c. I don't see any plausible case where it helps a user to keep provider=icu when locale=C. If the user specifies that, that's up to them to deal with the outcomes. Just changing it to something different seems wrong. 4. Joe Conway and Peter Eis

Re: Documentation for building with meson

2023-06-12 Thread Peter Eisentraut
On 10.06.23 06:00, Andres Freund wrote: From c5e637a54c2b83e5bd8c4155784d97e82937eb51 Mon Sep 17 00:00:00 2001 From: Samay Sharma Date: Mon, 6 Feb 2023 16:09:42 -0800 Subject: [PATCH v9 2/5] Add data layout options sub-section in installation docs This commit separates out blocksize, segsize

Remove distprep

2023-06-09 Thread Peter Eisentraut
veloper_Unconference#Build_SystemFrom b187ce08fe140225f9ff24bf3ae4d2e97f57221d Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 9 Jun 2023 10:53:51 +0200 Subject: [PATCH v1] Remove distprep A PostgreSQL release tarball contains a number of prebuilt files, in particular files produced

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Peter Eisentraut
On 05.06.23 19:54, Jeff Davis wrote: New patch series attached. Could you clarify what here is intended for 16 and what is for later? This patch set keeps expanding and changing in each iteration. There is a PG16 open item linked to this thread * The rules for choosing default ICU locale

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Peter Eisentraut
On 05.06.23 19:54, Jeff Davis wrote: New patch series attached. I plan to commit 0001 and 0002 soon, unless there are objections. 0001 causes the "C" and "POSIX" locales to be treated with memcmp/pg_ascii semantics in ICU, just like in libc. We also considered a new "none" provider, but it's

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Peter Eisentraut
On 07.06.23 23:30, Andres Freund wrote: Yea, we definitely need the supervisor function in a separate process. Presumably that means we need to split off some of the postmaster responsibilities - e.g. I don't think it'd make sense to handle connection establishment in the supervisor process. I

Re: v16 fails to build w/ Visual Studio 2015

2023-06-07 Thread Peter Eisentraut
On 07.06.23 23:16, Tom Lane wrote: Noah Misch writes: Visual Studio 2015 version "14.0.25431.01 Update 3" has an apparent compiler bug that causes the build to fail with "readfuncs.switch.c(522): fatal error C1026: parser stack overflow, program too complex (compiling source file

Re: v16 fails to build w/ Visual Studio 2015

2023-06-07 Thread Peter Eisentraut
On 07.06.23 23:21, Andres Freund wrote: On 2023-06-07 11:54:58 -0700, Noah Misch wrote: Visual Studio 2015 version "14.0.25431.01 Update 3" has an apparent compiler bug that causes the build to fail with "readfuncs.switch.c(522): fatal error C1026: parser stack overflow, program too complex

Re: pg_collation.collversion for C.UTF-8

2023-06-07 Thread Peter Eisentraut
On 06.06.23 21:23, Jeff Davis wrote: What about ICU? How should provider=icu locale=C.UTF-8 behave? We could: It should be an error. a. Just pass it to the provider and see what happens (older versions of ICU would interpret it as en-US-u-va-posix; newer versions would give the root locale).

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Peter Eisentraut
On 22.05.23 19:35, Jeff Davis wrote: On Thu, 2023-05-11 at 13:07 +0200, Peter Eisentraut wrote: Here is my proposed patch for this. The commit message makes it sound like lc_collate/ctype are completely obsolete, and I don't think that's quite right: they still represent the server

Re: Improve join_search_one_level readibilty (one line change)

2023-06-07 Thread Peter Eisentraut
On 04.06.23 08:02, Julien Rouhaud wrote: Additionally, if anyone has any tips on ensuring that Gmail recognizes my attached patches as the "text/x-patch" MIME type when sending them from the Chrome client, I would be grateful for the advice. I don't see any problem with the attachment. You can

Remove incidental md5() function uses from several tests

2023-06-07 Thread Peter Eisentraut
text to bytea.From 4b967dd39e73f33faa1be3a5b577f77da169e74d Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 7 Jun 2023 08:24:03 +0200 Subject: [PATCH 1/3] Remove incidental md5() function uses from several tests This removes md5() function calls from these test suites: - bloom

Re: [PATCH] pg_regress.c: Fix "make check" on Mac OS X: Pass DYLD_LIBRARY_PATH

2023-06-06 Thread Peter Eisentraut
On 06.06.23 16:24, Evan Jones wrote: On Mon, Jun 5, 2023 at 10:33 PM Tom Lane > wrote: > Note that this is a known issue Yeah.  We have attempted to work around this before, but failed to find a solution without more downsides than upsides.  I will be

Re: Improving FTS for Greek

2023-06-06 Thread Peter Eisentraut
On 03.06.23 19:47, Florents Tselai wrote: There’s another previous relevant patch [0] but was never merged. I’ve included these stop words and added some more (info in README.md). For my personal projects looks like it yields much better results. I’d like some feedback on the extension ;

Re: Simplify pg_collation.collversion for Windows libc

2023-06-06 Thread Peter Eisentraut
On 06.06.23 03:21, Thomas Munro wrote: On Mon, Jun 5, 2023 at 12:56 PM Daniel Verite wrote: postgres=# select collversion,count(*) from pg_collation group by collversion; collversion | count ---+--- | 5 1539.5,1539.5 | 1457 (2 rows) According to [1]

Re: generate syscache info automatically

2023-05-31 Thread Peter Eisentraut
On 31.05.23 13:02, Dagfinn Ilmari Mannsåker wrote: For other patterns without the optional bits in the keyword, it becomes even simpler, e.g. if (/^DECLARE_TOAST\(\s* (?\w+),\s* (?\d+),\s* (?\d+)\s*

Re: Why does pg_bsd_indent need to be installed?

2023-05-31 Thread Peter Eisentraut
On 25.05.23 13:05, Tom Lane wrote: Well, if you know where the build directory is, sure. But any way you slice it there is an extra bit of knowledge required. Since pg_bsd_indent changes so seldom, keeping it in your PATH is at least as easy as any other solution, IMO. The reason I bumped

Re: testing dist tarballs

2023-05-31 Thread Peter Eisentraut
On 27.05.23 14:47, Andres Freund wrote: Separately, it's somewhat confusing that we include errcodes.h etc in src/backend/utils, rather than its final location, in src/include/utils. It works, even without perl, because copying the file doesn't require perl, it's just generating it... The

Re: Large files for relations

2023-05-30 Thread Peter Eisentraut
On 28.05.23 02:48, Thomas Munro wrote: Another potential option name would be --segsize, if we think we're going to use this for temp files too eventually. Maybe it's not so beautiful to have that global variable rel_segment_size (which replaces REL_SEGSIZE everywhere). Another idea would be

Re: abi-compliance-checker

2023-05-29 Thread Peter Eisentraut
On 27.05.23 02:52, Peter Geoghegan wrote: Attached is a html report that was generated by a tool called abi-compliance-checker/abi-dumper [1][2] (by using "abi-compliance-checker -l libTest ... ") . I have been using the libabigail library/set of tools (abidiff, abidw) for this. I was not

Re: testing dist tarballs

2023-05-26 Thread Peter Eisentraut
On 24.05.23 23:24, Andres Freund wrote: First thing I noticed that 'make dist' doesn't work in a vpath, failing in a somewhat obscure way (likely because in a vpath build the the copy from the source dir doesn't include GNUMakefile). Do we expect it to work? I don't think so. Separately,

pgindent vs. pgperltidy command-line arguments

2023-05-25 Thread Peter Eisentraut
to process individual files or directories, like pgindent can. Attached is a patch for this. (It seems that it works ok to pass regular files (not directories) to "find", but I'm not sure if it's portable.)From ef9d9cc052d77e1509ce18dc004ac0ab96903a13 Mon Sep 17 00:00:00 2001 From: Peter

Why does pg_bsd_indent need to be installed?

2023-05-25 Thread Peter Eisentraut
Why does pgindent require that pg_bsd_indent be installed in the path? Couldn't pgindent call the pg_bsd_indent built inside the tree? That would make the whole process much smoother.

Re: Large files for relations

2023-05-24 Thread Peter Eisentraut
On 24.05.23 02:34, Thomas Munro wrote: Thanks all for the feedback. It was a nice idea and it *almost* works, but it seems like we just can't drop segmented mode. And the automatic transition schemes I showed don't make much sense without that goal. What I'm hearing is that something simple

Re: Order changes in PG16 since ICU introduction

2023-05-22 Thread Peter Eisentraut
On 18.05.23 00:59, Jeff Davis wrote: On Tue, 2023-05-16 at 20:23 -0700, Jeff Davis wrote: Other than that, and I took your suggestions almost verbatim. Patch attached. Thank you! Attached new patch with a typo fix and a few other edits. I plan to commit soon. Some small follow-up on this

Re: Order changes in PG16 since ICU introduction

2023-05-22 Thread Peter Eisentraut
On 18.05.23 19:55, Jeff Davis wrote: On Wed, 2023-05-17 at 19:59 -0400, Jonathan S. Katz wrote: I did a quicker read through this time. LGTM overall. I like what you did with the explanations around sensitivity (now it makes sense). Committed, thank you. There are a few things I don't

Re: createuser --memeber and PG 16

2023-05-22 Thread Peter Eisentraut
On 21.05.23 19:07, Nathan Bossart wrote: How do folks feel about keeping --role undocumented? Should we give it a mention in the docs for --member-of? We made a point in this release to document deprecated options consistently. See commit 2f80c95740.

Re: createuser --memeber and PG 16

2023-05-21 Thread Peter Eisentraut
On 15.05.23 22:11, Nathan Bossart wrote: On Mon, May 15, 2023 at 04:27:04PM +0900, Michael Paquier wrote: On Fri, May 12, 2023 at 04:35:34PM +0200, Peter Eisentraut wrote: it's not intuitive whether foo becomes a member of bar or bar becomes a member of foo. Maybe something more verbose like

Re: smgrzeroextend clarification

2023-05-19 Thread Peter Eisentraut
2001 From: Peter Eisentraut Date: Fri, 19 May 2023 16:49:03 +0200 Subject: [PATCH v2] WIP: Improve smgr source code comments Discussion: https://www.postgresql.org/message-id/flat/22fed8ba-01c3-2008-a256-4ea912d68fab%40enterprisedb.com --- src/backend/storage/smgr/md.c | 17

Re: smgrzeroextend clarification

2023-05-16 Thread Peter Eisentraut
rom smgrextend. From fadd72afcf78a55a2cfd32217b317f17a9147962 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 16 May 2023 16:10:48 +0200 Subject: [PATCH] WIP: Improve smgr source code comments --- src/backend/storage/smgr/md.c | 501 src/backend/stora

Re: Order changes in PG16 since ICU introduction

2023-05-15 Thread Peter Eisentraut
some inconsistency in which locale names are accepted in different ICU versions, it seems best not to be too strict. Peter Eisentraut suggested that it be set to ERROR originally, but a WARNING should be sufficient to see problems without introducing risks migrating to version 16. I'm not sure why

Re: createuser --memeber and PG 16

2023-05-12 Thread Peter Eisentraut
On 11.05.23 16:07, Robert Haas wrote: On Wed, May 10, 2023 at 1:33 PM Bruce Momjian wrote: This seems like it will be forever confusing to people. I frankly don't know why --role matching CREATE ROLE ... ROLE IN was not already confusing in pre-PG 16. Any new ideas for improvement? Yeah,

Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE

2023-05-12 Thread Peter Eisentraut
On 10.05.23 20:04, Andres Freund wrote: This commit adds a test is(scalar @lp_off, $ROWCOUNT, "acquired row offsets"); *before* that skip_all call. This appears to be invalid. If the skip_all happens, you get a complaint like t/004_verify_heapam.pl (Wstat: 0 Tests: 1 Failed: 0) Parse

Re: Add standard collation UNICODE

2023-05-12 Thread Peter Eisentraut
On 08.05.23 17:48, Peter Eisentraut wrote: On 27.04.23 13:44, Daniel Verite wrote: This collation has an empty pg_collation.collversion column, instead of being set to the same value as "und-x-icu" to track its version. The original patch implements this as an INSERT in whic

Re: logical decoding and replication of sequences, take 2

2023-05-11 Thread Peter Eisentraut
On 02.04.23 19:46, Tomas Vondra wrote: OK, I took a stab at this, see the attached 0007 patch which bumps the protocol version, and allows the subscriber to specify "sequences" when starting the replication, similar to what we do for the two-phase stuff. The patch essentially adds 'sequences'

Re: Order changes in PG16 since ICU introduction

2023-05-11 Thread Peter Eisentraut
On 09.05.23 17:09, Jeff Davis wrote: It's awkward for a user to read pg_database.datlocprovider, then depending on that, either look in datcollate or daticulocale. (It's awkward in the code, too.) Maybe some built-in function that returns a tuple of the default provider, the locale, and the

Re: Order changes in PG16 since ICU introduction

2023-05-11 Thread Peter Eisentraut
On 09.05.23 10:25, Alvaro Herrera wrote: On 2023-Apr-24, Peter Eisentraut wrote: The GUC settings lc_collate and lc_ctype are from a time when those locale settings were cluster-global. When we made those locale settings per-database (PG 8.4), we kept them as read-only. As of PG 15, you can

Re: smgrzeroextend clarification

2023-05-11 Thread Peter Eisentraut
On 10.05.23 20:10, Andres Freund wrote: Moreover, the text "except the relation can be extended by multiple blocks at once and the added blocks will be filled with zeroes" doesn't make much sense as a differentiation, because smgrextend() does that as well. Hm? smgrextend() writes a single

Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE

2023-05-10 Thread Peter Eisentraut
On 12.03.23 00:41, Andres Freund wrote: Hi, On 2023-03-11 15:34:55 -0800, Mark Dilger wrote: On Mar 11, 2023, at 3:22 PM, Andres Freund wrote: Something like the attached. I like that your patch doesn't make the test longer. I assume you've already run the tests and that it works. I

smgrzeroextend clarification

2023-05-10 Thread Peter Eisentraut
I was looking at the new smgrzeroextend() function in the smgr API. The documentation isn't very extensive: /* * smgrzeroextend() -- Add new zeroed out blocks to a file. * * Similar to smgrextend(), except the relation can be extended by * multiple blocks at once and the added

Re: psql \watch 2nd argument: iteration count

2023-05-09 Thread Peter Eisentraut
On 13.03.23 02:17, Michael Paquier wrote: On Sun, Mar 12, 2023 at 01:05:39PM -0700, Andrey Borodin wrote: In the review above Kyotaro-san suggested that message should contain information on what it expects... So, maybe then pg_log_error("\\watch interval must be non-negative number, but

Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL

2023-05-08 Thread Peter Eisentraut
On 08.05.23 04:38, 盏一 wrote: > It seems extremely specific to one particular C++ implementation To perform a force unwind during longjmp, the _Unwind_ForcedUnwind function is used. This function is defined in the [Itanium C++ ABI

Re: Add standard collation UNICODE

2023-05-08 Thread Peter Eisentraut
onverted back into an INSERT or better left in this file and collversion being updated afterwards? How about we do it with an UPDATE command. We already do this for pg_database in a similar way. See attached patch. From 91f2aff04f9bf137e4ac6e7df624dde770503bfd Mon Sep 17 00:00:00 2001 From: Peter Eisen

Re: Improve list manipulation in several places

2023-05-08 Thread Peter Eisentraut
On 23.04.23 08:42, Richard Guo wrote: Thanks for the suggestion.  I've split the patch into two as attached. 0001 is just a minor simplification by replacing lfirst(list_head(list)) with linitial(list).  0002 introduces new functions to reduce the movement of list elements in several places so

Re: SQL:2011 application time

2023-05-08 Thread Peter Eisentraut
:00 2001 From: Peter Eisentraut Date: Mon, 8 May 2023 08:45:32 +0200 Subject: [PATCH 1/3] fixup! Add PERIODs --- doc/src/sgml/ref/alter_table.sgml| 2 +- src/test/modules/test_ddl_deparse/test_ddl_deparse.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff

Re: ssl tests aren't concurrency safe due to get_free_port()

2023-05-04 Thread Peter Eisentraut
On 05.05.23 00:33, Andrew Dunstan wrote: On 2023-05-04 Th 02:40, Peter Eisentraut wrote: On 25.04.23 12:27, Peter Eisentraut wrote: On 20.11.22 16:10, Andrew Dunstan wrote: On 2022-11-19 Sa 15:16, Andres Freund wrote: Hi, On 2022-11-19 10:56:33 -0500, Andrew Dunstan wrote: Perhaps we

Re: ssl tests aren't concurrency safe due to get_free_port()

2023-05-04 Thread Peter Eisentraut
On 25.04.23 12:27, Peter Eisentraut wrote: On 20.11.22 16:10, Andrew Dunstan wrote: On 2022-11-19 Sa 15:16, Andres Freund wrote: Hi, On 2022-11-19 10:56:33 -0500, Andrew Dunstan wrote: Perhaps we should just export a directory in configure instead of this guessing game? I think the obvious

Re: min/max aggregation for jsonb

2023-05-02 Thread Peter Eisentraut
On 03.03.23 11:41, David Rowley wrote: On Fri, 3 Mar 2023 at 23:17, Daneel Yaitskov wrote: I wanted to use min/max aggregation functions for jsonb type and noticed there is no functions for this type, meanwhile string/array types are supported. It's not really clear to me how you'd want

Re: ssl tests aren't concurrency safe due to get_free_port()

2023-05-01 Thread Peter Eisentraut
On 25.04.23 12:27, Peter Eisentraut wrote: These patches have affected pgxs-using extensions that have their own TAP tests. The portlock directory is created at     my $build_dir = $ENV{top_builddir}   || $PostgreSQL::Test::Utils::tmp_check ;     $portdir ||= "$build_dir/por

Re: run pgindent on a regular basis / scripted manner

2023-04-26 Thread Peter Eisentraut
On 24.04.23 16:14, Tom Lane wrote: Peter Eisentraut writes: Does anyone find perltidy useful? To me, it functions more like a JavaScript compiler in that once you process the source code, it is no longer useful for manual editing. If we are going to have the buildfarm check indentation

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-04-26 Thread Peter Eisentraut
On 24.04.23 14:03, Hayato Kuroda (Fujitsu) wrote: so at least there's a good chance that they will still be at shutdown, and will therefore send all the data to the subscribers? Having a regression tests for that scenario would also be a good idea. Having an uncommitted write transaction should

Re: ssl tests aren't concurrency safe due to get_free_port()

2023-04-25 Thread Peter Eisentraut
On 20.11.22 16:10, Andrew Dunstan wrote: On 2022-11-19 Sa 15:16, Andres Freund wrote: Hi, On 2022-11-19 10:56:33 -0500, Andrew Dunstan wrote: Perhaps we should just export a directory in configure instead of this guessing game? I think the obvious candidate would be to export top_builddir

<    4   5   6   7   8   9   10   11   12   13   >