Re: Autogenerate some wait events code and documentation

2023-07-09 Thread Drouvot, Bertrand
On 7/10/23 7:20 AM, Michael Paquier wrote: On Mon, Jul 10, 2023 at 07:05:30AM +0200, Drouvot, Bertrand wrote: Yeah there is one in generate-wait_event_types.pl. I was wondering to add one in wait_event_names.txt too (as this is the place where no wait events would be added if any). Hmm.

Re: Autogenerate some wait events code and documentation

2023-07-09 Thread Michael Paquier
On Mon, Jul 10, 2023 at 07:05:30AM +0200, Drouvot, Bertrand wrote: > Yeah there is one in generate-wait_event_types.pl. I was wondering > to add one in wait_event_names.txt too (as this is the place where > no wait events would be added if any). Hmm. Something like that could be done, for

Re: Add hint message for check_log_destination()

2023-07-09 Thread Michael Paquier
On Mon, Jul 10, 2023 at 02:07:09PM +0900, Kyotaro Horiguchi wrote: > At Mon, 10 Jul 2023 09:04:42 +0800, Japin Li wrote in >> Sorry for the late reply! I'm not sure. How can I know whether it is >> translatable? Per the documentation:

Re: Add hint message for check_log_destination()

2023-07-09 Thread Kyotaro Horiguchi
At Mon, 10 Jul 2023 09:04:42 +0800, Japin Li wrote in > > On Sat, 08 Jul 2023 at 12:48, Michael Paquier wrote: > > On Fri, Jul 07, 2023 at 07:23:47PM +0800, Japin Li wrote: > >> + appendStringInfoString(, "\"stderr\""); > >> +#ifdef HAVE_SYSLOG > >> +

Re: Autogenerate some wait events code and documentation

2023-07-09 Thread Drouvot, Bertrand
Hi, On 7/9/23 9:36 AM, Michael Paquier wrote: On Sun, Jul 09, 2023 at 09:15:34AM +0200, Drouvot, Bertrand wrote: I also noticed that you now provide the culprit line in case of parsing failure (thanks for that). Yes, that's mentioned in the commit message I quickly wrote in 0002. # -#

Re: pg_recvlogical prints bogus error when interrupted

2023-07-09 Thread Michael Paquier
On Thu, Jul 06, 2023 at 10:29:10AM -0500, Tristan Partin wrote: > On Thu Apr 27, 2023 at 12:54 AM CDT, Bharath Rupireddy wrote: >> Why do we need both time_to_abort and ready_to_exit? > > I am trying to understand why we need both as well. Maybe I am missing > something important :). As

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-09 Thread Amit Kapila
On Mon, Jul 10, 2023 at 7:55 AM Peter Smith wrote: > > On Sat, Jul 8, 2023 at 1:49 PM Amit Kapila wrote: > > > > On Fri, Jul 7, 2023 at 1:36 PM Masahiko Sawada > > wrote: > > > > > > I prefer the first suggestion. I've attached the updated patch. > > > > > > > This looks mostly good to me but

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

2023-07-09 Thread Michael Paquier
On Fri, Jul 07, 2023 at 06:12:48PM +, Akshat Jaimini wrote: > I believe it is ready to be committed! Okay, thanks. Please note that I have backpatched the bug and added the checks for the callers of changeDependencyFor() on HEAD on top of the bugfix. -- Michael signature.asc Description:

Re: Synchronizing slots from primary to standby

2023-07-09 Thread Amit Kapila
On Sun, Jul 9, 2023 at 1:01 PM Bharath Rupireddy wrote: > > On Fri, Jun 16, 2023 at 3:26 PM Amit Kapila wrote: > > > > > > 1. Can you please try to explain the functionality of the overall > > patch somewhere in the form of comments and or commit message? > > IIUC, there are 2 core ideas of the

RE: [Patch] Use *other* indexes on the subscriber when REPLICA IDENTITY is FULL

2023-07-09 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > > Yes, I agree, it is (and was before my patch as well) un-documented > limitation of REPLICA IDENTITY FULL. > > And, as far as I can see, my patch actually didn't have any impact on the > limitation. The unsupported > > cases are still unsupported, but now the same error is thrown

doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL

2023-07-09 Thread Hayato Kuroda (Fujitsu)
Dear hackers, This is a fork thread from [1]. While analyzing codes I noticed that UPDATE and DELETE cannot be replicated when REPLICA IDENTITY is FULL and the table has datatype which does not have the operator class of Btree. I thnk this restriction is not documented but should be. PSA the

Re: POC, WIP: OR-clause support for indexes

2023-07-09 Thread Andrey Lepikhov
On 7/7/2023 15:20, Alena Rybakina wrote: because we will provide similar manipulation in this: foreach(l, gentry->consts) {       Node       *rexpr = (Node *) lfirst(l);       rexpr = coerce_to_common_type(pstate, rexpr,                                            scalar_type,   

Re: check_strxfrm_bug()

2023-07-09 Thread Thomas Munro
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 that > > the intention? > > Yes, that was

RE: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-09 Thread Hayato Kuroda (Fujitsu)
Dear hackers, Hi, I did a performance testing for v16 patch set. Results show that patches significantly improves the performance in most cases. # Method Following tests were done 10 times per condition, and compared by median. do_one_test.sh was used for the testing. 1. Create tables on

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-09 Thread Peter Smith
On Sat, Jul 8, 2023 at 1:49 PM Amit Kapila wrote: > > On Fri, Jul 7, 2023 at 1:36 PM Masahiko Sawada wrote: > > > > I prefer the first suggestion. I've attached the updated patch. > > > > This looks mostly good to me but I think it would be better if we can > also add the information that the

Re: Add hint message for check_log_destination()

2023-07-09 Thread Japin Li
On Sat, 08 Jul 2023 at 12:48, Michael Paquier wrote: > On Fri, Jul 07, 2023 at 07:23:47PM +0800, Japin Li wrote: >> +appendStringInfoString(, "\"stderr\""); >> +#ifdef HAVE_SYSLOG >> +appendStringInfoString(, ", \"syslog\""); >> +#endif >> +#ifdef WIN32

Re: Preventing non-superusers from altering session authorization

2023-07-09 Thread Joseph Koshakow
On Sun, Jul 9, 2023 at 1:03 PM Joseph Koshakow wrote: >> * Only a superuser may set auth ID to something other than himself > Is "auth ID" the right term here? Maybe something like "Only a > superuser may set their session authorization/ID to something other > than their authenticated ID." >>

Re: Cleaning up threading code

2023-07-09 Thread Thomas Munro
Thanks all for the reviews. I pushed the first two small patches. Here is a new version of the main --disable-thread-safety removal part, with these changes: * fixed LDAP_LIBS_FE snafu reported by Peter E * defined ENABLE_THREAD_SAFETY 1 in c.h, for the benefit of extensions * defined

Re: BRIN indexes vs. SK_SEARCHARRAY (and preprocessing scan keys)

2023-07-09 Thread Tomas Vondra
On 7/9/23 20:05, Heikki Linnakangas wrote: > On 09/07/2023 19:16, Tomas Vondra wrote: >> On 7/8/23 23:57, Heikki Linnakangas wrote: >>> The new preprocess support function feels a bit too inflexible to me. >>> True, you can store whatever you want in the ScanKey that it returns, >>> but since

Re: Support logical replication of DDLs

2023-07-09 Thread Zheng Li
On Tue, Jun 27, 2023 at 6:16 AM vignesh C wrote: > While development, below are some of the challenges we faced: > 1. Almost all the members of the AlterTableType enum will have to be > annotated. > 2. Complex functionalities which require access to catalog tables > cannot be auto generated,

Re: DecodeInterval fixes

2023-07-09 Thread reid . thompson
On Sat, 2023-07-08 at 13:18 -0400, Joseph Koshakow wrote: > Jacob Champion writes: > > Hi Joe, here's a partial review: > > Thanks so much for the review! > > > I'm new to this code, but I agree that the use of `type` and the > > lookahead are not particularly obvious/intuitive. At the very > >

Re: RFC: pg_stat_logmsg

2023-07-09 Thread Joe Conway
On 7/7/23 01:38, Gurjeet Singh wrote: On Thu, Jul 6, 2023 at 12:37 AM Masahiko Sawada wrote: On Sat, Jul 1, 2023 at 8:57 AM Joe Conway wrote: > > The basic idea is to mirror how pg_stat_statements works, except the > logged messages keyed by filename, lineno, and elevel are saved with a >

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

2023-07-09 Thread Anatoly Zaretsky
On Sun, Jul 9, 2023 at 9:57 AM Peter Eisentraut wrote: > committed > Thanks! -- Best regards, Anatoly Zaretsky

Re: BRIN indexes vs. SK_SEARCHARRAY (and preprocessing scan keys)

2023-07-09 Thread Heikki Linnakangas
On 09/07/2023 19:16, Tomas Vondra wrote: On 7/8/23 23:57, Heikki Linnakangas wrote: The new preprocess support function feels a bit too inflexible to me. True, you can store whatever you want in the ScanKey that it returns, but since that's the case, why not just make it void * ? It seems that

Re: DecodeInterval fixes

2023-07-09 Thread Joseph Koshakow
On Sat, Jul 8, 2023 at 5:06 PM Gurjeet Singh wrote: > I feel the staleness/deficiencies you mention above are not > captured in the TODO wiki page. It'd be nice if these were documented, > so that newcomers to the community can pick up work that they feel is > an easy lift for them. I think

Re: Preventing non-superusers from altering session authorization

2023-07-09 Thread Joseph Koshakow
On Sun, Jul 9, 2023 at 12:47 AM Nathan Bossart wrote: > I think we should split this into two patches: one to move the permission > check to check_session_authorization() and another for the behavior change. > I've attached an attempt at the first one (that borrows heavily from your > latest

Re: BRIN indexes vs. SK_SEARCHARRAY (and preprocessing scan keys)

2023-07-09 Thread Tomas Vondra
On 7/8/23 23:57, Heikki Linnakangas wrote: > On 02/07/2023 19:09, Tomas Vondra wrote: >> Here's an updated version of the patch series. >> >> I've polished and pushed the first three patches with cleanup, tests to >> improve test coverage and so on. I chose not to backpatch those - I >> planned to

Re: psql: Add role's membership options to the \du+ command

2023-07-09 Thread Pavel Luzanov
On 08.07.2023 20:07, Tom Lane wrote: 1. I was thinking in terms of dropping the "Member of" column entirely in \du and \dg. It doesn't tell you enough, and the output of those commands is often too wide already. I understood it that way that the dropping "Member of" column will be done as

Re: Autogenerate some wait events code and documentation

2023-07-09 Thread Michael Paquier
On Sun, Jul 09, 2023 at 09:15:34AM +0200, Drouvot, Bertrand wrote: > I also noticed that you now provide the culprit line in case of parsing > failure (thanks for that). Yes, that's mentioned in the commit message I quickly wrote in 0002. > # > -# "C symbol in enums" "format in the system

Re: Synchronizing slots from primary to standby

2023-07-09 Thread Bharath Rupireddy
On Fri, Jun 16, 2023 at 3:26 PM Amit Kapila wrote: > > On Mon, Apr 17, 2023 at 7:37 PM Drouvot, Bertrand > wrote: > > > > Please find attached V5 (a rebase of V4 posted up-thread). > > > > In addition to the "rebasing" work, the TAP test adds a test about conflict > > handling (logical slot

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: Autogenerate some wait events code and documentation

2023-07-09 Thread Drouvot, Bertrand
Hi, On 7/9/23 6:32 AM, Michael Paquier wrote: On Fri, Jul 07, 2023 at 01:49:24PM +0900, Michael Paquier wrote: Hmm. If we go down this road I would make the choice of simplicity and remove entirely a column, then, generating the snakecase from the camelcase or vice-versa (say like a $string

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

2023-07-09 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: check_strxfrm_bug()

2023-07-09 Thread Thomas Munro
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 that > the intention? Yes, that was my intention. Windows actually doesn't have them. The

Re: check_strxfrm_bug()

2023-07-09 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