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

2023-03-20 Thread John Naylor
On Mon, Mar 20, 2023 at 9:34 PM Masahiko Sawada wrote: > > On Mon, Mar 20, 2023 at 9:34 PM John Naylor > wrote: > > That's an interesting idea, and the analogous behavior to aset could be a good thing for readability and maintainability. Worth seeing if it's workable. > > I've attached a quick

Re: Eliminating SPI from RI triggers - take 2

2023-03-20 Thread Amit Langote
Hi Greg, On Tue, Mar 21, 2023 at 3:54 AM Gregory Stark (as CFM) wrote: > On Mon, 17 Oct 2022 at 14:59, Robert Haas wrote: > > But I think the bigger problem for this patch set is that the > > design-level feedback from > >

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

2023-03-20 Thread Pavel Luzanov
I would suggest tweaking the test output to include regress_du_admin ... I found (with a help of cfbot) difficulty with this. The problem is the bootstrap superuser name (oid=10). This name depends on the OS username. In my case it's pal, but in most cases it's postgres or something else. And

Re: Track IO times in pg_stat_io

2023-03-20 Thread Andres Freund
Hi, On 2023-03-16 17:19:16 -0400, Melanie Plageman wrote: > > > > I wonder if we should get rid of pgStatBlockReadTime, > > > > pgStatBlockWriteTime, > > > > > > And then have pg_stat_reset_shared('io') reset pg_stat_database IO > > > stats? > > > > Yes. > > I think this makes sense but I am

Re: Assertion failure with barriers in parallel hash join

2023-03-20 Thread Thomas Munro
Pushed and back-patched, with minor comment tweaks. Apologies for taking so long.

Re: Initial Schema Sync for Logical Replication

2023-03-20 Thread Euler Taveira
On Mon, Mar 20, 2023, at 10:10 PM, Kumar, Sachin wrote: > > From: Alvaro Herrera > > Subject: RE: [EXTERNAL]Initial Schema Sync for Logical Replication > > On 2023-Mar-15, Kumar, Sachin wrote: > > > > > 1. In CreateSubscription() when we create replication > > > slot(walrcv_create_slot()),

Re: Allow logical replication to copy tables in binary format

2023-03-20 Thread Peter Smith
Here are my review comments for v18-0001 == doc/src/sgml/logical-replication.sgml 1. + target table. However, logical replication in binary format is more + restrictive. See the binary option of + CREATE SUBSCRIPTION + for details. Because you've changed the linkend to be the

Re: Fix typo plgsql to plpgsql.

2023-03-20 Thread Michael Paquier
On Tue, Mar 21, 2023 at 09:04:32AM +0800, Richard Guo wrote: > +1. I believe these are typos. And a grep search shows that all typos of > this kind are addressed by the patch. Yes, you are right. The comments fixed here are related to plpgsql. Will fix.. -- Michael signature.asc Description:

RE: Initial Schema Sync for Logical Replication

2023-03-20 Thread Kumar, Sachin
Hi Alvaro, > From: Alvaro Herrera > Subject: RE: [EXTERNAL]Initial Schema Sync for Logical Replication > On 2023-Mar-15, Kumar, Sachin wrote: > > > 1. In CreateSubscription() when we create replication > > slot(walrcv_create_slot()), should use CRS_EXPORT_SNAPSHOT, So that we > can use this

Re: [BUG] pg_stat_statements and extended query protocol

2023-03-20 Thread Michael Paquier
On Mon, Mar 20, 2023 at 09:41:12PM +, Imseih (AWS), Sami wrote: > 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. > > If this is more palatable, I can prepare the patch.

Re: Fix typo plgsql to plpgsql.

2023-03-20 Thread Richard Guo
On Tue, Mar 21, 2023 at 12:26 AM Zhang Mingli wrote: > Found several typos like plgsql, I think it should be plpgsql. > +1. I believe these are typos. And a grep search shows that all typos of this kind are addressed by the patch. Thanks Richard

Re: Question about pull_up_sublinks_qual_recurse

2023-03-20 Thread Andy Fan
On Sat, Oct 15, 2022 at 3:27 AM Tom Lane wrote: > Andy Fan writes: > > After some more self review, I find my proposal has the following side > > effects. > > Yeah, I do not think this works at all. The discussion of outer join > reordering in optimizer/README says that that doesn't

Re: Save a few bytes in pg_attribute

2023-03-20 Thread Andres Freund
Hi, On 2023-03-20 11:00:12 +0100, 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

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

2023-03-20 Thread Dave Cramer
On Mon, 20 Mar 2023 at 15:09, Jeff Davis wrote: > 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

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

2023-03-20 Thread Michael Paquier
On Mon, Mar 20, 2023 at 10:21:28AM -0400, Tom Lane wrote: > Is similar knowledge missing in the meson build files? src/backend/nodes/meson.build and src/include/nodes/meson.build are the two meson files that have the knowledge about the files generated by gen_node_support.pl, and the query

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

2023-03-20 Thread Dave Cramer
Dave Cramer On Mon, 20 Mar 2023 at 15:09, Tom Lane wrote: > 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 > >>

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

2023-03-20 Thread Dave Cramer
On Mon, 20 Mar 2023 at 19:10, Merlin Moncure wrote: > > > On Mon, Mar 13, 2023 at 3:33 PM Dave Cramer wrote: > >> >> Dave Cramer >> >> >> On Sat, 4 Mar 2023 at 19:39, Dave Cramer wrote: >> >>> >>> >>> On Sat, 4 Mar 2023 at 19:06, Tom Lane wrote: >>> Jeff Davis writes: > On Sat,

Re: Add pg_walinspect function with block info columns

2023-03-20 Thread Peter Geoghegan
On Mon, Mar 20, 2023 at 4:51 PM Peter Geoghegan wrote: > The new pg_get_wal_block_info outputs columns in an order that doesn't > seem like the most useful possible order to me. This gives us another > reason to have separate GetWALRecordInfo and GetWALBlockInfo utility > functions rather than

Re: Add pg_walinspect function with block info columns

2023-03-20 Thread Peter Geoghegan
On Mon, Mar 20, 2023 at 4:34 PM Peter Geoghegan wrote: > I agree. A little redundancy is better when the alternative is fragile > code, and I'm pretty sure that that applies here -- there won't be > very many duplicated lines, and the final code will be significantly > clearer. There can be a

Re: Save a few bytes in pg_attribute

2023-03-20 Thread Tom Lane
Andres Freund writes: > On 2023-03-20 10:37:36 -0400, Tom Lane wrote: >> I agree that attinhcount could be narrowed, but I have some concern >> about attstattarget. IIRC, the limit on attstattarget was once 1000 >> and then we raised it to 1. Is it inconceivable that we might >> want to

Re: Save a few bytes in pg_attribute

2023-03-20 Thread Andres Freund
Hi, On 2023-03-20 10:37:36 -0400, Tom Lane wrote: > I agree that attinhcount could be narrowed, but I have some concern > about attstattarget. IIRC, the limit on attstattarget was once 1000 > and then we raised it to 1. Is it inconceivable that we might > want to raise it to 10 someday?

Re: Add pg_walinspect function with block info columns

2023-03-20 Thread Peter Geoghegan
On Sun, Mar 19, 2023 at 8:21 PM Kyotaro Horiguchi wrote: > The documentation has just one section titled "General Functions" > which directly contains detailed explation of four functions, making > it hard to get clear understanding of the available functions. I > considered breaking it down

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

2023-03-20 Thread Merlin Moncure
On Mon, Mar 13, 2023 at 3:33 PM Dave Cramer wrote: > > Dave Cramer > > > On Sat, 4 Mar 2023 at 19:39, Dave Cramer wrote: > >> >> >> On Sat, 4 Mar 2023 at 19:06, Tom Lane wrote: >> >>> Jeff Davis writes: >>> > On Sat, 2023-03-04 at 18:04 -0500, Dave Cramer wrote: >>> >> Most of the clients

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

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 >

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 >

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: [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 ("); > >

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 >

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >