Re: Ignoring BRIN for HOT updates (was: -udpates seems broken)

2023-03-20 Thread Tomas Vondra
On 3/14/23 15:41, Matthias van de Meent wrote: > On Tue, 14 Mar 2023 at 14:49, Tomas Vondra > wrote: >> >>> ... > >> If you agree with these changes, I'll get it committed. > > Yes, thanks! > I've tweaked the patch per the last round of comments, cleaned up the commit message a bit (it still

Save a few bytes in pg_attribute

2023-03-20 Thread Peter Eisentraut
After the discussion in [0] ff., I was looking around in pg_attribute and noticed that we could possibly save 4 bytes. We could change both attstattarget and attinhcount from int4 to int2, which together with some reordering would save 4 bytes from the fixed portion. attstattarget is already

Re: Timeline ID hexadecimal format

2023-03-20 Thread Sébastien Lardière
On 20/03/2023 09:17, Peter Eisentraut wrote: I have committed the two documentation changes, with some minor adjustments. Thank you, On 07.03.23 18:14, Sébastien Lardière wrote: Maybe this could be fixed instead? Indeed, and strtoul is probably a better option than sscanf, don't you

Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

2023-03-20 Thread Önder Kalacı
Hi Shi Yu, all Thanks for updating the patches. It seems you forgot to attach the patches > of > dropped columns for HEAD and pg15, I think they are the same as v2. > > Yes, it seems I forgot. And, yes they were the same as v2. > On HEAD, we can re-use clusters in other test cases, which can

RE: Simplify some codes in pgoutput

2023-03-20 Thread houzj.f...@fujitsu.com
On Friday, March 17, 2023 11:49 AM Peter Smith wrote: > > On Wed, Mar 15, 2023 at 7:30 PM houzj.f...@fujitsu.com > wrote: > > > > Hi, > > > > I noticed that there are some duplicated codes in pgoutput_change() > > function which can be simplified, and here is an attempt to do that. > > Hi

RE: Simplify some codes in pgoutput

2023-03-20 Thread houzj.f...@fujitsu.com
On Thursday, March 16, 2023 12:30 PM Amit Kapila wrote: > > On Wed, Mar 15, 2023 at 2:00 PM houzj.f...@fujitsu.com > wrote: > > > > I noticed that there are some duplicated codes in pgoutput_change() > function > > which can be simplified, and here is an attempt to do that. > > > > For

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-20 Thread Drouvot, Bertrand
Hi, On 3/20/23 8:32 AM, Michael Paquier wrote: /* Total time previously charged to function, as of function start */ - instr_time save_f_total_time; + instr_time save_total_time; I have something to say about this one, though.. I find this change a bit

Re: Fix misplaced shared_preload_libraries_in_progress check in few extensions

2023-03-20 Thread Kyotaro Horiguchi
At Sat, 18 Mar 2023 10:26:42 +0530, Bharath Rupireddy wrote in > Hi, > > I'm attaching a patch to do $subject in autoprewarm.c and worker_spi > extensions. The way it is right now doesn't hurt anyone, but why to > fail after defining custom GUCs if we aren't loading them via >

Re: Data is copied twice when specifying both child and parent table in publication

2023-03-20 Thread Amit Kapila
On Mon, Mar 20, 2023 at 1:02 PM Peter Smith wrote: > > > 2. pg_get_publication_tables > > + else > + { > + List*relids, > +*schemarelids; > + > + relids = GetPublicationRelations(pub_elem->oid, > + pub_elem->pubviaroot ? > + PUBLICATION_PART_ROOT : > + PUBLICATION_PART_LEAF); > +

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

2023-03-20 Thread Pavel Luzanov
On 10.03.2023 15:06, Pavel Luzanov wrote: I missed the comment at the beginning of the file about version 9.2. I will return the version check for rolbypassrls. +         +        Shown within each row, in newline-separated format, are the memberships granted to +        the role.  The

Re: Memory leak from ExecutorState context?

2023-03-20 Thread Tomas Vondra
On 3/19/23 20:31, Justin Pryzby wrote: > On Fri, Mar 17, 2023 at 05:41:11PM +0100, Tomas Vondra wrote: * Patch 2 is worth considering to backpatch >> >> I'm not quite sure what exactly are the numbered patches, as some of the >> threads had a number of different patch ideas, and I'm not sure

Re: Exclusion constraints on partitioned tables

2023-03-20 Thread Ronan Dunklau
Le vendredi 17 mars 2023, 17:03:09 CET Paul Jungwirth a écrit : > I added the code about RTEqualStrategyNumber because that's what we need > to find an equals operator when the index is GiST (except if it's using > an opclass from btree_gist; then it needs to be BTEqual again). But then > I

Re: logical decoding and replication of sequences, take 2

2023-03-20 Thread Tomas Vondra
On 3/20/23 04:42, Amit Kapila wrote: > On Sat, Mar 18, 2023 at 8:49 PM Tomas Vondra > wrote: >> >> On 3/18/23 06:35, Amit Kapila wrote: >>> On Sat, Mar 18, 2023 at 3:13 AM Tomas Vondra >>> wrote: ... Clearly, for sequences we can't quite rely on snapshots/slots, we need

Re: Timeline ID hexadecimal format

2023-03-20 Thread Peter Eisentraut
I have committed the two documentation changes, with some minor adjustments. On 07.03.23 18:14, Sébastien Lardière wrote: Maybe this could be fixed instead? Indeed, and strtoul is probably a better option than sscanf, don't you think ? Yeah, the use of sscanf() is kind of weird here.  We

About a recently-added permission-related error message

2023-03-20 Thread Kyotaro Horiguchi
I found an error message added by de4d456b406bf502341ef526710d3f764b41e2c8. When I incorrectly configured the primary_conninfo with the wrong user, I received the following message on the server logs of both servers involved in a physical replcation set. [27022:walsender] FATAL: permission

Re: Missing rules for queryjumblefuncs.{funcs,switch}.c for maintainer-clean

2023-03-20 Thread Richard Guo
On Mon, Mar 20, 2023 at 3:49 PM Daniel Gustafsson wrote: > > On 20 Mar 2023, at 08:46, Michael Paquier wrote: > > How about removing the "fout/five" entirely here > > and make that simpler? I would propose: > > "For some classes of node types, you don't need all the support > > functions." > >

Re: Missing rules for queryjumblefuncs.{funcs,switch}.c for maintainer-clean

2023-03-20 Thread Daniel Gustafsson
> On 20 Mar 2023, at 08:46, Michael Paquier wrote: > How about removing the "fout/five" entirely here > and make that simpler? I would propose: > "For some classes of node types, you don't need all the support > functions." Yes please, keeping such counts in sync is always error-prone. --

Re: Missing rules for queryjumblefuncs.{funcs,switch}.c for maintainer-clean

2023-03-20 Thread Michael Paquier
On Mon, Mar 20, 2023 at 03:18:17PM +0800, Richard Guo wrote: > A minor comment for the README is that now we have five support > functions not four. > > - outcome. (For some classes of node types, you don't need all four support > + outcome. (For some classes of node types, you don't need all

Re: Data is copied twice when specifying both child and parent table in publication

2023-03-20 Thread Peter Smith
Here are some review comments for v17-0001. == src/backend/catalog/pg_publication.c 1. filter_partitions -static List * -filter_partitions(List *relids) +static void +filter_partitions(List *table_infos) { - List*result = NIL; ListCell *lc; - ListCell *lc2; - foreach(lc, relids)

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-20 Thread Michael Paquier
On Thu, Jan 12, 2023 at 10:07:33AM -0800, Andres Freund wrote: > The problem with that is that the prefixes are used completely inconsistently > - and have been for a long time. And not just between the different type of > stats. Compare e.g. PgStat_TableCounts with PgStat_TableXactStatus and >

RE: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

2023-03-20 Thread shiy.f...@fujitsu.com
On Fri, Mar 17, 2023 11:29 PM Önder Kalacı wrote: > > Thanks for sharing. Fixed > > > This time I was able to run all the tests with all the patches applied. > > Again, the generated column fix also has some minor differences > per version. So, overall we have 6 patches with very minor >

Re: Missing rules for queryjumblefuncs.{funcs,switch}.c for maintainer-clean

2023-03-20 Thread Richard Guo
On Mon, Mar 20, 2023 at 2:43 PM Michael Paquier wrote: > Nathan has reported to me offlist that maintainer-clean was not doing > its job for the files generated by gen_node_support.pl in > src/backend/nodes/ for the query jumbling. Attached is a patch to > take care of this issue. > > While on

Re: proposal: possibility to read dumped table's name from file

2023-03-20 Thread Pavel Stehule
ne 19. 3. 2023 v 15:01 odesílatel Justin Pryzby napsal: > On Thu, Mar 16, 2023 at 01:05:41PM +0100, Pavel Stehule wrote: > > rebase + enhancing about related option from a563c24 > > Thanks. > > It looks like this doesn't currently handle extensions, which were added > at 6568cef26e. > > > +

Missing rules for queryjumblefuncs.{funcs,switch}.c for maintainer-clean

2023-03-20 Thread Michael Paquier
Hi all, Nathan has reported to me offlist that maintainer-clean was not doing its job for the files generated by gen_node_support.pl in src/backend/nodes/ for the query jumbling. Attached is a patch to take care of this issue. While on it, I have found a comment in the related README that was

Re: Add macros for ReorderBufferTXN toptxn

2023-03-20 Thread Peter Smith
On Sat, Mar 18, 2023 at 8:47 AM Peter Smith wrote: > > The build-farm was OK for the last 18hrs after this push, except there > was one error on mamba [1] in test-decoding-check. > > This patch did change the test_decoding.c file, so it seems an > unlikely coincidence, but OTOH the change was

Re: RADIUS tests and improvements

2023-03-20 Thread Michael Paquier
On Sat, Mar 04, 2023 at 02:23:10PM +1300, Thomas Munro wrote: > I don't exactly love the PG_TRY()/PG_CATCH() around the > CHECK_FOR_INTERRUPTS(). > In fact this kind of CFI-with-cleanup problem > has been haunting me across several projects. For cases that memory > contexts and resource owners

Re: An oversight in ExecInitAgg for grouping sets

2023-03-20 Thread Richard Guo
On Mon, Jan 9, 2023 at 5:21 PM David Rowley wrote: > On Thu, 5 Jan 2023 at 20:06, Richard Guo wrote: > > I reviewed this patch and have some comments. > > Thanks for looking at this. I think I've fixed all the issues you > mentioned. > > One extra thing I noticed was that I had to add a new >

Re: Privileges on PUBLICATION

2023-03-20 Thread Peter Eisentraut
On 14.03.23 19:30, Gregory Stark (as CFM) wrote: FYI this looks like it needs a rebase due to a conflict in copy.c and an offset in pgoutput.c. Is there anything specific that still needs review or do you think you've handled all Peter's concerns? In particular, is there "a comprehensive

Re: BF mamba failure

2023-03-20 Thread Peter Smith
On Sun, Mar 19, 2023 at 2:00 AM Alexander Lakhin wrote: > > Hi, > > 18.03.2023 07:26, Tom Lane wrote: > > Amit Kapila writes: > > Peter Smith has recently reported a BF failure [1]. AFAICS, the call > stack of failure [2] is as follows: > > Note the assertion report a few lines further up: > >

<    1   2