logical_replication_mode

2023-08-23 Thread Peter Eisentraut
I suggest we rename this setting to something starting with debug_. Right now, the name looks much too tempting for users to fiddle with. I think this is similar to force_parallel_mode. Also, the descriptions in guc_tables.c could be improved. For example, gettext_noop("Controls when to

Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc?

2023-08-23 Thread Peter Eisentraut
On 24.08.23 00:56, Andres Freund wrote: Hi, On 2023-08-23 18:32:26 -0400, Tom Lane wrote: Andres Freund writes: There are other potential uses for libpq in pg_regress though - I'd e.g. like to have a "monitoring" session open, which we could use to detect that the server crashed (by waiting f

Make documentation builds reproducible

2023-08-23 Thread Peter Eisentraut
xed in FOP. (See https://wiki.debian.org/ReproducibleBuilds/TimestampsInPDFGeneratedByApacheFOP.)From 9f2c7262445b6868c1d2c9f2d75ac1153b7c2a64 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 23 Aug 2023 16:38:44 +0200 Subject: [PATCH] Make documentation builds reproducible --- do

Re: Make all Perl warnings fatal

2023-08-23 Thread Peter Eisentraut
On 21.08.23 17:51, Andrew Dunstan wrote: Still, I guess that might not matter too much since apart from plperl we only use perl for building / testing. Regarding the dangers mentioned, I guess we can undo it if it proves a nuisance. +1 to getting rid if the unnecessary call to getprotobyname

Re: Remove distprep

2023-08-23 Thread Peter Eisentraut
On 14.07.23 10:56, Peter Eisentraut wrote: On 14.07.23 09:54, Peter Eisentraut wrote: diff --git a/src/tools/pginclude/cpluspluscheck b/src/tools/pginclude/cpluspluscheck index 4e09c4686b..287395887c 100755 --- a/src/tools/pginclude/cpluspluscheck +++ b/src/tools/pginclude/cpluspluscheck

Re: EBCDIC sorting as a use case for ICU rules

2023-08-23 Thread Peter Eisentraut
On 17.07.23 10:10, Daniel Verite wrote: Peter Eisentraut wrote: You can use whitespace in the rules. For example, CREATE COLLATION ebcdic (provider='icu', locale='und', rules=$$ Nice, it's clearly better that the piece of code I had in the previous patch.

Re: [PATCH] Add function to_oct

2023-08-22 Thread Peter Eisentraut
On 22.08.23 16:26, Nathan Bossart wrote: I don't understand the reason for this handling of negative values. I would expect that, say, to_hex(-1234) would return '-' || to_hex(1234). For this patch set, I was trying to retain the current behavior, which is to return the two's complement represe

Re: list of acknowledgments for PG16

2023-08-22 Thread Peter Eisentraut
On 22.08.23 15:29, Tom Lane wrote: Alvaro Herrera writes: Yeah, I've been proposing this kind of thing for many years; the problem, until not long ago, was that the tooling was unable to process non-Latin1 characters in all the output formats that we use. But tooling has changed and the oldest

Re: [PATCH] Add function to_oct

2023-08-22 Thread Peter Eisentraut
On 20.08.23 17:25, Nathan Bossart wrote: Doing a quick test, shows that this changes the current behaviour, because all inputs are now treated as 64-bit: HEAD: select to_hex((-1234)::int); to_hex -- fb2e With patch: select to_hex((-1234)::int); to_hex -

Make error messages about WAL segment size more consistent

2023-08-22 Thread Peter Eisentraut
be overkill, but that way the check is in the right place and it becomes more self-documenting.From f5a933aa4ea7980c3df6d74d845a95f2ce0d5153 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 22 Aug 2023 15:16:28 +0200 Subject: [PATCH] Make error messages about WAL segment size more

Re: Direct I/O

2023-08-22 Thread Peter Eisentraut
s.h says to order the functions by GUC variable name, which was already wrong under the old name, but it would be pretty confusing to sort the functions by their GUC name that doesn't match the function names.From b549b5972410f28a375325e09f022f703afc12ab Mon Sep 17 00:00:00 2001 From: Peter

Re: add timing information to pg_upgrade

2023-08-22 Thread Peter Eisentraut
On 01.08.23 17:45, Nathan Bossart wrote: On Tue, Aug 01, 2023 at 09:46:02AM +0200, Peter Eisentraut wrote: On 31.07.23 20:37, Nathan Bossart wrote: - prep_status("Checking for incompatible \"aclitem\" data type in user tables"); + prep_status("Checking for

list of acknowledgments for PG16

2023-08-22 Thread Peter Eisentraut
The list of acknowledgments for the PG16 release notes has been committed. It should show up here sometime: . As usual, please check for problems such as wrong sorting, duplicate names in different variants, or na

Convert encrypted SSL test keys to PKCS#8 format

2023-08-22 Thread Peter Eisentraut
ed to rethink these rules anyway to make sure we get consistent behavior.From 6da8ecf7cb4c5bce6c00ee7d85443ac082d6aaeb Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 22 Aug 2023 09:25:34 +0200 Subject: [PATCH 1/2] Generate encrypted SSL test keys in PKCS#8 format --- src/test/modu

Re: meson: pgxs Makefile.global differences

2023-08-21 Thread Peter Eisentraut
On 21.08.23 17:33, Andrew Dunstan wrote: Where should we do that? And how about the -g that's also missing for debug-enabled builds? I think it's the options in these two tables that meson handles internally and that we should explicitly reproduce for Makefile.global: https://mesonbuild.com/

Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }

2023-08-18 Thread Peter Eisentraut
On 16.08.23 19:44, Jeff Davis wrote: On Wed, 2023-08-16 at 08:51 +0200, Peter Eisentraut wrote: On 12.08.23 04:35, Jeff Davis wrote: The attached patch implements a new SEARCH clause for CREATE FUNCTION. The SEARCH clause controls the search_path used when executing functions that were created

Re: dubious warning: FORMAT JSON has no effect for json and jsonb types

2023-08-17 Thread Peter Eisentraut
On 16.08.23 16:59, Merlin Moncure wrote: On Wed, Aug 16, 2023 at 8:55 AM Peter Eisentraut <mailto:pe...@eisentraut.org>> wrote: This warning comes from parse_expr.c transformJsonValueExpr() and is triggered for example by the following test case: SELECT JSON_OBJECT(&#

Re: Fix typo in src/interfaces/libpq/po/zh_CN.po

2023-08-16 Thread Peter Eisentraut
On 16.08.23 09:34, Zhang Mingli wrote: The Chinese words there are ok,  but the `Unix-domian` should be `Unix-domain`. fixed, thanks

dubious warning: FORMAT JSON has no effect for json and jsonb types

2023-08-16 Thread Peter Eisentraut
This warning comes from parse_expr.c transformJsonValueExpr() and is triggered for example by the following test case: SELECT JSON_OBJECT('foo': NULL::json FORMAT JSON); WARNING: FORMAT JSON has no effect for json and jsonb types But I don't see anything in the SQL standard that would require

Re: Handle infinite recursion in logical replication setup

2023-08-16 Thread Peter Eisentraut
On 09.08.23 04:50, Peter Smith wrote: On Tue, Aug 8, 2023 at 6:52 PM Amit Kapila wrote: On Tue, Aug 8, 2023 at 1:50 PM Peter Eisentraut wrote: This patch added the following error message: errdetail_plural("Subscribed publication %s is subscribing to other publications.", &

Re: cataloguing NOT NULL constraints

2023-08-16 Thread Peter Eisentraut
named and can be operated on like other constraints. You might want to read that again to make sure it matches your latest intentions, but I think it catches all the places that are required to change.From 324f0050eee51c47e4c558867e6cc832652b39bb Mon Sep 17 00:00:00 2001 From: Peter Eisentraut

Re: cataloguing NOT NULL constraints

2023-08-16 Thread Peter Eisentraut
On 15.08.23 11:57, Dean Rasheed wrote: Something else I noticed when reading the SQL standard is that a user-defined CHECK (col IS NOT NULL) constraint should be recognised by the system as also making the column not null (setting its "nullability characteristic" to "known not nullable"). I think

Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }

2023-08-15 Thread Peter Eisentraut
On 12.08.23 04:35, Jeff Davis wrote: The attached patch implements a new SEARCH clause for CREATE FUNCTION. The SEARCH clause controls the search_path used when executing functions that were created without a SET clause. I don't understand this. This adds a new option for cases where the exis

Re: Remove distprep

2023-08-15 Thread Peter Eisentraut
On 14.07.23 11:48, Tom Lane wrote: Peter Eisentraut writes: Ah, there was a reason. The headerscheck and cpluspluscheck targets need jsonpath_gram.h to be built first. Which previously happened indirectly somehow? I have fixed this in the new patch version. I also fixed the issue that

some code cleanup in index.c and indexcmds.c

2023-08-15 Thread Peter Eisentraut
touched anyway. In some cases, with the renaming, the lines didn't seem that long anymore to warrant a line break.From dfa595a003ea237a7431603824b9e5f28c5b20fa Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 16 Aug 2023 07:45:28 +0200 Subject: [PATCH 1/3] Add const decorat

Re: run pgindent on a regular basis / scripted manner

2023-08-14 Thread Peter Eisentraut
On 12.08.23 02:11, Tom Lane wrote: Andres Freund writes: On 2023-08-11 18:30:02 -0400, Tom Lane wrote: +1 for including this in CI tests I didn't even mean CI - I meant 'make check-world' / 'meson test'. Which of course would include CI automatically. Hmm. I'm allergic to anything that s

Re: run pgindent on a regular basis / scripted manner

2023-08-14 Thread Peter Eisentraut
On 12.08.23 23:14, Andres Freund wrote: It's a somewhat annoying task though, find all the typedefs, add them to the right place in the file (we have an out of order entry right now). I think a script that*adds* (but doesn't remove) local typedefs would make this less painful. I was puzzled on

Re: pgsql: Allow tailoring of ICU locales with custom rules

2023-08-14 Thread Peter Eisentraut
On 24.07.23 04:46, Amit Kapila wrote: On Fri, Mar 10, 2023 at 3:24 PM Peter Eisentraut wrote: On 08.03.23 21:57, Jeff Davis wrote: * It appears rules IS NULL behaves differently from rules=''. Is that desired? For instance: create collation c1(provider=icu, locale

Re: Add PG CI to older PG releases

2023-08-10 Thread Peter Eisentraut
On 10.08.23 16:43, Nazir Bilal Yavuz wrote: 1_ 76e38b37a5f179d4c9d2865ff31b79130407530b is added for debugging Windows. Also a couple of SSL tests were failing without this because the log file is empty. Example failures on 001_ssltests.pl: I see only one attachment, so it's not clear what thes

Re: Fix last unitialized memory warning

2023-08-10 Thread Peter Eisentraut
On 09.08.23 17:29, Tristan Partin wrote: On Wed Aug 9, 2023 at 10:02 AM CDT, Peter Eisentraut wrote: On 09.08.23 10:07, Peter Eisentraut wrote: > On 08.08.23 17:14, Tristan Partin wrote: >>> I was able to reproduce the warning now on Fedora.  I agree with t

Re: Using defines for protocol characters

2023-08-09 Thread Peter Eisentraut
1. As was discussed, these definitions should go into src/include/libpq/pqcomm.h, not a new file. 2. I would prefer an underscore after PgMsg, like PqMsg_DescribeRequest, so it's easier to visually locate the start of the actual message name. 3. IMO, the names of the protocol messages in prot

Re: Fix last unitialized memory warning

2023-08-09 Thread Peter Eisentraut
On 09.08.23 10:07, Peter Eisentraut wrote: On 08.08.23 17:14, Tristan Partin wrote: I was able to reproduce the warning now on Fedora.  I agree with the patch -   PgBenchValue vargs[MAX_FARGS]; +   PgBenchValue vargs[MAX_FARGS] = { 0 }; I suggest to also do   typedef enum

Re: [RFC] Clang plugin for catching suspicious typedef casting

2023-08-09 Thread Peter Eisentraut
On 03.08.23 18:56, Dmitry Dolgov wrote: I would like to get your opinion, folks. Does it sound interesting enough for the community, is it worth it to pursue the idea? I think it's interesting, and doesn't look too invasive. Maybe we can come up with three or four interesting use cases and try

Re: Adding a pg_servername() function

2023-08-09 Thread Peter Eisentraut
On 09.08.23 08:42, Laetitia Avrot wrote: I agree that the feature I'm suggesting could be done with a few tricks. I meant to simplify the life of the user by providing a simple new feature. (Also, I might have trust issues with DNS due to several past production disasters.) My question is ver

Re: Fix last unitialized memory warning

2023-08-09 Thread Peter Eisentraut
On 08.08.23 17:14, Tristan Partin wrote: I was able to reproduce the warning now on Fedora.  I agree with the patch -   PgBenchValue vargs[MAX_FARGS]; +   PgBenchValue vargs[MAX_FARGS] = { 0 }; I suggest to also do   typedef enum   { -   PGBT_NO_VALUE, +   PGBT_NO_VALUE = 0,

Re: cataloguing NOT NULL constraints

2023-08-09 Thread Peter Eisentraut
On 05.08.23 21:50, Dean Rasheed wrote: Anyway, I was at the same time fixing the other problem you reported with inheritance (namely, adding a PK ends up with the child column being marked NOT NULL but no corresponding constraint). At some point I wondered if the easy way out wouldn't be to give

Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc?

2023-08-08 Thread Peter Eisentraut
On 08.08.23 04:15, Andres Freund wrote: Potential paths forward for individual CI: - migrate wholesale to another CI provider - split CI tasks across different CI providers, rely on github et al displaying the CI status for different platforms - give up With the proposed optimizations, it

Re: Fix last unitialized memory warning

2023-08-08 Thread Peter Eisentraut
On 19.07.23 19:15, Tristan Partin wrote: On Sun Jul 9, 2023 at 2:23 AM CDT, Peter Eisentraut wrote: On 06.07.23 15:41, Tristan Partin wrote: > On Thu Jul 6, 2023 at 3:21 AM CDT, Peter Eisentraut wrote: >> On 05.07.23 23:06, Tristan Partin wrote: >>> Thanks for following up. M

Re: Handle infinite recursion in logical replication setup

2023-08-08 Thread Peter Eisentraut
On 12.09.22 07:23, vignesh C wrote: On Fri, 9 Sept 2022 at 11:12, Amit Kapila wrote: On Thu, Sep 8, 2022 at 9:32 AM vignesh C wrote: The attached patch has the changes to handle the same. Pushed. I am not completely sure whether we want the remaining documentation patch in this thread i

Re: cpluspluscheck vs ICU

2023-08-08 Thread Peter Eisentraut
On 08.08.23 01:35, Andres Freund wrote: Hi, On 2023-03-10 20:10:30 -0800, Andres Freund wrote: On 2023-03-10 19:37:27 -0800, Andres Freund wrote: I just hit this once more - and I figured out a fairly easy fix: We just need a #ifndef U_DEFAULT_SHOW_DRAFT #define U_DEFAULT_SHOW_DRAFT 0

Re: Minor configure/meson cleanup

2023-08-07 Thread Peter Eisentraut
On 07.08.23 11:18, Thomas Munro wrote: 0001: There is no point in searching -lrt and -lposix4 for fdatasync() if it's supposed to help Solaris only. They moved all the realtime stuff into the main C library at least as far back as Solaris 10/OpenSolaris. 0002: There is no point in probing -lpos

Re: Improve const use in zlib-using code

2023-08-07 Thread Peter Eisentraut
On 03.08.23 16:30, Tristan Partin wrote: Both patches look good to me. committed, thanks

Re: Improve const use in zlib-using code

2023-08-03 Thread Peter Eisentraut
ring if we could remove the `z_streamp` check too. The version that it was added isn't obvious. Yeah, that appears to be very obsolete. I have made an additional patch to remove that. From 81f053c68109d85ae657f6d9f652d90f1d55fb2a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Dat

Improve const use in zlib-using code

2023-08-02 Thread Peter Eisentraut
discarding qualifiers. Old environments tend to produce more compiler warnings anyway, so this doesn't seem so bad.From 324e37adff4c51f4f10807386c0c098cb8d21608 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 2 Aug 2023 11:01:27 +0200 Subject: [PATCH] Improve const use in zlib-using

Re: multiple membership grants and information_schema.applicable_roles

2023-08-02 Thread Peter Eisentraut
On 24.07.23 08:42, Pavel Luzanov wrote: I do see what seems like a different issue: the standard appears to expect that indirect role grants should also be shown (via the recursive CTE), and we are not doing that. I noticed this, but the view stays unchanged so long time. I thought it was done

Re: add timing information to pg_upgrade

2023-08-02 Thread Peter Eisentraut
On 02.08.23 10:30, Bharath Rupireddy wrote: Moreover, the ts command gives me the timestamps for each of the messages printed, so an extra step is required to calculate the time taken for an operation. There is "ts -i" for that.

Re: cataloguing NOT NULL constraints

2023-08-02 Thread Peter Eisentraut
On 24.07.23 12:32, Alvaro Herrera wrote: However, 11.16 ( as part of 11.12 ), says that DROP NOT NULL causes the indication of the column as NOT NULL to be removed. This, to me, says that if you do have multiple such constraints, you'd better remove them all with that command. All in all, I lea

Re: [PATCH] [zh_CN.po] fix a typo in simplified Chinese translation file

2023-08-02 Thread Peter Eisentraut
On 01.08.23 10:09, Junwang Zhao wrote: add the missing leading `l` for log_statement_sample_rate I have committed this fix to the translations repository.

Re: add timing information to pg_upgrade

2023-08-02 Thread Peter Eisentraut
On 01.08.23 17:45, Nathan Bossart wrote: The message is too long, so there's no space between it and the "ok" message: Checking for incompatible "aclitem" data type in user tablesok Instead of altering the messages, we could bump MESSAGE_WIDTH from 60 to 62 or 64. Do you prefer that ap

Re: add timing information to pg_upgrade

2023-08-02 Thread Peter Eisentraut
On 01.08.23 18:00, Nathan Bossart wrote: One of the main purposes of this thread is to gauge interest. I'm hoping there are other developers who are interested in reducing pg_upgrade-related downtime, and it seemed like it'd be nice to have built-in functionality for measuring the step times ins

Re: add timing information to pg_upgrade

2023-08-01 Thread Peter Eisentraut
On 31.07.23 20:37, Nathan Bossart wrote: - prep_status("Checking for incompatible \"aclitem\" data type in user tables"); + prep_status("Checking for \"aclitem\" data type in user tables"); Why these changes? I think this is losing precision about what it's doing.

Re: add timing information to pg_upgrade

2023-08-01 Thread Peter Eisentraut
On 28.07.23 01:51, Nathan Bossart wrote: I've been looking into some options for reducing the amount of downtime required for pg_upgrade, and $SUBJECT seemed like something that would be worthwhile independent of that effort. The attached work-in-progress patch adds the elapsed time spent in eac

Re: Remove distprep

2023-07-14 Thread Peter Eisentraut
On 14.07.23 09:54, Peter Eisentraut wrote: diff --git a/src/tools/pginclude/cpluspluscheck b/src/tools/pginclude/cpluspluscheck index 4e09c4686b..287395887c 100755 --- a/src/tools/pginclude/cpluspluscheck +++ b/src/tools/pginclude/cpluspluscheck @@ -134,6 +134,9 @@ do   test "$f&q

Re: Remove distprep

2023-07-14 Thread Peter Eisentraut
hed is a new version with the above changes, also updated for the recently added generate-wait_event_types.pl, and I have adjusted all the header file linking to use relative paths consistently. This addresses all issues known to me. From 260d055b0428130d9db96bed2298495ce7e93505 Mon Sep 17 00:00:00 2

Re: Better help output for pgbench -I init_steps

2023-07-13 Thread Peter Eisentraut
On 12.07.23 19:47, Gurjeet Singh wrote: If you end up with variant 3 or 4, please use double quotes instead of single quotes. Will do. I believe you're suggesting this because in the neighboring help text the string literals use double quotes. I see that other utilities, such as psql also use

Re: Consistent coding for the naming of LR workers

2023-07-13 Thread Peter Eisentraut
On 13.07.23 11:29, Alvaro Herrera wrote: On 2023-Jul-13, Peter Eisentraut wrote: I suppose we could just say "logical replication worker" in all cases. That should be enough precision for the purpose of these messages. Agreed. IMO the user doesn't care about specifics. Ok, committed.

Re: Consistent coding for the naming of LR workers

2023-07-13 Thread Peter Eisentraut
On 13.07.23 06:59, Peter Smith wrote: On Wed, Jul 12, 2023 at 9:35 PM Peter Eisentraut wrote: On 21.06.23 09:18, Alvaro Herrera wrote: That is a terrible pattern in relatively new code. Let's get rid of it entirely rather than continue to propagate it. So, I don't think it is f

Re: Clean up some signal usage mainly related to Windows

2023-07-12 Thread Peter Eisentraut
On 12.07.23 16:23, Tristan Partin wrote: It has come to my attention that STDOUT_FILENO might not be portable and fileno(3) isn't marked as signal-safe, so I have just used the raw 1 for stdout, which as far as I know is portable. We do use STDOUT_FILENO elsewhere in the code, and there are eve

Re: tablecmds.c/MergeAttributes() cleanup

2023-07-12 Thread Peter Eisentraut
On 11.07.23 20:17, Alvaro Herrera wrote: I spent a few minutes doing a test merge of this to my branch with NOT NULL changes. Here's a quick review. Subject: [PATCH 01/17] Remove obsolete comment about OID support Obvious, trivial. +1 Subject: [PATCH 02/17] Remove ancient special case cod

Re: Synchronizing slots from primary to standby

2023-07-12 Thread Peter Eisentraut
On 14.04.23 15:22, Drouvot, Bertrand wrote: Now that the "Minimal logical decoding on standby" patch series (mentioned up-thread) has been committed, I think we can resume working on this one ("Synchronizing slots from primary to standby"). Maybe you have seen this extension that was released

Re: Consistent coding for the naming of LR workers

2023-07-12 Thread Peter Eisentraut
t; and "parallel apply worker" is all that interesting to explode the number of messages. AFAICT, the table sync worker case wasn't even used, since callers always handled it separately.) From 6a1558629f97d83c8b11f204b39aceffc94dee8f Mon Sep 17 00:00:00 2001 From: Peter Eise

Re: Better help output for pgbench -I init_steps

2023-07-12 Thread Peter Eisentraut
On 12.07.23 09:42, Gurjeet Singh wrote: These two variants show the two extremes; bare minimum vs. everything but the kitchen sink. So one may feel the need to find a middle ground and provide a "sufficient, but not too much" variant. I have attempted that in variants 3 and 4; also attached. If

Re: Clean up some signal usage mainly related to Windows

2023-07-12 Thread Peter Eisentraut
On 06.07.23 22:43, Tristan Partin wrote: /* Finish incomplete line on stdout */ - puts(""); - exit(1); + write(STDOUT_FILENO, "", 1); + _exit(1); puts() writes a newline, so it should probably be something like write(STDOUT_FILENO, "\n", 1);

Re: SQL:2011 application time

2023-07-12 Thread Peter Eisentraut
ivial problem, so please take another look at that sometime. (Since it's the last patch, it's obviously lower priority.) From 6694912b0fdd8742e583ff2a524f32284c330711 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 12 Jul 2023 09:45:56 +0200 Subject: [PATCH v12] fixup! Add temporal

Re: Exclusion constraints on partitioned tables

2023-07-12 Thread Peter Eisentraut
On 11.07.23 07:52, Paul A Jungwirth wrote: On Mon, Jul 10, 2023 at 8:06 AM Paul A Jungwirth wrote: On Mon, Jul 10, 2023 at 7:05 AM Peter Eisentraut wrote: I'm not sure what value we would get from testing this with btree_gist, but if we wanted to do that, then adding a new test file t

Re: UUID v7

2023-07-10 Thread Peter Eisentraut
On 07.07.23 14:06, Andrey M. Borodin wrote: Also, I think we should discuss UUID v8. UUID version 8 provides an RFC-compatible format for experimental or vendor-specific use cases. Revision 1 of IETF draft contained interesting code for v8: almost similar to v7, but with fields for "node ID" an

Re: check_strxfrm_bug()

2023-07-10 Thread Peter Eisentraut
On 10.07.23 04:51, Thomas Munro wrote: On Sun, Jul 9, 2023 at 6:35 PM Thomas Munro wrote: On Sun, Jul 9, 2023 at 6:20 PM Peter Eisentraut wrote: So I don't think this code is correct. AFAICT, there is nothing right now that can possibly define HAVE_MBSTOWCS_L on Windows/MSVC. Was tha

Re: Exclusion constraints on partitioned tables

2023-07-10 Thread Peter Eisentraut
On 09.07.23 03:21, Paul A Jungwirth wrote: It seems to me that many of the test cases added in indexing.sql are redundant with create_table.sql/alter_table.sql (or vice versa). Is there a reason for this? Yes, there is some overlap. I think that's just because there was overlap before, and I d

Re: ResourceOwner refactoring

2023-07-10 Thread Peter Eisentraut
A few suggestions on the API: > +static ResourceOwnerFuncs tupdesc_resowner_funcs = These aren't all "functions", so maybe another word like "info" or "description" would be more appropriate? > + .release_phase = RESOURCE_RELEASE_AFTER_LOCKS, > + .release_priority = RELEASE_PRIO_TUPDESC_

Re: Fix last unitialized memory warning

2023-07-09 Thread Peter Eisentraut
On 06.07.23 15:41, Tristan Partin wrote: On Thu Jul 6, 2023 at 3:21 AM CDT, Peter Eisentraut wrote: On 05.07.23 23:06, Tristan Partin wrote: Thanks for following up. My system is Fedora 38. I can confirm this is still happening on master. $ gcc --version gcc (GCC) 13.1.1 20230614 (Red Hat

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

2023-07-08 Thread Peter Eisentraut
On 03.07.23 11:53, Peter Eisentraut wrote: 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

Re: check_strxfrm_bug()

2023-07-08 Thread Peter Eisentraut
On 07.07.23 22:30, Thomas Munro wrote: Thinking about how to bring this all into "normal" form -- where HAVE_XXX means "system defines XXX", not "system defines XXX || we define a replacement" HAVE_XXX means "code can use XXX", doesn't matter how it got there (it could also be a libpgport repl

Re: remaining sql/json patches

2023-07-07 Thread Peter Eisentraut
On 21.06.23 10:25, Amit Langote wrote: I realized that the patch for the "other sql/json functions" part is relatively straightforward and has no dependence on the "sql/json query functions" part getting done first. So I've made that one the 0001 patch. The patch I posted in the last email is n

Re: Add more sanity checks around callers of changeDependencyFor()

2023-07-06 Thread Peter Eisentraut
On 29.06.23 01:36, Michael Paquier wrote: While working on a different patch, I have noted three code paths that call changeDependencyFor() but don't check that they do not return errors. In all the three cases (support function, extension/schema and object/schema), it seems to me that only one

Re: UUID v7

2023-07-06 Thread Peter Eisentraut
On 06.07.23 16:02, Tom Lane wrote: Daniel Gustafsson writes: On 6 Jul 2023, at 15:29, Matthias van de Meent wrote: Sure, it's earlier than the actual release of the standard, but that wasn't a blocker for SQL features that were considered finalized either. I can't speak for any SQL standa

Re: check_strxfrm_bug()

2023-07-06 Thread Peter Eisentraut
On 05.07.23 00:15, Thomas Munro wrote: On Tue, Jul 4, 2023 at 2:52 AM Tristan Partin wrote: The patch looks good to me as well. Happy to rebase my other patch on this one. Thanks. Here is a slightly tidier version. It passes on CI[1] including the optional extra MinGW64/Meson task, and the

Re: Does a cancelled REINDEX CONCURRENTLY need to be messy?

2023-07-06 Thread Peter Eisentraut
On 03.07.23 19:46, Álvaro Herrera wrote: Well, I definitely agree that it would be useful to have*something* that automatically removes debris Yeah, like "undo".

Re: [PATCH] Add GitLab CI to PostgreSQL

2023-07-06 Thread Peter Eisentraut
On 06.07.23 13:32, Andrew Dunstan wrote: This seems very RedHat-centric, which I'm not sure is a good idea. Also, shouldn't at least some of these recipes call dnf and dnf-builddep instead of yum and yum-build-dep? I don't think it's bad to add an automated test suite for redhat-based images?

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

2023-07-06 Thread Peter Eisentraut
On 28.06.23 20:15, Andres Freund wrote: On 2023-06-28 10:40:22 +0200, Peter Eisentraut wrote: 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

Re: Bytea PL/Perl transform

2023-07-06 Thread Peter Eisentraut
On 22.06.23 22:56, Greg Sabino Mullane wrote: * Do all of these transforms need to be their own contrib modules? So much duplicated code across contrib/*_plperl already (and *plpython too for that matter) ... The reason the first transform modules were separate extensions is that they interfa

Re: Latches vs lwlock contention

2023-07-06 Thread Peter Eisentraut
On 04.03.23 20:50, Thomas Munro wrote: Subject: [PATCH v3 1/6] Allow palloc_extended(NO_OOM) in critical sections. Commit 4a170ee9e0e banned palloc() and similar in critical sections, because an allocation failure would produce a panic. Make an exception for allocation with NULL on failure, for

Re: EBCDIC sorting as a use case for ICU rules

2023-07-06 Thread Peter Eisentraut
On 30.06.23 13:08, Daniel Verite wrote: About making a doc patch from this, I've came up with the attached, which generates a CREATE COLLATION statement with rules from an arbitrary strings that just lists characters in whichever order is desired. I like adding more documentation and links arou

Re: EBCDIC sorting as a use case for ICU rules

2023-07-06 Thread Peter Eisentraut
On 21.06.23 15:28, Daniel Verite wrote: A collation like the following this seems to work (the rule simply enumerates US-ASCII letters in the EBCDIC alphabet order, with adequate quoting) CREATE COLLATION ebcdic (provider='icu', locale='und', rules=$$&' '<'.'<'<'<'('<'+'<\|<'&'<'!'<'$'<'*'<')'<'

Re: Fix last unitialized memory warning

2023-07-06 Thread Peter Eisentraut
On 05.07.23 23:06, Tristan Partin wrote: Thanks for following up. My system is Fedora 38. I can confirm this is still happening on master. $ gcc --version gcc (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4) Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copy

Re: SQL:2011 application time

2023-07-06 Thread Peter Eisentraut
On 04.07.23 14:48, Daniel Gustafsson wrote: On 8 May 2023, at 09:10, Peter Eisentraut wrote: On 03.05.23 23:02, Paul Jungwirth wrote: Thank you again for the review. Here is a patch with most of your feedback addressed. Sorry it has taken so long! These patches are rebased up to

Re: Exclusion constraints on partitioned tables

2023-07-06 Thread Peter Eisentraut
On 17.03.23 17:03, Paul Jungwirth wrote: Thank you for taking a look! I did some research on the history of the code here, and I think I understand Tom's concern about making sure the index uses the same equality operator as the partition. I was confused about his remarks about the opfamily, bu

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 feedba

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 sou

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 f

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: Ma

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 HAVE

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] https://www.postgresql.org/message-id/flat

Re: cataloguing NOT NULL constraints

2023-07-03 Thread Peter Eisentraut
coninhcount DESC, conname; Maybe add 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 r

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 implement

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 ca

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 list_cop

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), -err

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

<    6   7   8   9   10   11   12   13   14   15   >