Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-27 Thread Michael Paquier
On Mon, Mar 27, 2023 at 08:54:13AM +0200, Drouvot, Bertrand wrote: > Yes, something like V1 up-thread was doing. I think it can be added with your > current proposal. Sure, I can write that. Or perhaps you'd prefer write something yourself? -- Michael signature.asc Description: PGP signature

Re: Add pg_walinspect function with block info columns

2023-03-27 Thread Bharath Rupireddy
On Mon, Mar 27, 2023 at 9:49 AM Michael Paquier wrote: > > On Sat, Mar 25, 2023 at 12:12:50PM +0900, Michael Paquier wrote: > > I don't see any need to move this block of code? This leads to > > unnecessary diffs, potentially making backpatch a bit harder. Either > > way is not a big deal, still

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

2023-03-27 Thread Peter Smith
I looked at v24-0001. == src/test/subscription/t/028_row_filter.pl +# Check expected replicated rows for tap_pub_parent_sync and +# tap_pub_child_sync +# Since the option publish_via_partition_root of tap_pub_parent_sync is true, +# so the row filter of tap_pub_parent_sync will be used: +# ta

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-27 Thread Drouvot, Bertrand
On 3/27/23 9:23 AM, Michael Paquier wrote: On Mon, Mar 27, 2023 at 08:54:13AM +0200, Drouvot, Bertrand wrote: Yes, something like V1 up-thread was doing. I think it can be added with your current proposal. Sure, I can write that. Or perhaps you'd prefer write something yourself? Please f

Parallel plan cost

2023-03-27 Thread Konstantin Knizhnik
Hi hackers, I wonder why while calculating cost of parallel scan we divide by parallel_divisor only CPU run cost, but not storage access cost? So we do not take in account that reading pages is also performed in parallel. Actually I observed strange behavior when increasing work_mem disables p

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Julien Rouhaud
Hi, On Wed, Feb 08, 2023 at 05:18:13PM -0500, Tom Lane wrote: > I pushed the discussed documentation improvements, and changed the > behavior of "ninja docs" to only build the HTML docs. However, > I've not done anything about documenting what is the minimum > ninja version. FTR the documented X

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Daniel Gustafsson
> On 27 Mar 2023, at 10:24, Julien Rouhaud wrote: > > Hi, > > On Wed, Feb 08, 2023 at 05:18:13PM -0500, Tom Lane wrote: >> I pushed the discussed documentation improvements, and changed the >> behavior of "ninja docs" to only build the HTML docs. However, >> I've not done anything about documen

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Julien Rouhaud
On Mon, Mar 27, 2023 at 10:32:52AM +0200, Daniel Gustafsson wrote: > > On 27 Mar 2023, at 10:24, Julien Rouhaud wrote: > > > > Hi, > > > > On Wed, Feb 08, 2023 at 05:18:13PM -0500, Tom Lane wrote: > >> I pushed the discussed documentation improvements, and changed the > >> behavior of "ninja docs"

Re: pg_upgrade and logical replication

2023-03-27 Thread Julien Rouhaud
Hi, On Thu, Mar 09, 2023 at 04:34:56PM +0800, Julien Rouhaud wrote: > > Yeah I agree. I added support to also preserve the subscription's replication > origin information, a new --preserve-subscription-state (better naming > welcome) > documented option for pg_upgrade to optionally ask for this

RE: PGdoc: add missing ID attribute to create_subscription.sgml

2023-03-27 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for reviewing! New patch set will be attached in later mail. > == > Commit Message > > 1. > In commit ecb696, an XML ID attribute was added to only one varlistentry, > creating inconsistency with the commit 78ee60. This commit adds XML ID > attributes to all varlistentr

RE: PGdoc: add missing ID attribute to create_subscription.sgml

2023-03-27 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for reviewing! PSA new version. > doc/src/sgml/logical-replication.sgml > > 1. > I am not sure your convention to only give the link to the FIRST > reference on a page is good in all case. Maybe that rule is OK for > multiple references all in the same sub-section but when

Re: awkward cancellation of parallel queries on standby.

2023-03-27 Thread Kyotaro Horiguchi
At Sun, 26 Mar 2023 11:12:48 -0400, Jeff Janes wrote in > I don't know if this is actually a problem. It isn't for me as I don't do > this kind of thing outside of testing, but it seems untidy and I can see it > being frustrating from a catch-and-retry perspective and from a log-spam > perspecti

Re: [EXTERNAL] Support load balancing in libpq

2023-03-27 Thread Daniel Gustafsson
> On 17 Mar 2023, at 09:50, Jelte Fennema wrote: > >> The documentation lists the modes disabled and random, but I wonder if it's >> worth expanding the docs to mention that "disabled" is pretty much a round >> robin load balancing scheme? It reads a bit odd to present load balancing >> without

JsonPath version bits

2023-03-27 Thread Nikita Malakhov
Hi hackers! I've got a question on the JsonPath header - currently the header size is 4 bytes, where there are version and mode bits. Is there somewhere a defined size of the version part? There are some extensions working with JsonPath, and we have some too, thus it is important how many bits is

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Daniel Gustafsson
> On 27 Mar 2023, at 10:41, Julien Rouhaud wrote: > On Mon, Mar 27, 2023 at 10:32:52AM +0200, Daniel Gustafsson wrote: >>> On 27 Mar 2023, at 10:24, Julien Rouhaud wrote: >>> FTR the documented XML_CATALOG_FILES environment variable is only valid for >>> Intel based machines, as homebrew install

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-27 Thread Michael Paquier
On Mon, Mar 27, 2023 at 10:11:21AM +0200, Drouvot, Bertrand wrote: > Please find attached V2 adding pg_stat_get_xact_function_total_time() > and pg_stat_get_xact_function_self_time() to the party. The patch has one mistake: PG_STAT_GET_XACT_FUNCENTRY_FLOAT8_MS does not need a slash on its last lin

Re: CREATE INDEX CONCURRENTLY on partitioned index

2023-03-27 Thread Alexander Pyhalov
Justin Pryzby писал 2023-03-26 17:51: On Sun, Dec 04, 2022 at 01:09:35PM -0600, Justin Pryzby wrote: This currently handles partitions with a loop around the whole CIC implementation, which means that things like WaitForLockers() happen once for each index, the same as REINDEX CONCURRENTLY on a

Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

2023-03-27 Thread Alexander Korotkov
Hi! On Fri, Mar 24, 2023 at 3:39 AM Andres Freund wrote: > On 2023-03-23 23:24:19 +0300, Alexander Korotkov wrote: > > On Thu, Mar 23, 2023 at 8:06 PM Andres Freund wrote: > > > I seriously doubt that solving this at the tuple locking level is the > > > right > > > thing. If we want to avoid re

Re: [EXTERNAL] Support load balancing in libpq

2023-03-27 Thread Jelte Fennema
Looks good overall. I attached a new version with a few small changes: > * Changed store_conn_addrinfo to return int like how all the functions > dealing with addrinfo does. Also moved the error reporting to inside > there > where the error happened. I don't feel strong about the int

Re: [EXTERNAL] Support load balancing in libpq

2023-03-27 Thread Daniel Gustafsson
> On 27 Mar 2023, at 13:50, Jelte Fennema wrote: > > Looks good overall. I attached a new version with a few small changes: > >> * Changed store_conn_addrinfo to return int like how all the functions >>dealing with addrinfo does. Also moved the error reporting to inside >> there >>whe

Re: [EXTERNAL] Support load balancing in libpq

2023-03-27 Thread Aleksander Alekseev
Hi, > > ▶ 6/6 - received at least one connection on node1 OK > > ▶ 6/6 - received at least one connection on node2 OK > > ▶ 6/6 - received at least one connection on node3 OK > > ▶ 6/6 - received 50 connections across all nodesOK > > Good point. > > > Finally, I changed a

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Dagfinn Ilmari Mannsåker
Daniel Gustafsson writes: >> On 27 Mar 2023, at 10:41, Julien Rouhaud wrote: >> On Mon, Mar 27, 2023 at 10:32:52AM +0200, Daniel Gustafsson wrote: On 27 Mar 2023, at 10:24, Julien Rouhaud wrote: > FTR the documented XML_CATALOG_FILES environment variable is only valid for Intel b

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Daniel Gustafsson
> On 27 Mar 2023, at 14:04, Dagfinn Ilmari Mannsåker wrote: > Daniel Gustafsson writes: >> Applied with a tiny but of changes to make it look like the rest of the >> paragraph more. Thanks! > > Doesn't this apply to Apple Silicon generally, not just M1? M2 already > exists, and M3 etc. will pre

Re: Support logical replication of DDLs

2023-03-27 Thread Amit Kapila
On Mon, Mar 27, 2023 at 12:07 PM Amit Kapila wrote: > > On Mon, Mar 27, 2023 at 2:52 AM Tom Lane wrote: > > > > > I suggest taking a couple of steps back from the minutiae of the > > patch, and spending some hard effort thinking about how the thing > > would be controlled in a useful fashion (tha

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Julien Rouhaud
On Mon, Mar 27, 2023 at 02:06:34PM +0200, Daniel Gustafsson wrote: > > On 27 Mar 2023, at 14:04, Dagfinn Ilmari Mannsåker > > wrote: > > Daniel Gustafsson writes: > > >> Applied with a tiny but of changes to make it look like the rest of the > >> paragraph more. Thanks! > > > > Doesn't this appl

Re: [EXTERNAL] Support load balancing in libpq

2023-03-27 Thread Aleksander Alekseev
Hi, > So I think it should be: > > ``` > if (conn->addr == NULL && conn->naddr != 0) > ``` > > [...] > > I will take a look at v16 now. The code coverage could be slightly better. In v16-0001: ``` +ret = store_conn_addrinfo(conn, addrlist); +pg_freeaddrinfo_all(hint.ai_family, a

Re: [EXTERNAL] Support load balancing in libpq

2023-03-27 Thread Aleksander Alekseev
Hi, > ``` > +ret = store_conn_addrinfo(conn, addrlist); > +pg_freeaddrinfo_all(hint.ai_family, addrlist); > +if (ret) > +goto error_return;/* message already logged */ > ``` > The goto path is not test-covered. D'oh, this one is fine since store_conn_addrin

facing issues in downloading of packages in pgadmin4

2023-03-27 Thread parth ratra
Hey Everyone, I am Parth Ratra from India majoring in CSE. I have *hands-on experience with HTML/Vanilla CSS/ JS, Reactjs and CI/CD pipelines through various projects. I am proficient in C/C++, Python, and Django* as well. *I am super excited to work with PostgreSQL and would like to contribute

Re: Infinite Interval

2023-03-27 Thread Ashutosh Bapat
On Sat, Mar 25, 2023 at 9:13 PM Joseph Koshakow wrote: > > On Fri, Mar 24, 2023 at 9:43 AM Ashutosh Bapat > wrote: > > > >You don't need to do this, but looks like we can add DAYS_PER_WEEK macro > > and > >use it here. > > I've attached a patch with this new macro. There's probably tons

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-03-27 Thread torikoshia
On 2023-03-23 02:50, Andres Freund wrote: Thanks again for your review. Attached v5 patch. Have you measured whether this has negative performance effects when *NOT* using the new option? I loaded 1000 rows of pgbench_accounts on my laptop and compared the elapsed time. GUCs changed from

Re: cataloguing NOT NULL constraints

2023-03-27 Thread Peter Eisentraut
On 15.03.23 23:44, Alvaro Herrera wrote: Here's v5. I removed the business of renaming constraints in child relations: recursing now just relies on matching column names. Each column has only one NOT NULL constraint; if you try to add another, nothing happens. All in all, this code is pretty s

Re: Memory leak from ExecutorState context?

2023-03-27 Thread Melanie Plageman
On Thu, Mar 23, 2023 at 2:49 PM Tomas Vondra wrote: > > On Mon, Mar 20, 2023 at 10:12 AM Jehan-Guillaume de Rorthais > > wrote: > >> BNJL and/or other considerations are for 17 or even after. In the meantime, > >> Melanie, who authored BNLJ, +1 the balancing patch as it can coexists with > >> ot

Re: facing issues in downloading of packages in pgadmin4

2023-03-27 Thread Bharath Rupireddy
On Mon, Mar 27, 2023 at 7:13 PM parth ratra wrote: > > Hey Everyone, > > I am Parth Ratra from India majoring in CSE. I have hands-on experience with > HTML/Vanilla CSS/ JS, Reactjs and CI/CD pipelines through various projects. I > am proficient in C/C++, Python, and Django as well. > > I am sup

Re: facing issues in downloading of packages in pgadmin4

2023-03-27 Thread parth ratra
Thank you, I will do that. On Mon, Mar 27, 2023 at 7:34 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Mon, Mar 27, 2023 at 7:13 PM parth ratra > wrote: > > > > Hey Everyone, > > > > I am Parth Ratra from India majoring in CSE. I have hands-on experience > with HTML/V

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

2023-03-27 Thread Melanie Plageman
On Wed, Mar 22, 2023 at 6:42 PM Michael Paquier wrote: > > On Wed, Mar 22, 2023 at 02:21:12PM -0400, Melanie Plageman wrote: > > Apologies as I know this docs update has already been committed, but > > buffers fetched and blocks fetched both feel weird to me. If you have a > > cache hit, you don't

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-03-27 Thread Damir Belyalov
Hi! I made the specified changes and my patch turned out the same as yours. The performance measurements were the same too. The only thing left to do is how not to add IGNORE_DATATYPE_ERRORS as a keyword. See how this is done for parameters such as FORCE_NOT_NULL, FORCE_NULL, FORCE_QUOTE. They ar

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Tom Lane
Julien Rouhaud writes: > On Mon, Mar 27, 2023 at 02:06:34PM +0200, Daniel Gustafsson wrote: > On 27 Mar 2023, at 14:04, Dagfinn Ilmari Mannsåker wrote: >>> Doesn't this apply to Apple Silicon generally, not just M1? M2 already >>> exists, and M3 etc. will presumably also appear at some point. The

Re: logical decoding and replication of sequences, take 2

2023-03-27 Thread Tomas Vondra
On 3/27/23 03:32, Masahiko Sawada wrote: > Hi, > > On Fri, Mar 24, 2023 at 7:26 AM Tomas Vondra > wrote: >> >> I merged the earlier "fixup" patches into the relevant parts, and left >> two patches with new tweaks (deducing the corrent "WAL" state from the >> current state read by copy_sequence

Re: [EXTERNAL] Support load balancing in libpq

2023-03-27 Thread Jelte Fennema
> > ``` > > if (conn->addr == NULL && conn->naddr != 0) > > ``` Afaict this is not necessary, since getaddrinfo already returns an error if the host could not be resolved to any addresses. A quick test gives me this error: error: could not translate host name "doesnotexist" to address: Name or ser

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Daniel Gustafsson
> On 27 Mar 2023, at 16:33, Tom Lane wrote: > > Julien Rouhaud writes: >> On Mon, Mar 27, 2023 at 02:06:34PM +0200, Daniel Gustafsson wrote: >> On 27 Mar 2023, at 14:04, Dagfinn Ilmari Mannsåker wrote: Doesn't this apply to Apple Silicon generally, not just M1? M2 already exists,

Re: running logical replication as the subscription owner

2023-03-27 Thread Robert Haas
On Fri, Mar 24, 2023 at 4:11 PM Mark Dilger wrote: > > > Imagine for example that the table > > > owner has a trigger which doesn't sanitize search_path. The > > > subscription owner can potentially leverage that to get the table > > > owner's privileges. > > I don't find that terribly convincing.

Re: [EXTERNAL] Support load balancing in libpq

2023-03-27 Thread Aleksander Alekseev
Hi, > I guess you didn't set up the hostnames in /etc/hosts as described in > 004_load_balance_dns.pl. Then it's expected that the loop body isn't > covered. As discussed upthread, running this test manually is much > more cumbersome than is desirable, but it's still better than not > having the t

Re: zstd compression for pg_dump

2023-03-27 Thread Tomas Vondra
Hi, On 3/17/23 03:43, Tomas Vondra wrote: > > ... > >>> I'm a little suspicious of the replacement of supports_compression() >>> with parse_compress_specification(). For example: >>> - errmsg = supports_compression(AH->compression_spec); - if (errmsg) + parse_compress_specifi

Re: Moving forward with TDE

2023-03-27 Thread Bruce Momjian
On Wed, Mar 8, 2023 at 04:25:04PM -0500, Stephen Frost wrote: > Agreed, though the latest efforts include an option for *authenticated* > encryption as well as unauthenticated. That makes it much more > difficult to make undetected changes to the data that's protected by > the authenticated encry

Re: running logical replication as the subscription owner

2023-03-27 Thread Robert Haas
On Fri, Mar 24, 2023 at 8:02 PM Jeff Davis wrote: > Without a reasonable example, we should probably be on some kind of > path to disallowing crazy stuff in triggers that poses only risks and > no benefits. Not the job of this patch, but perhaps it can be seen as a > step in that direction? Possi

Re: running logical replication as the subscription owner

2023-03-27 Thread Robert Haas
On Sat, Mar 25, 2023 at 12:01 PM Noah Misch wrote: > (One might allow temp > tables by introducing NewTempSchemaNestLevel(), called whenever we call > NewGUCNestLevel(). The transaction would then proceed as though it has no > temp schema, allocating an additional schema if creating a temp object

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

2023-03-27 Thread Brar Piening
On 23.03.2023 at 20:08, Brar Piening wrote: Since the need for ids is starting to grow again (ecb696527c added an id to a varlistentry in doc/src/sgml/ref/create_subscription.sgml) I've also amended the add-needed-ids patch once again so that the build does not fail after applying the make_html_i

Re: running logical replication as the subscription owner

2023-03-27 Thread Robert Haas
On Sat, Mar 25, 2023 at 5:24 AM Jelte Fennema wrote: > For my purposes I always trust the publisher, what I don't trust is > the table owners. But I can indeed imagine scenarios where that's the > other way around, and indeed you can protect against that currently, > but not with your new patch. T

Re: pgsql: amcheck: Fix verify_heapam for tuples where xmin or xmax is 0.

2023-03-27 Thread Robert Haas
On Sat, Mar 25, 2023 at 6:25 PM Peter Geoghegan wrote: > On Fri, Mar 24, 2023 at 8:13 AM Robert Haas wrote: > > If we're checking xmin and find that it is invalid (i.e. 0) just > > report that as corruption, similar to what's already done in the > > three cases that seem correct. If we're checkin

Re: meson/msys2 fails with plperl/Strawberry

2023-03-27 Thread Andres Freund
Hi, On 2023-03-26 21:13:41 -0400, Andrew Dunstan wrote: > > On Mar 26, 2023, at 5:28 PM, Andres Freund wrote: > >> On 2023-03-26 12:39:08 -0700, Andres Freund wrote: > >> First: I am *not* arguing we shouldn't repair building against strawberry > >> perl > >> with mingw. > > > > Hm - can you de

Re: zstd compression for pg_dump

2023-03-27 Thread Justin Pryzby
On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > On 3/16/23 05:50, Justin Pryzby wrote: > > On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: > >> On Wed, Mar 8, 2023 at 10:59 AM Jacob Champion > >> wrote: > >>> I did some smoke testing against zstd's GitHub release o

Re: HOT chain validation in verify_heapam()

2023-03-27 Thread Robert Haas
On Thu, Mar 23, 2023 at 3:06 PM Robert Haas wrote: > On Thu, Mar 23, 2023 at 1:34 PM Robert Haas wrote: > > OK, let me spend some more time on this and I'll post a patch (or > > patches) in a bit. > > All right, here are some more fixups. It looks like e88754a1965c0f40a723e6e46d670cacda9e19bd ma

Re: Non-superuser subscription owners

2023-03-27 Thread Andres Freund
Hi, On 2023-03-25 12:16:35 -0700, Jeff Davis wrote: > On Fri, 2023-03-24 at 09:24 -0400, Robert Haas wrote: > > I certainly agree that the security model isn't in a reasonable place > > right now. However, I feel that: > > > > (1) adding an extra predefined role > > > (2) even adding the connect

Re: Non-superuser subscription owners

2023-03-27 Thread Robert Haas
On Sat, Mar 25, 2023 at 3:16 PM Jeff Davis wrote: > On Fri, 2023-03-24 at 09:24 -0400, Robert Haas wrote: > > I certainly agree that the security model isn't in a reasonable place > > right now. However, I feel that: > > > > (1) adding an extra predefined role > > > (2) even adding the connection

Re: Should vacuum process config file reload more often

2023-03-27 Thread Melanie Plageman
On Sat, Mar 25, 2023 at 3:03 PM Melanie Plageman wrote: > > On Thu, Mar 23, 2023 at 8:27 PM Melanie Plageman > wrote: > > On Thu, Mar 23, 2023 at 2:09 AM Masahiko Sawada > > wrote: > > > > And, I was wondering if it was worth trying to split up the part that > > > > reloads the config file and

Re: pgsql: amcheck: Fix verify_heapam for tuples where xmin or xmax is 0.

2023-03-27 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 10:17 AM Robert Haas wrote: > > What about aborted speculative insertions? See > > heap_abort_speculative(), which directly sets the speculatively > > inserted heap tuple's xmin to InvalidTransactionId/zero. > > Oh, dear. I didn't know about that case. A big benefit of hav

Re: running logical replication as the subscription owner

2023-03-27 Thread Jeff Davis
On Mon, 2023-03-27 at 12:53 -0400, Robert Haas wrote: > We do know that an empty search_path is secure, > but it's probably also going to cause any code we run to fail, unless > that code schema-qualifies all references outside of pg_catalog, or > unless it sets search_path itself. I am confused.

Re: Non-superuser subscription owners

2023-03-27 Thread Jeff Davis
On Mon, 2023-03-27 at 10:46 -0700, Andres Freund wrote: > > There are some big issues, like the security model for replaying > > changes. > > That seems largely unrelated. They are self-evidently related in a fundamental way. The behavior of the non-superuser-subscription patch depends on the pre

Re: pgsql: amcheck: Fix verify_heapam for tuples where xmin or xmax is 0.

2023-03-27 Thread Robert Haas
On Mon, Mar 27, 2023 at 2:34 PM Peter Geoghegan wrote: > > Since this was back-patched, I think it's probably better to just > > remove the error. We can introduce new validation if we want, but that > > should probably be master-only. > > That makes sense. Patch attached. > I don't think that i

Re: running logical replication as the subscription owner

2023-03-27 Thread Robert Haas
On Mon, Mar 27, 2023 at 3:04 PM Jeff Davis wrote: > On Mon, 2023-03-27 at 12:53 -0400, Robert Haas wrote: > > We do know that an empty search_path is secure, > > but it's probably also going to cause any code we run to fail, unless > > that code schema-qualifies all references outside of pg_catalo

Re: pgsql: amcheck: Fix verify_heapam for tuples where xmin or xmax is 0.

2023-03-27 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 1:17 PM Robert Haas wrote: > Patch attached. This is fine, as far as it goes. Obviously it fixes the immediate problem. > > I don't think that it's particularly likely that having refined > > aborted speculative insertion amcheck coverage will make a critical > > differen

Re: Memory leak from ExecutorState context?

2023-03-27 Thread Jehan-Guillaume de Rorthais
Hi, On Mon, 20 Mar 2023 15:12:34 +0100 Jehan-Guillaume de Rorthais wrote: > 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")?

Re: SQL/JSON revisited

2023-03-27 Thread Justin Pryzby
I ran sqlsmith on this patch for a short while, and reduced one of its appalling queries to this: postgres=# SELECT jsonb_object_agg_unique_strict('', null::xid8); ERROR: unexpected jsonb type as object key postgres=# \errverbose ERROR: XX000: unexpected jsonb type as object key UBICACIÓN: Js

Re: Show various offset arrays for heap WAL records

2023-03-27 Thread Melanie Plageman
On Mon, Mar 13, 2023 at 9:41 PM Peter Geoghegan wrote: > On Mon, Mar 13, 2023 at 4:01 PM Melanie Plageman > wrote: > > > I have added detail to xl_btree_delete and xl_btree_vacuum. I have added > > the updated/deleted target offset numbers and the updated tuples > > metadata. > > > > I wondered

Re: Moving forward with TDE

2023-03-27 Thread Stephen Frost
Greetings, On Mon, Mar 27, 2023 at 12:38 Bruce Momjian wrote: > On Wed, Mar 8, 2023 at 04:25:04PM -0500, Stephen Frost wrote: > > Agreed, though the latest efforts include an option for *authenticated* > > encryption as well as unauthenticated. That makes it much more > > difficult to make und

Re: running logical replication as the subscription owner

2023-03-27 Thread Jelte Fennema
> I don't get it. If we just return, that would result in skipping > changes rather than erroring out on changes, but it wouldn't preserve > the current behavior, because we'd still care about the table owner's > permissions rather than, as now, the subscription owner's permissions. Attached is an

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

2023-03-27 Thread Peter Smith
On Tue, Mar 28, 2023 at 4:06 AM Brar Piening wrote: > > On 23.03.2023 at 20:08, Brar Piening wrote: > > Since the need for ids is starting to grow again (ecb696527c added an > > id to a varlistentry in doc/src/sgml/ref/create_subscription.sgml) > > I've also amended the add-needed-ids patch once a

Re: Moving forward with TDE

2023-03-27 Thread Bruce Momjian
On Tue, Mar 28, 2023 at 12:01:56AM +0200, Stephen Frost wrote: > Greetings, > > On Mon, Mar 27, 2023 at 12:38 Bruce Momjian wrote: > > On Wed, Mar  8, 2023 at 04:25:04PM -0500, Stephen Frost wrote: > > Agreed, though the latest efforts include an option for *authenticated* > > encryp

Re: Non-superuser subscription owners

2023-03-27 Thread Jeff Davis
On Mon, 2023-03-27 at 14:06 -0400, Robert Haas wrote: > I thought you were asking for those changes to be made before this > patch got committed, so that's what I was responding to. If you're > asking for it not to be committed at all, that's a different > discussion. I separately had a complaint

Re: Show various offset arrays for heap WAL records

2023-03-27 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 2:29 PM Melanie Plageman wrote: > I went to add dedup records and noticed that since the actual > BTDedupInterval struct is what is put in the xlog, I would need access > to that type from nbtdesc.c, however, including nbtree.h doesn't seem to > work because it includes fil

Re: Add LZ4 compression in pg_dump

2023-03-27 Thread gkokolatos
--- Original Message --- On Thursday, March 16th, 2023 at 11:30 PM, Tomas Vondra wrote: > > > > > On 3/16/23 01:20, Justin Pryzby wrote: > > > On Mon, Mar 13, 2023 at 10:47:12PM +0100, Tomas Vondra wrote: > > > > > > > > Thanks. I don't want to annoy you too much, but could

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

2023-03-27 Thread Michael Paquier
On Mon, Mar 27, 2023 at 10:24:46AM -0400, Melanie Plageman wrote: > I do like/prefer "block read requests" and > "blocks requested found in cache" > Though, now I fear my initial complaint may have been a bit pedantic. That's fine. Let's ask for extra opinions, then. So, have others an opinion t

Re: Add pg_walinspect function with block info columns

2023-03-27 Thread Peter Geoghegan
On Sun, Mar 26, 2023 at 8:41 PM Kyotaro Horiguchi wrote: > > I'd still put the LSN data before the three OIDs for consistency with > > the structures, though my opinion does not seem to count much.. > > I agree with Michael on this point. Also, although it may not be > significant for SQL, the row

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-27 Thread Michael Paquier
On Mon, Mar 27, 2023 at 07:08:51PM +0900, Michael Paquier wrote: > The patch has one mistake: PG_STAT_GET_XACT_FUNCENTRY_FLOAT8_MS does > not need a slash on its last line or it would include the next, empty > line. This could lead to mistakes (no need to send a new patch just > for that). Adjust

Re: Memory leak from ExecutorState context?

2023-03-27 Thread Tomas Vondra
On 3/27/23 23:13, Jehan-Guillaume de Rorthais wrote: > Hi, > > On Mon, 20 Mar 2023 15:12:34 +0100 > Jehan-Guillaume de Rorthais wrote: > >> 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 P

Re: [PATCH] Support % wildcard in extension upgrade filenames

2023-03-27 Thread Sandro Santilli
On Mon, Mar 13, 2023 at 02:48:56PM -0400, Regina Obe wrote: > > I still see the main use-case as for those that micro version and for this > use case, they would need a way, not necessarily to have a single upgrade > script, but a script for each minor. > > So something like > > 3.2.%--3.4.0 =

Re: Moving forward with TDE

2023-03-27 Thread Stephen Frost
Greetings, On Mon, Mar 27, 2023 at 18:17 Bruce Momjian wrote: > On Tue, Mar 28, 2023 at 12:01:56AM +0200, Stephen Frost wrote: > > Greetings, > > > > On Mon, Mar 27, 2023 at 12:38 Bruce Momjian wrote: > > > > On Wed, Mar 8, 2023 at 04:25:04PM -0500, Stephen Frost wrote: > > > Agreed, t

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

2023-03-27 Thread Jacob Champion
On Mon, Mar 20, 2023 at 11:22 PM Amit Kapila wrote: > If the tests you have in mind are only related to this patch set then > feel free to propose them here if you feel the current ones are not > sufficient. I think the new tests added by Wang cover my concerns (thanks!). I share Peter's comment

Re: Parallel Full Hash Join

2023-03-27 Thread Thomas Munro
On Sun, Mar 26, 2023 at 9:52 AM Melanie Plageman wrote: > I have some very minor pieces of feedback, mainly about extraneous > commas that made me uncomfortable ;) Offensive punctuation removed. > > discussion). Therefore FULL JOIN inhibited page-based parallelism, > > as the other join strateg

Re: Moving forward with TDE

2023-03-27 Thread Bruce Momjian
On Tue, Mar 28, 2023 at 12:57:42AM +0200, Stephen Frost wrote: > I consider the operating system and its processes as much more of a > single entity than TLS over a network. > > This may be the case sometimes but there’s absolutely no shortage of other > cases and it’s almost more the rule

Re: Add pg_walinspect function with block info columns

2023-03-27 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 12:42 AM Bharath Rupireddy wrote: > Thanks. Here's the v6 patch (last patch that I have with me for > pg_walinspect) for adding per-record info to pg_get_wal_block_info. > Note that I addressed all review comments received so far. Any > thoughts? Looking at this now, with

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2023-03-27 Thread Michael Paquier
On Mon, Mar 20, 2023 at 09:30:50AM +0900, Michael Paquier wrote: > Did you check dump and restore flows with partition > trees and --no-table-access-method? Perhaps there should be > some regression tests with partitioned tables? I was looking at the patch, and as I suspected the dumps generated

Re: Moving forward with TDE

2023-03-27 Thread Stephen Frost
Greetings, On Mon, Mar 27, 2023 at 19:19 Bruce Momjian wrote: > On Tue, Mar 28, 2023 at 12:57:42AM +0200, Stephen Frost wrote: > > I consider the operating system and its processes as much more of a > > single entity than TLS over a network. > > > > This may be the case sometimes but the

Re: Improve logging when using Huge Pages

2023-03-27 Thread Michael Paquier
On Thu, Mar 23, 2023 at 08:50:50PM -0500, Justin Pryzby wrote: > I'm sure it's possible, but it's also not worth writing a special > implementation just to handle huge_pages_active, which is better written > in 30 lines than in 300 lines. > > If we needed to avoid using a GUC, maybe it'd work to a

Re: Add pg_walinspect function with block info columns

2023-03-27 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 4:59 PM Peter Geoghegan wrote: > Looking at this now, with the intention of committing it for 16. I see a bug on HEAD, following yesterday's commit 0276ae42dd. GetWALRecordInfo() will now output the value of the fpi_len variable before it has actually been set by our call

Re: PGdoc: add missing ID attribute to create_subscription.sgml

2023-03-27 Thread Peter Smith
Hi Kuroda-san. Here are my review comments for both patches v3-0001 and v3-0002. v3-0001 This patch looks good, but I think there are a couple of other places where you could add links: ~~~ 1.1 doc/src/sgml/logical-replication.sgml (31.5 Conflicts) "When the streaming mode i

Re: Moving forward with TDE

2023-03-27 Thread Bruce Momjian
On Tue, Mar 28, 2023 at 02:03:50AM +0200, Stephen Frost wrote: > The remote storage is certainly an independent system. Multi-mount LUNs are > entirely possible in a SAN (and absolutely with NFS, or just the NFS server > itself is compromised..), so while the attacker may not have any access to the

Re: Assertion in pgstat_assoc_relation() fails intermittently

2023-03-27 Thread Kyotaro Horiguchi
At Mon, 27 Mar 2023 11:46:08 +0530, Bharath Rupireddy wrote in > I recently observed an assertion failure [1] a few times on my dev > setup during initdb. The code was built with --enable-debug > --enable-cassert CFLAGS="-ggdb3 -O0". The assertion was gone after I > did make distclean and built

Why mark empty pages all visible?

2023-03-27 Thread Andres Freund
Hi, visibilitymap.c currently marks empty pages as all visible, including WAL logging them: if (PageIsEmpty(page)) ... /* * Empty pages are always all-visible and all-frozen (note that * the same is currently not true for new pages, see above).

Re: Add pg_walinspect function with block info columns

2023-03-27 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 4:59 PM Peter Geoghegan wrote: > Looking at this now, with the intention of committing it for 16. Attached revision v7 adjusts the column order. This is still WIP, but gives a good idea of the direction I'm going in. v7 makes the column output look like this: pg@regressi

Re: Add pg_walinspect function with block info columns

2023-03-27 Thread Bharath Rupireddy
On Tue, Mar 28, 2023 at 5:29 AM Peter Geoghegan wrote: > > On Mon, Mar 27, 2023 at 12:42 AM Bharath Rupireddy > wrote: > > Thanks. Here's the v6 patch (last patch that I have with me for > > pg_walinspect) for adding per-record info to pg_get_wal_block_info. > > Note that I addressed all review c

Re: Moving forward with TDE

2023-03-27 Thread Stephen Frost
Greetings, On Mon, Mar 27, 2023 at 21:35 Bruce Momjian wrote: > On Tue, Mar 28, 2023 at 02:03:50AM +0200, Stephen Frost wrote: > > The remote storage is certainly an independent system. Multi-mount LUNs > are > > entirely possible in a SAN (and absolutely with NFS, or just the NFS > server > > i

RE: PGdoc: add missing ID attribute to create_subscription.sgml

2023-03-27 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for reviewing. PSA new version. > > v3-0001 > > > This patch looks good, but I think there are a couple of other places > where you could add links: > > ~~~ > > 1.1 doc/src/sgml/logical-replication.sgml (31.5 Conflicts) > > "When the streaming mode is p

Re: Why mark empty pages all visible?

2023-03-27 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 6:48 PM Andres Freund wrote: > It seems odd that we enter the page into the VM at this point. That means that > use of that page will now require a bit more work (including > RelationGetBufferForTuple() pinning it). I think that it's fairly obvious that it's *not* odd at a

Re: SQL/JSON revisited

2023-03-27 Thread Amit Langote
On Tue, Mar 28, 2023 at 6:18 AM Justin Pryzby wrote: > I ran sqlsmith on this patch for a short while, and reduced one of its > appalling queries to this: > > postgres=# SELECT jsonb_object_agg_unique_strict('', null::xid8); > ERROR: unexpected jsonb type as object key I think this may have to d

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

2023-03-27 Thread Kyotaro Horiguchi
At Tue, 28 Mar 2023 07:38:25 +0900, Michael Paquier wrote in > On Mon, Mar 27, 2023 at 10:24:46AM -0400, Melanie Plageman wrote: > > I do like/prefer "block read requests" and > > "blocks requested found in cache" > > Though, now I fear my initial complaint may have been a bit pedantic. > > Tha

Re: Add pg_walinspect function with block info columns

2023-03-27 Thread Michael Paquier
On Mon, Mar 27, 2023 at 06:07:09PM -0700, Peter Geoghegan wrote: > I see a bug on HEAD, following yesterday's commit 0276ae42dd. > > GetWALRecordInfo() will now output the value of the fpi_len variable > before it has actually been set by our call to . So it'll always > be 0. Indeed, good cat

Re: PGdoc: add missing ID attribute to create_subscription.sgml

2023-03-27 Thread Peter Smith
On Tue, Mar 28, 2023 at 2:04 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Peter, > > Thank you for reviewing. PSA new version. > v4-0001 LGTM > > > > > v3-0002 > > > > > > > 2.2 doc/src/sgml/logical-replication.sgml (31.6. Restrictions) > > > > Publications can also specify that

RE: Support logical replication of DDLs

2023-03-27 Thread houzj.f...@fujitsu.com
On Monday, March 27, 2023 8:08 PM Amit Kapila wrote: > On Mon, Mar 27, 2023 at 12:07 PM Amit Kapila > wrote: > > > > On Mon, Mar 27, 2023 at 2:52 AM Tom Lane wrote: > > > > > > > > I suggest taking a couple of steps back from the minutiae of the > > > patch, and spending some hard effort thinkin

Re: allow_in_place_tablespaces vs. pg_basebackup

2023-03-27 Thread Thomas Munro
The commit message explains prettty well, and it seems to work in simple testing, and yeah commit c6f2f016 was not a work of art. pg_basebackeup --format=plain "worked", but your way is better. I guess we should add a test of -Fp too, to keep it working? Here's one of those. I know it's not your

  1   2   >