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

2023-07-07 Thread Amit Kapila
On Fri, Jul 7, 2023 at 1:31 PM Hayato Kuroda (Fujitsu) wrote: > > Thank you for your analysis! > > > > 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 >

Re: Check lateral references within PHVs for memoize cache keys

2023-07-07 Thread Paul A Jungwirth
On Tue, Jul 4, 2023 at 12:33 AM Richard Guo wrote: > > Rebase the patch on HEAD as cfbot reminds. All of this seems good to me. I can reproduce the problem, tests pass, and the change is sensible as far as I can tell. One adjacent thing I noticed is that when we renamed "Result Cache" to

Re: Add hint message for check_log_destination()

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

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

2023-07-07 Thread Michael Paquier
On Thu, Jul 06, 2023 at 10:09:20AM -0700, Andres Freund wrote: > Well, it adds an exploitation opportunity. If other functions in the extension > reference the original location (explicitly or via search_path), somebody else > can create a function there, which might be called from a more

Re: add non-option reordering to in-tree getopt_long

2023-07-07 Thread Nathan Bossart
I spent some time tidying up the patch and adding a more detailed commit message. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 2525e6aed066fe8eafdaab0d33c8c5df055c7e09 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 7 Jul 2023 20:00:47 -0700 Subject: [PATCH v5

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

2023-07-07 Thread Amit Kapila
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 leftmost index column must be a non-expression. So, how about:

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-07-07 Thread John Naylor
On Fri, Jul 7, 2023 at 2:19 PM Masahiko Sawada wrote: > > On Wed, Jul 5, 2023 at 8:21 PM John Naylor wrote: > > Well, it's going to be a bit of a mess until I can demonstrate it working (and working well) with bitmap heap scan. Fixing that now is just going to create conflicts. I do have a

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-07-07 Thread Thomas Munro
On Fri, Jul 7, 2023 at 4:57 AM Jacob Champion wrote: > On Wed, Jul 5, 2023 at 3:07 PM Thomas Munro wrote: > > BTW I will happily do the epoll->kqueue port work if necessary. > > And I will happily take you up on that; thanks! Some initial hacking, about 2 coffees' worth:

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

2023-07-07 Thread Michael Paquier
On Thu, Jul 06, 2023 at 06:41:49PM +0200, Peter Eisentraut wrote: > 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

Re: DecodeInterval fixes

2023-07-07 Thread Tom Lane
Jacob Champion writes: > Hi Joe, here's a partial review: > On Sun, Apr 9, 2023 at 5:44 PM Joseph Koshakow wrote: >> 1) Removes dead code for handling unit type RESERVE. > Looks good. From a quick skim it looks like the ECPG copy of this code > (ecpg/pgtypeslib/interval.c) might need to be

Re: MERGE ... RETURNING

2023-07-07 Thread Dean Rasheed
On Thu, 6 Jul 2023 at 06:13, Gurjeet Singh wrote: > > Most of the review was done with the v6 of the patch, minus the doc > build step. The additional changes in v7 of the patch were eyeballed, > and tested with `make check`. > Thanks for the review! > > One minor annoyance is that, due to the

Re: check_strxfrm_bug()

2023-07-07 Thread Thomas Munro
On Sat, Jul 8, 2023 at 8:52 AM Tristan Partin wrote: > Should you wrap the two _l function replacements in HAVE_USELOCALE > instead of WIN32? I find that more confusing, and I'm also not sure if HAVE_USELOCALE is even going to survive (based on your nearby thread). I mean, by the usual criteria

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-07-07 Thread Andrey Chudnovsky
Thanks Jacob for making progress on this. > 3) Is the current conn->async_auth() entry point sufficient for an > application to implement the Microsoft flows discussed upthread? Please confirm my understanding of the flow is correct: 1. Client calls PQconnectStart. - The client doesn't know

Re: check_strxfrm_bug()

2023-07-07 Thread Tristan Partin
On Fri Jul 7, 2023 at 3:30 PM CDT, Thomas Munro wrote: > On Fri, Jul 7, 2023 at 4:20 AM Peter Eisentraut wrote: > > I think the correct solution is to set HAVE_MBSTOWCS_L in Solution.pm. > > Compare HAVE_FSEEKO, which is set in Solution.pm with fseeko being > > defined in win32_port.h. > > In

Re: check_strxfrm_bug()

2023-07-07 Thread Thomas Munro
On Fri, Jul 7, 2023 at 4:20 AM Peter Eisentraut wrote: > I think the correct solution is to set HAVE_MBSTOWCS_L in Solution.pm. > Compare HAVE_FSEEKO, which is set in Solution.pm with fseeko being > defined in win32_port.h. In this version I have it in there, but set it to undef. This way

Re: 010_database.pl fails on openbsd w/ LC_ALL=LANG=C

2023-07-07 Thread Jeff Davis
On Sat, 2023-07-08 at 07:04 +1200, Thomas Munro wrote: > Doesn't look too hopeful: https://man.openbsd.org/setlocale.3 Hmm. I could try using a bogus encoding, but that may be too clever. I'll just remove the test. Regards, Jeff Davis

Re: 010_database.pl fails on openbsd w/ LC_ALL=LANG=C

2023-07-07 Thread Thomas Munro
On Sat, Jul 8, 2023 at 3:52 AM Jeff Davis wrote: > The test is assuming that locale "@colStrength=primary" is valid for > ICU but invalid for libc. It seems that on that platform, setlocale() > is accepting it? > > If some libc implementations are too permissive, I might need to just > disable

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-07-07 Thread Jacob Champion
On Thu, Jul 6, 2023 at 1:48 PM Thomas Munro wrote: > On Fri, Jul 7, 2023 at 4:57 AM Jacob Champion wrote: > > Something analogous to libcurl's socket and timeout callbacks [1], > > then? Or is there an existing libpq API you were thinking about using? > > Yeah. Libpq already has an event

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-07-07 Thread Nathan Bossart
On Fri, Jul 07, 2023 at 09:57:10AM -0700, Nathan Bossart wrote: > Yeah, I guess I should just revert it in both. Given your fix will > hopefully be committed soon, I was hoping to avoid reverting and > un-reverting in quick succession to prevent affecting git-blame too much. > > I found an

Re: Standardize type of variable when extending Buffers

2023-07-07 Thread Gurjeet Singh
On Fri, Jul 7, 2023 at 6:12 AM Ranier Vilela wrote: > > Hi, > > This has already been discussed in [1]. > But I thought it best to start a new thread. > > The commit 31966b1 introduced the infrastructure to extend > buffers. > But the patch mixed types with int and uint32. > The correct type of

Re: PATCH: Using BRIN indexes for sorted output

2023-07-07 Thread Tomas Vondra
Hi, I finally had time to look at this patch again. There's a bit of bitrot, so here's a rebased version (no other changes). [more comments inline] On 2/27/23 16:40, Matthias van de Meent wrote: > Hi, > > On Thu, 23 Feb 2023 at 17:44, Matthias van de Meent > wrote: >> >> I'll see to further

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

2023-07-07 Thread Akshat Jaimini
The patch looks fine and passes all the tests. I am using Arch Linux on an x86_64 system. The patch does not cause any unnecessary bugs and does not make any non trivial changes to the source code. I believe it is ready to be committed! The new status of this patch is: Ready for Committer

Re: [17] CREATE COLLATION default provider

2023-07-07 Thread Gurjeet Singh
On Fri, Jul 7, 2023 at 9:33 AM Jeff Davis wrote: > > On Sat, 2023-06-17 at 09:09 -0700, Gurjeet Singh wrote: > > The docs for the CREATE COLLATION option 'locale' say: "This is a > > shortcut for setting LC_COLLATE and LC_CTYPE at once." > > > > So it's not intuitive why the check does not

Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs

2023-07-07 Thread Daniel Verite
Tom Lane wrote: > This gives me several "-Wincompatible-pointer-types" warnings > [...] > I think what you probably ought to do to avoid all that is to change > the arguments of PrintQueryResult and nearby routines to be "const > PGresult *result" not just "PGresult *result". The

Re: HOT readme missing documentation on summarizing index handling

2023-07-07 Thread Matthias van de Meent
On Fri, 7 Jul 2023 at 19:06, Tomas Vondra wrote: > > On 7/7/23 18:34, Matthias van de Meent wrote: > > On Fri, 7 Jul 2023 at 00:14, Tomas Vondra > > wrote: > >> The original text was really about on/off, and I'm not quite sure the > >> part about "exception" makes this very clear. > > > >

Re: HOT readme missing documentation on summarizing index handling

2023-07-07 Thread Tomas Vondra
On 7/7/23 18:34, Matthias van de Meent wrote: > On Fri, 7 Jul 2023 at 00:14, Tomas Vondra > wrote: >> >> Yeah, README.HOT should have been updated, and I see no reason not to >> backpatch this to v16. Barring objections, I'll do that tomorrow. >> >> I have two suggesting regarding the README.HOT

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-07-07 Thread Nathan Bossart
On Fri, Jul 07, 2023 at 09:22:22AM -0700, Jeff Davis wrote: > On Thu, 2023-07-06 at 22:14 -0700, Nathan Bossart wrote: >> Since we are only reverting from v16, the REL_16_STABLE catversion >> will be >> bumped ahead of the one on master. > > I don't object to you doing it this way, but FWIW, I'd

Re: DecodeInterval fixes

2023-07-07 Thread Jacob Champion
Hi Joe, here's a partial review: On Sun, Apr 9, 2023 at 5:44 PM Joseph Koshakow wrote: > 1) Removes dead code for handling unit type RESERVE. Looks good. From a quick skim it looks like the ECPG copy of this code (ecpg/pgtypeslib/interval.c) might need to be updated as well? > 2) Restrict the

Re: HOT readme missing documentation on summarizing index handling

2023-07-07 Thread Matthias van de Meent
On Fri, 7 Jul 2023 at 00:14, Tomas Vondra wrote: > > Yeah, README.HOT should have been updated, and I see no reason not to > backpatch this to v16. Barring objections, I'll do that tomorrow. > > I have two suggesting regarding the README.HOT changes: > > 1) I'm not entirely sure it's very clear

Re: [17] CREATE COLLATION default provider

2023-07-07 Thread Jeff Davis
On Sat, 2023-06-17 at 09:09 -0700, Gurjeet Singh wrote: > The docs for the CREATE COLLATION option 'locale' say: "This is a > shortcut for setting LC_COLLATE and LC_CTYPE at once." > > So it's not intuitive why the check does not include a test for the > presence of 'localeEl', as well? If we

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-07-07 Thread Jeff Davis
On Thu, 2023-07-06 at 22:14 -0700, Nathan Bossart wrote: > Since we are only reverting from v16, the REL_16_STABLE catversion > will be > bumped ahead of the one on master. I don't object to you doing it this way, but FWIW, I'd just revert in both branches to avoid this kind of weirdness. Also

Re: ICU locale validation / canonicalization

2023-07-07 Thread Jeff Davis
On Sat, 2023-07-01 at 10:31 -0700, Noah Misch wrote: > As of commit b8c3f6d, InstallCheck-C got daticulocale=en-US-u-va- > posix.  Check > got daticulocale=NULL. With the same test setup, that locale takes about 8.6 seconds (opening it 10M times), about 2.5X slower than "en-US" and about 7X

Re: Issue attaching a table to a partitioned table with an auto-referenced foreign key

2023-07-07 Thread Jehan-Guillaume de Rorthais
So I gave a look at this one... And it's a tricky one. The current policy about DETACHing a partition is to keep/adjust all FK referencing it or referenced by it. However, in this exact self-referencing usecase, we can have rows referencing rows from the same partition OR another one. It seems

Re: 010_database.pl fails on openbsd w/ LC_ALL=LANG=C

2023-07-07 Thread Jeff Davis
On Sun, 2023-07-02 at 09:56 -0700, Andres Freund wrote: > # expected: anything else > [07:25:06.424](0.001s) not ok 7 - ICU-specific locale must be > specified with ICU_LOCALE: error message > [07:25:06.424](0.001s) #   Failed test 'ICU-specific locale must be > specified with ICU_LOCALE:

Re: Fix search_path for all maintenance commands

2023-07-07 Thread Jeff Davis
Hi, On Thu, 2023-07-06 at 23:22 -0400, Isaac Morland wrote: > Maybe pg_upgrade could apply "SET search_path TO pg_catalog, pg_temp" > to any function used in a functional index that doesn't have a > search_path setting of its own? I don't think we want to go down the road of trying to solve this

Re: Implement missing join selectivity estimation for range types

2023-07-07 Thread Schoemans Maxime
Hi, Thank you for picking up this patch. > The patch doesn't apply to the current postgres version. Could you please update it? Indeed, the code was initially written on pg15. You can find attached a new version of the patch that can be applied on the current master branch of postgres.

Re: Unlogged relations and WAL-logging

2023-07-07 Thread Heikki Linnakangas
On 28/01/2022 15:57, Robert Haas wrote: On Thu, Jan 27, 2022 at 2:32 PM Heikki Linnakangas wrote: Unlogged relations are not WAL-logged, but creating the init-fork is. There are a few things around that seem sloppy: 1. In index_build(), we do this: */ if

Re: CHECK Constraint Deferrable

2023-07-07 Thread David G. Johnston
On Friday, July 7, 2023, Himanshu Upadhyaya wrote: > I can think of one scenario, as below > > 1) any department should have an employee > 2)any employee should be assigned to a department > so, the employee table has a FK to the department table, and another check > constraint should be added

Re: CHECK Constraint Deferrable

2023-07-07 Thread Himanshu Upadhyaya
I can think of one scenario, as below 1) any department should have an employee 2)any employee should be assigned to a department so, the employee table has a FK to the department table, and another check constraint should be added to the department table to ensure there should be one/more

Re: pg_upgrade instructions involving "rsync --size-only" might lead to standby corruption?

2023-07-07 Thread Stephen Frost
Greetings, * Nikolay Samokhvalov (n...@postgres.ai) wrote: > On Fri, Jun 30, 2023 at 14:33 Bruce Momjian wrote: > > On Fri, Jun 30, 2023 at 04:16:31PM -0400, Robert Haas wrote: > > > I'm not quite clear on how Nikolay got into trouble here. I don't > > > think I understand under exactly what

RE: UUID v7

2023-07-07 Thread Kyzer Davis (kydavis)
Great discussions group, > I think it would be reasonable to review this patch now. I am happy to review the format and logic for any proposed v7 and/or v8 UUID. Just point me to a PR or some code review location. > Distributed UUID Generation" states that "node ID" is there to decrease > the

Standardize type of variable when extending Buffers

2023-07-07 Thread Ranier Vilela
Hi, This has already been discussed in [1]. But I thought it best to start a new thread. The commit 31966b1 introduced the infrastructure to extend buffers. But the patch mixed types with int and uint32. The

Re: benchmark results comparing versions 15.2 and 16

2023-07-07 Thread Alexander Lakhin
Hello David, 11.05.2023 16:00, Alexander Lakhin wrote: Yeah, I see. It's also interesting to me, which tests perform better after that commit. It takes several hours to run all tests, so I can't present results quickly, but I'll try to collect this information next week. To my regret, I could

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

2023-07-07 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thanks for reviewing. PSA new version. I planned to post new version after supporting more indexes, but it may take more time. So I want to address comments from you once. > == > src/backend/executor/execReplication.c > > 1. get_equal_strategy_number > > +/* > + * Return the

Re: pg_upgrade and cross-library upgrades

2023-07-07 Thread Daniel Gustafsson
> On 6 Jul 2023, at 02:19, Michael Paquier wrote: > On Wed, Jul 05, 2023 at 07:03:56AM -0400, Tom Lane wrote: >> Not entirely sure this is worth the effort. > > I am not sure either.. I can't see off the cuff that it would bring better test coverage or find bugs relative to the effort of

Re: Disabling Heap-Only Tuples

2023-07-07 Thread Ants Aasma
On Fri, 7 Jul 2023 at 13:18, Tomas Vondra wrote: > On 7/7/23 11:55, Matthias van de Meent wrote: > > On Fri, 7 Jul 2023 at 06:53, Dilip Kumar wrote: > >> > >> On Fri, Jul 7, 2023 at 1:48 AM Matthias van de Meent > >> wrote: > >>> > >>> On Wed, 5 Jul 2023 at 19:55, Thom Brown wrote: > >

Re: remaining sql/json patches

2023-07-07 Thread Alvaro Herrera
Looking at 0001 now. I noticed that it adds JSON, JSON_SCALAR and JSON_SERIALIZE as reserved keywords to doc/src/sgml/keywords/sql2016-02-reserved.txt; but those keywords do not appear in the 2016 standard as reserved. I see that those keywords appear as reserved in sql2023-02-reserved.txt, so I

gcc -Wclobbered in PostgresMain

2023-07-07 Thread Sergey Shinderuk
Hi, hackers! While analyzing -Wclobbered warnings from gcc we found a true one in PostgresMain(): postgres.c: In function ‘PostgresMain’: postgres.c:4118:25: warning: variable ‘idle_in_transaction_timeout_enabled’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered] 4118 | bool

Re: DROP DATABASE is interruptible

2023-07-07 Thread Daniel Gustafsson
> On 25 Jun 2023, at 19:03, Andres Freund wrote: > On 2023-06-21 12:02:04 -0700, Andres Freund wrote: >> I'm hacking on this bugfix again, This patch LGTM from reading through and testing (manually and with your supplied tests in the patch), I think this is a sound approach to deal with this.

Re: UUID v7

2023-07-07 Thread Andrey M. Borodin
> On 6 Jul 2023, at 21:38, Peter Eisentraut > wrote: > > I think it would be reasonable to review this patch now. +1. 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

Re: remaining sql/json patches

2023-07-07 Thread Amit Langote
On Fri, Jul 7, 2023 at 8:31 PM Peter Eisentraut wrote: > 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

Re: CHECK Constraint Deferrable

2023-07-07 Thread Dilip Kumar
On Wed, Jul 5, 2023 at 3:08 PM Himanshu Upadhyaya wrote: > > Hi, > > Currently, there is no support for CHECK constraint DEFERRABLE in a create > table statement. > SQL standard specifies that CHECK constraint can be defined as DEFERRABLE. I think this is a valid argument that this is part of

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

Re: Add hint message for check_log_destination()

2023-07-07 Thread Japin Li
On Fri, 07 Jul 2023 at 16:21, Masahiko Sawada wrote: > On Fri, Jul 7, 2023 at 4:53 PM Japin Li wrote: >> >> >> On Fri, 07 Jul 2023 at 14:46, jian he wrote: >> > On Fri, Jul 7, 2023 at 1:06 PM Japin Li wrote: >> >> >> >> >> >> Hi, hackers >> >> >> >> When I try to change log_destination using

Re: Disabling Heap-Only Tuples

2023-07-07 Thread Thom Brown
On Thu, 6 Jul 2023 at 21:18, Matthias van de Meent wrote: > > On Wed, 5 Jul 2023 at 19:55, Thom Brown wrote: > > > > On Wed, 5 Jul 2023 at 18:05, Matthias van de Meent > > wrote: > > > So what were you thinking of? A session GUC? A table option? > > > > Both. > > Here's a small patch

Re: [PATCH] Add support function for containment operators

2023-07-07 Thread Laurenz Albe
I wrote: > You implement both "SupportRequestIndexCondition" and > "SupportRequestSimplify", > but when I experimented, the former was never called.  That does not > surprise me, since any expression of the shape "expr <@ range constant" > can be simplified.  Is the "SupportRequestIndexCondition"

Re: Disabling Heap-Only Tuples

2023-07-07 Thread Laurenz Albe
On Fri, 2023-07-07 at 16:27 +0530, Dilip Kumar wrote: > On Fri, Jul 7, 2023 at 3:48 PM Tomas Vondra > wrote: > > I'm imagining either a table option with a couple possible values > > (default, non-hot, first-page, ...) or maybe something even more > > elaborate (perhaps even a callback?). > > >

Re: Disabling Heap-Only Tuples

2023-07-07 Thread Dilip Kumar
On Fri, Jul 7, 2023 at 3:48 PM Tomas Vondra wrote: > > On 7/7/23 11:55, Matthias van de Meent wrote: > > On Fri, 7 Jul 2023 at 06:53, Dilip Kumar wrote: > >> > >> On Fri, Jul 7, 2023 at 1:48 AM Matthias van de Meent > >> wrote: > >>> > >>> On Wed, 5 Jul 2023 at 19:55, Thom Brown wrote: >

Re: Disabling Heap-Only Tuples

2023-07-07 Thread Tomas Vondra
On 7/7/23 11:55, Matthias van de Meent wrote: > On Fri, 7 Jul 2023 at 06:53, Dilip Kumar wrote: >> >> On Fri, Jul 7, 2023 at 1:48 AM Matthias van de Meent >> wrote: >>> >>> On Wed, 5 Jul 2023 at 19:55, Thom Brown wrote: On Wed, 5 Jul 2023 at 18:05, Matthias van de Meent

Re: [feature]COPY FROM enable FORCE_NULL/FORCE_NOT_NULL on all columns

2023-07-07 Thread Damir Belyalov
Hello! The patch does not work for the current version of postgres, it needs to be updated. I tested your patch. Everything looks simple and works well. There is a suggestion to simplify the code: instead of using if (cstate->opts.force_notnull_all) { int i; for(i = 0; i < num_phys_attrs; i++)

Re: Disabling Heap-Only Tuples

2023-07-07 Thread Matthias van de Meent
On Fri, 7 Jul 2023 at 06:53, Dilip Kumar wrote: > > On Fri, Jul 7, 2023 at 1:48 AM Matthias van de Meent > wrote: > > > > On Wed, 5 Jul 2023 at 19:55, Thom Brown wrote: > > > > > > On Wed, 5 Jul 2023 at 18:05, Matthias van de Meent > > > wrote: > > > > So what were you thinking of? A session

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

2023-07-07 Thread Peter Smith
Hi. Here are some review comments for the patch v16-0001 == Commit message. 1. Also; most of the code shared by both worker types are already combined in LogicalRepApplyLoop(). There is no need to combine the rest in ApplyWorkerMain() anymore. ~ /are already/is already/ /Also;/Also,/ ~~~

RE: Initial Schema Sync for Logical Replication

2023-07-07 Thread Kumar, Sachin
> From: Masahiko Sawada > So I've implemented a different approach; doing schema synchronization at a > CREATE SUBSCRIPTION time. The backend executing CREATE SUBSCRIPTION > uses pg_dump and restores the table schemas including both partitioned tables > and their partitions regardless of

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2023-07-07 Thread Yugo NAGATA
On Fri, 7 Jul 2023 17:21:36 +0900 Yugo NAGATA wrote: > Hi Nikita, > > On Wed, 5 Jul 2023 17:49:20 +0300 > Nikita Malakhov wrote: > > > Hi! > > > > I like the idea of having a standard function which shows a TOAST value ID > > for a row. I've used my own to handle TOAST errors. Just, maybe,

Re: Add hint message for check_log_destination()

2023-07-07 Thread Masahiko Sawada
On Fri, Jul 7, 2023 at 4:53 PM Japin Li wrote: > > > On Fri, 07 Jul 2023 at 14:46, jian he wrote: > > On Fri, Jul 7, 2023 at 1:06 PM Japin Li wrote: > >> > >> > >> Hi, hackers > >> > >> When I try to change log_destination using ALTER SYSTEM with the wrong > >> value, > >> it complains of the

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2023-07-07 Thread Yugo NAGATA
Hi Nikita, On Wed, 5 Jul 2023 17:49:20 +0300 Nikita Malakhov wrote: > Hi! > > I like the idea of having a standard function which shows a TOAST value ID > for a row. I've used my own to handle TOAST errors. Just, maybe, more > correct > name would be "...value_id", because you actually

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

2023-07-07 Thread Alena Rybakina
Hi! Thank you for your detailed review, your changes have greatly helped to improve this patch. On 06.07.2023 13:20, Andrey Lepikhov wrote: On 6/7/2023 03:06, Alena Rybakina wrote: I corrected this constant in the patch. The patch don't apply cleanly: it contains some trailing spaces. I

Re: Implement missing join selectivity estimation for range types

2023-07-07 Thread Damir Belyalov
Hello! Thank you for the patch, very interesting article. The patch doesn't apply to the current postgres version. Could you please update it? Regards, Damir Belyalov, Postgres Professional

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

2023-07-07 Thread Masahiko Sawada
On Fri, Jul 7, 2023 at 10:55 AM Peter Smith wrote: > > Hi, Here are my review comments for patch v2. > > == > 1. doc/src/sgml/logical-replication.sgml > > Candidate indexes must be btree, non-partial, and have at least one > column reference to the published table column at the leftmost

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

2023-07-07 Thread Hayato Kuroda (Fujitsu)
Dear Önder, Thank you for your analysis! > 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

Re: Add hint message for check_log_destination()

2023-07-07 Thread Japin Li
On Fri, 07 Jul 2023 at 14:46, jian he wrote: > On Fri, Jul 7, 2023 at 1:06 PM Japin Li wrote: >> >> >> Hi, hackers >> >> When I try to change log_destination using ALTER SYSTEM with the wrong value, >> it complains of the "Unrecognized key word" without available values. This >> patch tries to

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-07-07 Thread Masahiko Sawada
On Wed, Jul 5, 2023 at 8:21 PM John Naylor wrote: > > On Tue, Jul 4, 2023 at 12:49 PM Masahiko Sawada wrote: > > > > As you mentioned, the 1-byte value is embedded into 8 byte so 7 bytes > > are unused, but we use less memory since we use less slab contexts and > > save fragmentations. > >

Re: Initial Schema Sync for Logical Replication

2023-07-07 Thread Masahiko Sawada
On Wed, Jul 5, 2023 at 11:14 AM Masahiko Sawada wrote: > > On Mon, Jun 19, 2023 at 5:29 PM Peter Smith wrote: > > > > Hi, > > > > Below are my review comments for the PoC patch 0001. > > > > In addition, the patch needed rebasing, and, after I rebased it > > locally in my private environment

Re: Add hint message for check_log_destination()

2023-07-07 Thread jian he
On Fri, Jul 7, 2023 at 1:06 PM Japin Li wrote: > > > Hi, hackers > > When I try to change log_destination using ALTER SYSTEM with the wrong value, > it complains of the "Unrecognized key word" without available values. This > patch tries to add a hint message that provides available values for >