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. > > > +

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 i

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 > diff

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 > PgS

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

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. -- Dani

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." > >

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 denie

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 ha

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

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 w

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 prese

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); > + schemarel

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 > shared_preload_li

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 confusing.

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 REORDE

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 Hou-s

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 sav

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 th

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

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: > > > == > src/include/catalog/pg_proc.dat > > 4. > +{ oid => '6119', > + descr => 'get information of the tables in the given publication array', > > Should that be worded in a way to make it more clear that the > "publication array" is real

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

2023-03-20 Thread Matthias van de Meent
On Mon, 20 Mar 2023 at 11:11, Tomas Vondra wrote: > > 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 th

Re: server log inflates due to pg_logical_slot_peek_changes/pg_logical_slot_get_changes calls

2023-03-20 Thread Ashutosh Bapat
On Sun, Mar 19, 2023 at 4:59 PM Jeevan Ladhe wrote: > > Hi, > > I observed absurd behaviour while using pg_logical_slot_peek_changes() > and pg_logical_slot_get_changes(). Whenever any of these two functions > are called to read the changes using a decoder plugin, the following > messages are prin

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

2023-03-20 Thread Josef Šimánek
po 20. 3. 2023 v 11:24 odesílatel Matthias van de Meent napsal: > > On Mon, 20 Mar 2023 at 11:11, Tomas Vondra > wrote: > > > > 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 cha

Re: meson documentation build open issues

2023-03-20 Thread Peter Eisentraut
On 20.03.23 03:33, Andres Freund wrote: I did end up getting stuck when hacking on this, and ended up adding css support for nochunk and support for the website style for htmlhelp and nochunk, as well as obsoleting the need for copying the css files... But perhaps that's a bit too much. Updated

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-03-20 Thread Drouvot, Bertrand
Hi, On 3/20/23 12:43 AM, Michael Paquier wrote: At the end, documenting both still sounds like the best move to me. Agree. Please find attached v1-0001-pg_stat_get_xact_blocks_fetched-and_hit-doc.patch doing so. I did not put the exact same wording as the one being removed in ddfc2d9, as:

Re: Allow logical replication to copy tables in binary format

2023-03-20 Thread Melih Mutlu
Hi, Please see the attached patch. vignesh C , 18 Mar 2023 Cmt, 12:03 tarihinde şunu yazdı: > On Fri, 17 Mar 2023 at 17:55, Melih Mutlu wrote: > 1) Currently we refer the link to the beginning of create subscription > page, this can be changed to refer to binary option contents in create > subs

Re: logical decoding and replication of sequences, take 2

2023-03-20 Thread Amit Kapila
On Mon, Mar 20, 2023 at 1:49 PM Tomas Vondra wrote: > > > 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: > > ... > > >>>

Re: server log inflates due to pg_logical_slot_peek_changes/pg_logical_slot_get_changes calls

2023-03-20 Thread Jeevan Ladhe
Thanks, Ashutosh for the reply. I think those messages are useful when debugging logical replication > problems (imagine missing transaction or inconsistent data between > publisher and subscriber). I don't think pg_logical_slot_get_changes() > or pg_logical_slot_peek_changes() are expected to be

Re: logical decoding and replication of sequences, take 2

2023-03-20 Thread Tomas Vondra
On 3/20/23 12:00, Amit Kapila wrote: > On Mon, Mar 20, 2023 at 1:49 PM Tomas Vondra > wrote: >> >> >> 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

Re: allow_in_place_tablespaces vs. pg_basebackup

2023-03-20 Thread Robert Haas
On Thu, Mar 9, 2023 at 4:15 PM Robert Haas wrote: > Now that I'm done grumbling, here's a patch. Anyone want to comment on this? -- Robert Haas EDB: http://www.enterprisedb.com

Question: Do we have a rule to use "PostgreSQL" and "PostgreSQL" separately?

2023-03-20 Thread Hayato Kuroda (Fujitsu)
Dear hackers, While checking documentations, I found that one line notes our product as "PostgreSQL", whereas another line notes as just "PostgreSQL". For example, in bgworker.sgml: ``` PostgreSQL can be extended to run user-supplied code in separate processes. ... These processes are attached to

Re: logical decoding and replication of sequences, take 2

2023-03-20 Thread Amit Kapila
On Mon, Mar 20, 2023 at 5:13 PM Tomas Vondra wrote: > > On 3/20/23 12:00, Amit Kapila wrote: > > On Mon, Mar 20, 2023 at 1:49 PM Tomas Vondra > > wrote: > >> > >> > >> I don't understand why we'd need WAL from before the slot is created, > >> which happens before copy_sequence so the sync will se

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

2023-03-20 Thread John Naylor
On Mon, Mar 20, 2023 at 12:25 PM Masahiko Sawada wrote: > > On Fri, Mar 17, 2023 at 4:49 PM Masahiko Sawada wrote: > > > > On Fri, Mar 17, 2023 at 4:03 PM John Naylor > > wrote: > > > > > > On Wed, Mar 15, 2023 at 9:32 AM Masahiko Sawada wrote: > > > > > > > > On Tue, Mar 14, 2023 at 8:27 PM Jo

RE: Initial Schema Sync for Logical Replication

2023-03-20 Thread Kumar, Sachin
Hi Amit, > From: Amit Kapila > > > Hi, > > > > > > I have a couple of questions. > > > > > > Q1. > > > > > > What happens if the subscriber already has some tables present? For > > > example, I did not see the post saying anything like "Only if the > > > table does not already exist then it will

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

2023-03-20 Thread Amit Kapila
On Mon, Mar 20, 2023 at 2:58 PM Önder Kalacı wrote: > > > I applied all patches for all the versions, and re-run the subscription tests, > all looks good to me. > LGTM. I'll push this tomorrow unless there are more comments. -- With Regards, Amit Kapila.

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

2023-03-20 Thread Hayato Kuroda (Fujitsu)
Dear Wang, I have tested about multilevel partitions, and it worked well. Followings are my comments for v18-0001. 01. pg_get_publication_tables ``` + ListCell *lc; ``` This definition can be inside of the "for (i = 0; i < nelems; i++)". 02. pg_get_publication_tables ``` -

Re: Kerberos delegation support in libpq and postgres_fdw

2023-03-20 Thread Stephen Frost
Greetings, * Stephen Frost (sfr...@snowman.net) wrote: > * Michael Paquier (mich...@paquier.xyz) wrote: > > On Mon, Sep 19, 2022 at 02:05:39PM -0700, Jacob Champion wrote: > > > It's not prevented, because a password is being used. In my tests I'm > > > connecting as an unprivileged user. > > > >

Re: Memory leak from ExecutorState context?

2023-03-20 Thread Jehan-Guillaume de Rorthais
On Mon, 20 Mar 2023 09:32:17 +0100 Tomas Vondra wrote: > >> * Patch 1 could be rebased/applied/backpatched > > > > Would it help if I rebase Patch 1 ("move BufFile stuff into separate > > context")? > > Yeah, I think this is something we'd want to do. It doesn't change the > behavior, but it

Re: Commitfest 2023-03 starting tomorrow!

2023-03-20 Thread Greg Stark
The next level of this would be something like notifying the committer with a list of patches in the CF that a commit broke. I don't immediately see how to integrate that with our workflow but I have seen something like this work well in a previous job. When committing code you often went and updat

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

2023-03-20 Thread Tom Lane
Michael Paquier writes: > 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 r

Re: Question: Do we have a rule to use "PostgreSQL" and "PostgreSQL" separately?

2023-03-20 Thread Tom Lane
"Hayato Kuroda (Fujitsu)" writes: > While checking documentations, I found that one line notes our product as > "PostgreSQL", whereas another line notes as just > "PostgreSQL". IMO the convention is to use the tag everywhere that we spell out "PostgreSQL". I don't think it's actually rendered d

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

2023-03-20 Thread Masahiko Sawada
On Mon, Mar 20, 2023 at 9:34 PM John Naylor wrote: > > > On Mon, Mar 20, 2023 at 12:25 PM Masahiko Sawada > wrote: > > > > On Fri, Mar 17, 2023 at 4:49 PM Masahiko Sawada > > wrote: > > > > > > On Fri, Mar 17, 2023 at 4:03 PM John Naylor > > > wrote: > > > > > > > > On Wed, Mar 15, 2023 at 9:

Re: Save a few bytes in pg_attribute

2023-03-20 Thread Tom Lane
Peter Eisentraut writes: > 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 po

Re: Question: Do we have a rule to use "PostgreSQL" and "PostgreSQL" separately?

2023-03-20 Thread Daniel Gustafsson
> On 20 Mar 2023, at 15:31, Tom Lane wrote: > > "Hayato Kuroda (Fujitsu)" writes: >> While checking documentations, I found that one line notes our product as >> "PostgreSQL", whereas another line notes as just >> "PostgreSQL". > > IMO the convention is to use the tag everywhere that we > spel

Re: explain analyze rows=%.0f

2023-03-20 Thread Gregory Stark (as CFM)
On Wed, 4 Jan 2023 at 10:05, Ibrar Ahmed wrote: > > Thanks, I have modified everything as suggested, except one point > > > Don't use variable format strings. They're hard to read and they > > probably defeat compile-time checks that the arguments match the > > format string. You could use a "*" f

Re: Allow parallel plan for referential integrity checks?

2023-03-20 Thread Gregory Stark (as CFM)
On Mon, 12 Dec 2022 at 11:37, Frédéric Yhuel wrote: > > I've planned to work on it full time on week 10 (6-10 March), if you > agree to bear with me. The idea would be to bootstrap my brain on it, > and then continue to work on it from time to time. Any updates on this patch? Should we move it to

Re: Implement missing join selectivity estimation for range types

2023-03-20 Thread Schoemans Maxime
Hi Tomas, As a quick update, the paper related to this work has finally been published in Mathematics (https://www.mdpi.com/2227-7390/11/6/1383). During revision we also added a figure showing a comparison of our algorithm vs the existing algorithms in Oracle, SQL Server, MySQL and PostgreSQL, w

Re: Allow parallel plan for referential integrity checks?

2023-03-20 Thread Frédéric Yhuel
On 3/20/23 15:58, Gregory Stark (as CFM) wrote: On Mon, 12 Dec 2022 at 11:37, Frédéric Yhuel wrote: I've planned to work on it full time on week 10 (6-10 March), if you agree to bear with me. The idea would be to bootstrap my brain on it, and then continue to work on it from time to time.

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-03-20 Thread Maxim Orlov
Hi! As suggested before by Heikki Linnakangas, I've added a patch for making 2PC transaction state 64-bit. At first, my intention was to rebuild all twophase interface to use FullTransactionId. But doing this in a proper manner would lead to switching from TransactionId to FullTransactionId in PGP

Re: Add SHELL_EXIT_CODE to psql

2023-03-20 Thread Maxim Orlov
I did a look at the patch, and it seems to be in a good condition. It implements declared functionality with no visible defects. As for test, I think it is possible to implement "signals" case in tap tests. But let the actual commiter decide does it worth it or not. -- Best regards, Maxim Orlov.

Fix typo plgsql to plpgsql.

2023-03-20 Thread Zhang Mingli
Hi, all Found several typos like plgsql, I think it should be plpgsql. Regards, Zhang Mingli 0001-Fix-typo-plgsql-to-plpgsql.patch Description: Binary data

Re: postgres_fdw, dblink, and CREATE SUBSCRIPTION security

2023-03-20 Thread Robert Haas
On Fri, Mar 10, 2023 at 7:00 PM Jacob Champion wrote: > On Thu, Mar 9, 2023 at 6:17 AM Robert Haas wrote: > > That seems like a circular argument. If you call the problem the > > confused deputy problem then the issue must indeed be that the deputy > > is confused, and needs to talk to someone el

Re: Add SHELL_EXIT_CODE to psql

2023-03-20 Thread Tom Lane
Corey Huinker writes: > 128+N is implemented. I think this mostly looks OK, but: * I still say there is no basis whatever for believing that the result of ferror() is an exit code, errno code, or anything else with significance beyond zero-or-not. Feeding it to wait_result_to_exit_code as you'v

Re: logical decoding and replication of sequences, take 2

2023-03-20 Thread Tomas Vondra
On 3/20/23 13:26, Amit Kapila wrote: > On Mon, Mar 20, 2023 at 5:13 PM Tomas Vondra > wrote: >> >> On 3/20/23 12:00, Amit Kapila wrote: >>> On Mon, Mar 20, 2023 at 1:49 PM Tomas Vondra >>> wrote: I don't understand why we'd need WAL from before the slot is created, which ha

Re: Request for comment on setting binary format output per session

2023-03-20 Thread Jeff Davis
On Mon, 2023-03-13 at 16:33 -0400, Dave Cramer wrote: > Attached is a preliminary patch that takes a list of OID's. I'd like > to know if this is going in the right direction. I found a few issues: 1. Some kind of memory error: SET format_binary='25,1082,1184'; WARNING: problem in alloc set

Re: meson documentation build open issues

2023-03-20 Thread Andres Freund
Hi, On 2023-03-20 11:58:08 +0100, Peter Eisentraut wrote: > Oh, this patch set grew quite quickly. ;-) Yep :) > [PATCH v2 5/8] docs: html: copy images to output as part of xslt build > > Making the XSLT stylesheets do the copying has some appeal. I think it > would only work for SVG (or other

Re: real/float example for testlibpq3

2023-03-20 Thread Gregory Stark (as CFM)
On Mon, 23 Jan 2023 at 11:54, Mark Wong wrote: fficient way to communicate useful information. > > Yeah, I will try to cover all the data types we ship. :) I'll keep at > it and drop the code examples. I assume this isn't going to happen for this commitfest? If you think it is then shout otherwi

Re: [PATCH] Fix alter subscription concurrency errors

2023-03-20 Thread Gregory Stark (as CFM)
On Mon, 16 Jan 2023 at 09:47, vignesh C wrote: > > Jeite, please post an updated version with the fixes. As CommitFest > 2023-01 is currently underway, this would be an excellent time to > update the patch. Hm. This patch is still waiting on updates. But it's a bug fix and it would be good to get

Re: Save a few bytes in pg_attribute

2023-03-20 Thread Tomas Vondra
On 3/20/23 15:37, Tom Lane wrote: > Peter Eisentraut writes: >> 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 reor

Re: Error "initial slot snapshot too large" in create replication slot

2023-03-20 Thread Gregory Stark (as CFM)
On Wed, 12 Oct 2022 at 01:10, Michael Paquier wrote: > > On Tue, Sep 13, 2022 at 05:31:05PM +0900, Kyotaro Horiguchi wrote: > > And ExportSnapshot repalces oversized subxip with overflowed. > > > > So even when GetSnapshotData() returns a snapshot with oversized > > subxip, it is saved as just "ov

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

2023-03-20 Thread Jacob Champion
On Fri, Mar 17, 2023 at 9:45 PM Amit Kapila wrote: > > There are a bunch of moving parts and hidden subtleties here, and I fell > > into a few traps when I was working on my patch, so it'd be nice to have > > additional coverage. I'm happy to contribute effort in that area if it's > > helpful. > >

Re: Fix order of checking ICU options in initdb and create database

2023-03-20 Thread Gregory Stark (as CFM)
Is this feedback enough to focus the work on the right things? I feel like Marina Polyakova pointed out some real confusing behaviour and perhaps there's a way to solve them by focusing on one at a time without making large changes in the code. Perhaps an idea would be to have each module provide

Re: [PATCH] Fix alter subscription concurrency errors

2023-03-20 Thread Tom Lane
"Gregory Stark (as CFM)" writes: > Hm. This patch is still waiting on updates. But it's a bug fix and it > would be good to get this in. Is someone else interested in finishing > this if Jeite isn't available? I think the patch as-submitted is pretty uninteresting, mainly because the design of ad

Re: Save a few bytes in pg_attribute

2023-03-20 Thread Tom Lane
Tomas Vondra writes: > IMHO it'd be much better to just not store the statistics target for > attributes that have it default (which we now identify by -1), or for > system attributes (where we store 0). I'd bet vast majority of systems > will just use the default / GUC value. So if we're interest

Re: Make ON_ERROR_STOP stop on shell script failure

2023-03-20 Thread Greg Stark
So I took a look at this patch. The conflict is with 2fe3bdbd691 committed by Peter Eisentraut which added error checks for pipes. Afaics the behaviour is now for pipe commands returning non-zero to cause an error *always* regardless of the setting of ON_ERROR_STOP. I'm not entirely sure that's se

Re: Make ON_ERROR_STOP stop on shell script failure

2023-03-20 Thread Gregory Stark (as CFM)
Pruning bouncing email address -- please respond from this point in thread, not previous messages. -- Gregory Stark As Commitfest Manager

Re: Request for comment on setting binary format output per session

2023-03-20 Thread Dave Cramer
+Paul Ramsey On Mon, 20 Mar 2023 at 13:05, Jeff Davis wrote: > On Mon, 2023-03-13 at 16:33 -0400, Dave Cramer wrote: > > Attached is a preliminary patch that takes a list of OID's. I'd like > > to know if this is going in the right direction. > > Thanks for the review. I'm curious what system yo

Re: Make ON_ERROR_STOP stop on shell script failure

2023-03-20 Thread Gregory Stark (as CFM)
On Mon, 20 Mar 2023 at 14:34, Gregory Stark (as CFM) wrote: > > Pruning bouncing email address -- please respond from this point in > thread, not previous messages. Oh for heaven's sake. Trying again to prune bouncing email address. Please respond from *here* on the thread Sorry -- Gregory

Re: Request for comment on setting binary format output per session

2023-03-20 Thread Jeff Davis
On Mon, 2023-03-20 at 10:04 -0700, Jeff Davis wrote: >   CREATE TABLE a(d date, t timestamptz); >   SET format_binary='25,1082,1184'; >   SELECT * FROM a; >    d | t >   ---+--- >    ! | >   (1 row) Oops, missing the following statement after the CREATE TABLE: INSERT INTO a VALUES('1234-01-01

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-03-20 Thread Gregory Stark (as CFM)
On Sun, 29 Jan 2023 at 05:20, Mikhail Gribkov wrote: > > The problem is obviously in the newly added second line of the following > clause: > COMPLETE_WITH("ALTER COLUMN", "OWNER TO", "RENAME", > "SET SCHEMA", "SET (", "RESET ("); > > "set

Re: doc: add missing "id" attributes to extension packaging page

2023-03-20 Thread Gregory Stark (as CFM)
On Thu, 26 Jan 2023 at 15:55, Brar Piening wrote: > > On 18.01.2023 at 06:50, Brar Piening wrote: > > > I'll give it a proper look this weekend. > > It turns out I didn't get a round tuit. > > ... and I'm afraid I probably will not be able to work on this until > mid/end February so we'll have to

Re: Eliminating SPI from RI triggers - take 2

2023-03-20 Thread Gregory Stark (as CFM)
On Mon, 17 Oct 2022 at 14:59, Robert Haas wrote: > > On Sat, Oct 15, 2022 at 1:47 AM Amit Langote wrote: > > But I think the bigger problem for this patch set is that the > design-level feedback from > https://www.postgresql.org/message-id/CA%2BTgmoaiTNj4DgQy42OT9JmTTP1NWcMV%2Bke0i%3D%2Ba7%3DVgnz

Re: Request for comment on setting binary format output per session

2023-03-20 Thread Tom Lane
Dave Cramer writes: > On Mon, 20 Mar 2023 at 13:05, Jeff Davis wrote: >> 2. Easy to confuse psql: >> >> CREATE TABLE a(d date, t timestamptz); >> SET format_binary='25,1082,1184'; >> SELECT * FROM a; >> d | t >> ---+--- >> ! | >> (1 row) >> >> Well I'm guessing psql doesn't know how to read dat

Re: Request for comment on setting binary format output per session

2023-03-20 Thread Jeff Davis
On Mon, 2023-03-20 at 14:36 -0400, Dave Cramer wrote: > Thanks for the review. I'm curious what system you are running on as > I don't see any of these errors.  Are asserts enabled? > Well I'm guessing psql doesn't know how to read date or timestamptz > in binary. This is not a failing of the cod

Re: meson documentation build open issues

2023-03-20 Thread Andres Freund
Hi, On 2023-03-19 19:33:38 -0700, Andres Freund wrote: > I think we can make the docs build in parallel and incrementally, by building > the different parts of the docs in parallel, using --stringparam rootid, > e.g. building each 'part' separately. > > A very very rough draft attached: > > para

Re: pg_stats and range statistics

2023-03-20 Thread Gregory Stark (as CFM)
On Sun, 22 Jan 2023 at 18:22, Tomas Vondra wrote: > > I wonder if we have other functions doing something similar, i.e. > accepting a polymorphic type and then imposing additional restrictions > on it. Meh, there's things like array comparison functions that require both arguments to be the same

Re: [PATCH] Add initial xid/mxid/mxoff to initdb

2023-03-20 Thread Gregory Stark (as CFM)
On Fri, 25 Nov 2022 at 07:22, Peter Eisentraut wrote: > > Just for completeness, over in the other thread the feedback was that > this functionality is better put into pg_resetwal. So is that other thread tracked in a different commitfest entry and this one completely redundant? I'll mark it Reje

Re: [PATCH] Introduce array_shuffle() and array_sample()

2023-03-20 Thread Gregory Stark (as CFM)
On Thu, 29 Sept 2022 at 15:34, Tom Lane wrote: > > Martin Kalcher writes: > > New patch: array_shuffle() and array_sample() use pg_global_prng_state now. > > I took a closer look at the patch today. I find this behavior a bit > surprising: > It looks like this patch received useful feedback and

Re: Save a few bytes in pg_attribute

2023-03-20 Thread David Rowley
On Mon, 20 Mar 2023, 11:00 pm Peter Eisentraut, wrote: > 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 sav

Re: pg_stats and range statistics

2023-03-20 Thread Egor Rogov
On 20.03.2023 22:27, Gregory Stark (as CFM) wrote: On Sun, 22 Jan 2023 at 18:22, Tomas Vondra wrote: I wonder if we have other functions doing something similar, i.e. accepting a polymorphic type and then imposing additional restrictions on it. Meh, there's things like array comparison functio

Re: Optimizing Node Files Support

2023-03-20 Thread Gregory Stark (as CFM)
I think it's clear we aren't going to be taking this patch in its current form. Perhaps there are better ways to do what these files do (I sure think there are!) but I don't think microoptimizing the copying is something people are super excited about. It sounds like rethinking how to make these fu

Re: Inconsistency in reporting checkpointer stats

2023-03-20 Thread Gregory Stark (as CFM)
On Sun, 19 Feb 2023 at 04:58, Nitin Jadhav wrote: > > > This doesn't pass the tests, because the regression tests weren't adjusted: > > https://api.cirrus-ci.com/v1/artifact/task/5937624817336320/testrun/build/testrun/regress/regress/regression.diffs > > Thanks for sharing this. I have fixed this

Re: [PATCH] Add <> support to sepgsql_restorecon

2023-03-20 Thread Gregory Stark (as CFM)
> Ok, sounds reasonable. Maybe just add a comment to that effect. > This needs regression test support for the feature and some minimal > documentation that shows how to make use of it. Hm. It sounds like this patch is uncontroversial but is missing documentation and tests? Has this been address

Re: Commitfest 2023-03 starting tomorrow!

2023-03-20 Thread Thomas Munro
On Tue, Mar 21, 2023 at 3:15 AM Greg Stark wrote: > The next level of this would be something like notifying the committer > with a list of patches in the CF that a commit broke. I don't > immediately see how to integrate that with our workflow but I have > seen something like this work well in a

Re: [PATCH] Add <> support to sepgsql_restorecon

2023-03-20 Thread Ted Toth
Not this month unfortunately other work has taken precedence. I'll need to look at what it's going to take to create a test. Hopefully I can piggyback on an existing test. Ted On Mon, Mar 20, 2023 at 3:05 PM Gregory Stark (as CFM) wrote: > > Ok, sounds reasonable. Maybe just add a comment to th

Re: Add SHELL_EXIT_CODE to psql

2023-03-20 Thread Corey Huinker
On Mon, Mar 20, 2023 at 1:01 PM Tom Lane wrote: > Corey Huinker writes: > > 128+N is implemented. > > I think this mostly looks OK, but: > > * I still say there is no basis whatever for believing that the result > of ferror() is an exit code, errno code, or anything else with > significance beyo

Re: Commitfest 2023-03 starting tomorrow!

2023-03-20 Thread Greg Stark
On Mon, 20 Mar 2023 at 16:08, Thomas Munro wrote: > > On Tue, Mar 21, 2023 at 3:15 AM Greg Stark wrote: > > The next level of this would be something like notifying the committer > > with a list of patches in the CF that a commit broke. I don't > > immediately see how to integrate that with our w

Re: Experiments with Postgres and SSL

2023-03-20 Thread Greg Stark
Here's a first cut at ALPN support. Currently it's using a hard coded "Postgres/3.0" protocol (hard coded both in the client and the server...). And it's hard coded to be required for direct connections and supported but not required for regular connections. IIRC I put a variable labeled a "GUC"

Re: Commitfest 2023-03 starting tomorrow!

2023-03-20 Thread Thomas Munro
On Tue, Mar 21, 2023 at 9:22 AM Greg Stark wrote: > Yeah, even aside from flappers there's the problem that it's about as > common for real commits to break some test as it is for patches to > start failing tests. So often it's a real failure but it's nothing to > do with the patch, it has to do w

Re: Experiments with Postgres and SSL

2023-03-20 Thread Greg Stark
Sorry, checking the cfbot apparently I had a typo in the #ifndef USE_SSL case. From 4b6e01c7f569a919d660cd80ce64cb913bc9f220 Mon Sep 17 00:00:00 2001 From: Greg Stark Date: Mon, 20 Mar 2023 14:09:30 -0400 Subject: [PATCH v4 4/4] alpn support --- src/backend/libpq/be-secure-openssl.c| 65

Adjust Memoize hit_ratio calculation

2023-03-20 Thread David Rowley
Yesterday, in 785f70957, I adjusted the Memoize costing code to account for the size of the cache key when estimating how many cache entries can exist at once in the cache. That effectively makes Memoize a less likely choice as fewer entries will be expected to fit in work_mem now. Because that's

Re: Add LZ4 compression in pg_dump

2023-03-20 Thread Tomas Vondra
Hi, I was preparing to get the 3 cleanup patches pushed, so I updated/reworded the commit messages a bit (attached, please check). But I noticed the commit message for 0001 said: In passing save the appropriate errno in LZ4File_open_write in case that the caller is not using the API's get_er

Re: [BUG] pg_stat_statements and extended query protocol

2023-03-20 Thread Imseih (AWS), Sami
Sorry about the delay in response about this. I was thinking about this and it seems to me we can avoid adding new fields to Estate. I think a better place to track rows and calls is in the Instrumentation struct. --- a/src/include/executor/instrument.h +++ b/src/include/executor/instrument.h @@

Re: [PATCH] Fix alter subscription concurrency errors

2023-03-20 Thread Jelte Fennema
> "Gregory Stark (as CFM)" writes: > > Hm. This patch is still waiting on updates. But it's a bug fix and it > > would be good to get this in. Is someone else interested in finishing > > this if Jeite isn't available? > > I think the patch as-submitted is pretty uninteresting, mainly because the >

Re: Add LZ4 compression in pg_dump

2023-03-20 Thread Justin Pryzby
On Fri, Mar 17, 2023 at 03:43:58PM +, gkokola...@pm.me wrote: > From a174cdff4ec8aad59f5bcc7e8d52218a14fe56fc Mon Sep 17 00:00:00 2001 > From: Georgios Kokolatos > Date: Fri, 17 Mar 2023 14:45:58 + > Subject: [PATCH v3 1/3] Improve type handling in pg_dump's compress file API > -int > +bo

Re: Ability to reference other extensions by schema in extension scripts

2023-03-20 Thread Tom Lane
Sandro Santilli writes: > On Mon, Mar 13, 2023 at 05:57:57PM -0400, Regina Obe wrote: >> Attached is a slightly revised patch to fix the extra whitespace in the >> extend.gml document that Sandro noted to me. > Thanks Regina. > I've tested attached patch (md5 0b652a8271fc7e71ed5f712ac162a0ef) > a

  1   2   >