RE: Initial Schema Sync for Logical Replication

2023-03-24 Thread houzj.f...@fujitsu.com
On Friday, March 24, 2023 11:01 PM Euler Taveira wrote: Hi, > On Fri, Mar 24, 2023, at 8:57 AM, mailto:houzj.f...@fujitsu.com wrote: > > First, I think the current publisher doesn't know the version number of > > client(subscriber) so we need to check the feasibility of same. Also, having > >

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-24 Thread Andres Freund
Hi, On 2022-10-28 19:54:20 -0700, Andres Freund wrote: > I've done a fair bit of benchmarking of this patchset. For COPY it comes out > ahead everywhere. It's possible that there's a very small regression for > extremly IO miss heavy workloads, more below. > > > server "base" configuration: >

Re: Add pg_walinspect function with block info columns

2023-03-24 Thread Michael Paquier
On Thu, Mar 23, 2023 at 10:54:40PM +0530, Bharath Rupireddy wrote: > Please see the attached v4 patch set addressing all the review comments. - desc = GetRmgr(XLogRecGetRmid(record)); - id = desc.rm_identify(XLogRecGetInfo(record)); - - if (id == NULL) - id = psprintf("UNKNOWN (%x)",

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

2023-03-24 Thread Andres Freund
Hi, On 2023-03-25 11:56:22 +0900, Michael Paquier wrote: > On Thu, Mar 16, 2023 at 02:13:45PM +0100, Drouvot, Bertrand wrote: > > On 3/16/23 12:46 PM, Michael Paquier wrote: > >>> I don't think we should pay any particular attention to those 2 ones > >>> as anyway nothing prevent the 7 others to

Re: [PoC] Let libpq reject unexpected authentication requests

2023-03-24 Thread Michael Paquier
On Fri, Mar 24, 2023 at 09:30:06AM -0700, Jacob Champion wrote: > On Thu, Mar 23, 2023 at 10:18 PM Michael Paquier wrote: >> I have spent a couple of hours looking at the whole again today, >> testing that with OpenSSL to make sure that everything was OK. Apart >> from a few tweaks, that seemed

hio.c does visibilitymap_pin()/IO while holding buffer lock

2023-03-24 Thread Andres Freund
Hi, Starting with commit 7db0cd2145f2bce84cac92402e205e4d2b045bf2 Author: Tomas Vondra Date: 2021-01-17 22:11:39 +0100 Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE RelationGetBufferForTuple does /* * The page is empty, pin vmbuffer to set all_frozen bit.

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

2023-03-24 Thread Michael Paquier
On Thu, Mar 16, 2023 at 02:13:45PM +0100, Drouvot, Bertrand wrote: > On 3/16/23 12:46 PM, Michael Paquier wrote: >>> I don't think we should pay any particular attention to those 2 ones >>> as anyway nothing prevent the 7 others to be called outside of the >>> pg_stat_xact_all_tables view. >> >>

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-24 Thread Justin Pryzby
On Thu, Mar 23, 2023 at 04:35:46PM -0400, Tom Lane wrote: > So I'm still pretty desperately unhappy with count_leaf_partitions. > I don't like expending significant cost purely for progress tracking > purposes, I don't like the undocumented assumption that NoLock is > safe, and what's more, if it

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-24 Thread Michael Paquier
On Fri, Mar 24, 2023 at 06:58:30AM +0100, Drouvot, Bertrand wrote: > - Does not include the refactoring for pg_stat_get_xact_tuples_inserted(), > pg_stat_get_xact_tuples_updated() and pg_stat_get_xact_tuples_deleted() (as > they depend of [2] mentioned above) > > - Does not include the

Re: psql \watch 2nd argument: iteration count

2023-03-24 Thread Andrey Borodin
On Thu, Mar 23, 2023 at 10:15 PM Yugo NAGATA wrote: > > Here is my review on the v9 patch. > > + /* we do not prevent numerous names iterations like i=1 > i=1 i=1 */ > + have_sleep = true; > > Why this is allowed here? I am not sure there is any reason to

Re: Raising the SCRAM iteration count

2023-03-24 Thread Michael Paquier
On Fri, Mar 24, 2023 at 09:56:29AM +0100, Daniel Gustafsson wrote: > I've actually ripped out the test in question in the attached v9 to have it > ready and building green in CFbot. While reading through v9, I have noticed a few things. +-- Changing the SCRAM iteration count +SET

Re: running logical replication as the subscription owner

2023-03-24 Thread Jeff Davis
On Fri, 2023-03-24 at 14:35 -0400, Robert Haas wrote: > That > actually wouldn't work today, and with the patch it would start > working, so basically the effect of the patch on the problem that you > mention would be to remove the ability to filter by specific table > and > add the ability to

Re: running logical replication as the subscription owner

2023-03-24 Thread Jeff Davis
On Fri, 2023-03-24 at 10:00 -0400, Robert Haas wrote: > On Fri, Mar 24, 2023 at 3:59 AM Jeff Davis wrote: > > That's a little confusing, why not just always use the > > SECURITY_RESTRICTED_OPERATION? Is there a use case I'm missing? > > Some concern was expressed -- not sure exactly where the

Re: ICU locale validation / canonicalization

2023-03-24 Thread Jeff Davis
On Fri, 2023-03-24 at 10:10 +0100, Peter Eisentraut wrote: > Couldn't we do this in a simpler way by just freeing the collator > before > the ereport() calls. I committed a tiny patch to do this. We still need to address the error inconsistency though. The problem is that, in older ICU

Add PQsendSyncMessage() to libpq

2023-03-24 Thread Anton Kirilov
Hello, Recently I have been trying to use libpq's pipeline mode in a project, and in the process I have noticed that the PQpipelineSync() function has a deficiency (which, to be fair, could be an advantage in other situations): It combines the establishment of a synchronization point in a

Re: pgbench - adding pl/pgsql versions of tests

2023-03-24 Thread Cary Huang
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: tested, passed Spec compliant: not tested Documentation:not tested Hi thank you for the patch. It can be applied to current master branch

Re: postgres_fdw, dblink, and CREATE SUBSCRIPTION security

2023-03-24 Thread Jacob Champion
On 3/20/23 09:32, Robert Haas wrote: > I think this is the root of our disagreement. Agreed. > My understanding of the > previous discussion is that people think that the major problem here > is the wraparound-to-superuser attack. That is, in general, we expect > that when we connect to a

Re: Should we remove vacuum_defer_cleanup_age?

2023-03-24 Thread Peter Geoghegan
On Sat, Mar 18, 2023 at 2:34 AM Alvaro Herrera wrote: > > On 2023-Mar-17, Andres Freund wrote: > > > I started writing a test for vacuum_defer_cleanup_age while working on the > > fix > > referenced above, but now I am wondering if said energy would be better > > spent > > removing

Re: Add SHELL_EXIT_CODE to psql

2023-03-24 Thread Corey Huinker
On Tue, Mar 21, 2023 at 3:33 PM Corey Huinker wrote: > >> As you had it, any nonzero result would prevent backtick substitution. >> I'm not really sure how much thought went into the existing behavior, >> but I am pretty sure that it's not part of this patch's charter to >> change that. >> >>

Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

2023-03-24 Thread Daniel Gustafsson
> On 24 Mar 2023, at 21:59, David Rowley wrote: > On Fri, 24 Mar 2023 at 20:31, Peter Eisentraut > wrote: >> On 23.03.23 09:52, David Rowley wrote: >>> One thing I thought about while looking is it stage 2 might do >>> something similar for SearchSysCacheN. I then wondered if we're more >>>

Re: Make fop less verbose when building PDF

2023-03-24 Thread Tom Lane
Andres Freund writes: > How about: > > In its default configuration FOP will emit an > INFO message for each page. The log level can be > changed via ~/.foprc: > > LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog >

Re: Make fop less verbose when building PDF

2023-03-24 Thread Andres Freund
Hi, On 2023-03-24 16:19:57 -0400, Tom Lane wrote: > Andres Freund writes: > > I just figured out that one can hide those. Unfortunately not at the > > commandline, but in "$HOME/.foprc" or /etc. > > > $ cat ~/.foprc > > LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN > > Yeah.

Re: Remove 'htmlhelp' documentat format (was meson documentation build open issues)

2023-03-24 Thread Daniel Gustafsson
> On 24 Mar 2023, at 17:58, Andres Freund wrote: > On 2023-03-24 11:59:23 +0100, Peter Eisentraut wrote: >> Another option here is to remove support for htmlhelp. > > That might actually be the best path - it certainly doesn't look like anybody > has been actively using it. I had no idea we had

Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

2023-03-24 Thread David Rowley
On Fri, 24 Mar 2023 at 20:31, Peter Eisentraut wrote: > > On 23.03.23 09:52, David Rowley wrote: > > One thing I thought about while looking is it stage 2 might do > > something similar for SearchSysCacheN. I then wondered if we're more > > likely to want to keep the localised __FILE__, __LINE__

Re: Should we remove vacuum_defer_cleanup_age?

2023-03-24 Thread Daniel Gustafsson
> On 24 Mar 2023, at 21:27, Andres Freund wrote: > On 2023-03-23 10:18:35 +0100, Daniel Gustafsson wrote: >>> On 22 Mar 2023, at 18:00, Andres Freund wrote: >> >>> It wasn't actually that much work to write a patch to remove >>> vacuum_defer_cleanup_age, see the attached. >> >> -and

Re: Make EXPLAIN generate a generic plan for a parameterized query

2023-03-24 Thread Tom Lane
Christoph Berg writes: > Re: Tom Lane >> I don't actually see why a postgres_fdw test case is needed at all? >> The tests in explain.sql seem sufficient. > When I asked Laurenz about that he told me that local tables wouldn't > exercise the code specific for EXEC_FLAG_EXPLAIN_GENERIC. But there

Re: Should we remove vacuum_defer_cleanup_age?

2023-03-24 Thread Andres Freund
Hi, On 2023-03-23 10:18:35 +0100, Daniel Gustafsson wrote: > > On 22 Mar 2023, at 18:00, Andres Freund wrote: > > > It wasn't actually that much work to write a patch to remove > > vacuum_defer_cleanup_age, see the attached. > > -and provide protection > against > +provides

Re: Make EXPLAIN generate a generic plan for a parameterized query

2023-03-24 Thread Christoph Berg
Re: Tom Lane > I don't actually see why a postgres_fdw test case is needed at all? > The tests in explain.sql seem sufficient. When I asked Laurenz about that he told me that local tables wouldn't exercise the code specific for EXEC_FLAG_EXPLAIN_GENERIC. (Admittedly my knowledge of the planner

Re: Parallel Full Hash Join

2023-03-24 Thread Thomas Munro
Here is a rebased and lightly hacked-upon version that I'm testing. 0001-Scan-for-unmatched-hash-join-tuples-in-memory-order.patch * this change can stand on its own, separately from any PHJ changes * renamed hashtable->current_chunk[_idx] to unmatched_scan_{chunk,idx} * introduced a local

Re: Make fop less verbose when building PDF

2023-03-24 Thread Tom Lane
Andres Freund writes: > I just figured out that one can hide those. Unfortunately not at the > commandline, but in "$HOME/.foprc" or /etc. > $ cat ~/.foprc > LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN Yeah. I've done it locally by modifying the "fop" script ;-) ... but

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

2023-03-24 Thread Tom Lane
"Daniel Verite" writes: > PFA an updated patch. This gives me several "-Wincompatible-pointer-types" warnings (as are also reported by the cfbot): common.c: In function 'ExecQueryAndProcessResults': common.c:1686:24: warning: passing argument 1 of 'PrintQueryTuples' from incompatible pointer

Re: running logical replication as the subscription owner

2023-03-24 Thread Mark Dilger
> On Mar 24, 2023, at 11:35 AM, Robert Haas wrote: > > I don't know how bad that sounds to you, and if it does sound bad, I > don't immediately see how to mitigate it. As I said to Jeff, if you > can replicate into a table that has a casually-written SECURITY > INVOKER trigger on it, you can

Re: cfbot stuck

2023-03-24 Thread Thomas Munro
On Sat, Mar 25, 2023 at 8:23 AM Justin Pryzby wrote: > It looks like cfbot is stuck since 13h ago. > > https://cirrus-ci.com/github/postgresql-cfbot/postgresql https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/ broke its ability to push branches. It's back in business now.

Make fop less verbose when building PDF

2023-03-24 Thread Andres Freund
Hi, When building the pdf docs, fop emits a line for each page of the docs: > ... > [INFO] FOUserAgent - Rendered page #2931. which, given the length of our docs, makes the output pretty pointless. Even if there are warnings, one likely won't notice them. I just figured out that one can hide

Bug with ICU for merge join

2023-03-24 Thread Jeff Janes
Ever since 27b62377b47f9e7bf58613, I have been getting "ERROR: mergejoin input data is out of order" for the attached reproducer. I get this on Ubuntu 20.04 and 22.04, whether initdb was run under LC_ALL=C or under LANG=en_US.UTF-8. It is not my query, I don't really know what its point is. I

cfbot stuck

2023-03-24 Thread Justin Pryzby
It looks like cfbot is stuck since 13h ago. https://cirrus-ci.com/github/postgresql-cfbot/postgresql

Re: pg_stats and range statistics

2023-03-24 Thread Egor Rogov
On 24.03.2023 01:46, Tomas Vondra wrote: So if you could clean it up a bit, and do something about the two open items I mentioned (a bunch of tests on different array, I've added some tests to resgress/sql/rangetypes.sql, based on the same dataset that is used to test lower() and upper().

Re: running logical replication as the subscription owner

2023-03-24 Thread Robert Haas
On Fri, Mar 24, 2023 at 2:14 PM Jelte Fennema wrote: > Yes, I totally agree. I now realise that wasn't clear at all from the wording > in my previous email. I'm fine with both behaviours. I mainly meant that if > we actually think the new behaviour is better (which honestly I'm not > convinced

Re: running logical replication as the subscription owner

2023-03-24 Thread Robert Haas
On Fri, Mar 24, 2023 at 12:58 PM Mark Dilger wrote: > I also think the subscription owner should be a low-privileged user, owing to > the risk of the publisher injecting malicious content into the publication. > I think you are focused on all the bad actors on the subscription-side > database

Re: Make ON_ERROR_STOP stop on shell script failure

2023-03-24 Thread Corey Huinker
On Fri, Mar 24, 2023 at 2:16 PM Corey Huinker wrote: > > > On Fri, Mar 24, 2023 at 11:07 AM Peter Eisentraut < > peter.eisentr...@enterprisedb.com> wrote: > >> On 20.03.23 19:31, Greg Stark wrote: >> > So I took a look at this patch. The conflict is with 2fe3bdbd691 >> > committed by Peter

Re: Make ON_ERROR_STOP stop on shell script failure

2023-03-24 Thread Corey Huinker
On Fri, Mar 24, 2023 at 11:07 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 20.03.23 19:31, Greg Stark wrote: > > 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

Re: running logical replication as the subscription owner

2023-03-24 Thread Jelte Fennema
> I don't think it makes sense for this patch to run around and try to > adjust all of those other pages. We have to pick between doing it this > way (and thus being inconsistent with what we do elsewhere) or taking > that logic out (and taking our chances that something will break for > some

Re: Transparent column encryption

2023-03-24 Thread Andres Freund
Hi, On 2023-03-23 14:54:48 +0100, Peter Eisentraut wrote: > On 22.03.23 10:00, Peter Eisentraut wrote: > > > I get that for the type, but why do we need the typmod duplicated as > > > well? > > > > Earlier patch versions didn't do that, but that got really confusing > > about which type the

Re: Should vacuum process config file reload more often

2023-03-24 Thread Melanie Plageman
On Fri, Mar 24, 2023 at 1:21 AM Masahiko Sawada wrote: > > On Fri, Mar 24, 2023 at 9:27 AM Melanie Plageman > wrote: > > > > On Thu, Mar 23, 2023 at 2:09 AM Masahiko Sawada > > wrote: > > > On Sun, Mar 19, 2023 at 7:47 AM Melanie Plageman > > > wrote: > > > Do we need to calculate the number

Re: Make EXPLAIN generate a generic plan for a parameterized query

2023-03-24 Thread Tom Lane
Laurenz Albe writes: > On Tue, 2023-03-21 at 16:32 +0100, Christoph Berg wrote: >> The test involving postgres_fdw is still necessary to exercise the new >> EXEC_FLAG_EXPLAIN_GENERIC code path, but needs to be moved elsewhere, >> probably src/test/modules/. > Tests for postgres_fdw are in

Re: running logical replication as the subscription owner

2023-03-24 Thread Mark Dilger
> On Mar 24, 2023, at 7:00 AM, Robert Haas wrote: > > More generally, Stephen Frost has elsewhere argued that we should want > the subscription owner to be a very low-privilege user, so that if > their privileges get stolen, it's no big deal. I disagree with that. I > think it's always a

Remove 'htmlhelp' documentat format (was meson documentation build open issues)

2023-03-24 Thread Andres Freund
Hi, On 2023-03-24 11:59:23 +0100, Peter Eisentraut wrote: > Another option here is to remove support for htmlhelp. That might actually be the best path - it certainly doesn't look like anybody has been actively using it. Or otherwise somebody would have complained about there not being any

Re: running logical replication as the subscription owner

2023-03-24 Thread Robert Haas
On Fri, Mar 24, 2023 at 12:17 PM Jelte Fennema wrote: > I personally cannot think of a reasonable example that would be > broken, but I agree the code is simple enough. I do think that if > there is an actual reason to do this, we'd probably want it in other > places where

Re: [PoC] Let libpq reject unexpected authentication requests

2023-03-24 Thread Jacob Champion
On Thu, Mar 23, 2023 at 10:18 PM Michael Paquier wrote: > I have spent a couple of hours looking at the whole again today, > testing that with OpenSSL to make sure that everything was OK. Apart > from a few tweaks, that seemed pretty good. So, applied. Thank you! --Jacob

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2023-03-24 Thread reid . thompson
Updated patches attached. pg-stat-activity-backend-memory-allocated DSM allocations created by a process and not destroyed prior to it's exit are considered

Re: running logical replication as the subscription owner

2023-03-24 Thread Jelte Fennema
> Some concern was expressed -- not sure exactly where the email is > exactly, and it might've been on pgsql-security -- that doing that > categorically might break things that are currently working. The > people who were concerned included Andres and I forget who else. My > gut reaction was the

Re: User functions for building SCRAM secrets

2023-03-24 Thread Daniel Gustafsson
> On 22 Mar 2023, at 15:06, Jonathan S. Katz wrote: > On 3/22/23 2:48 AM, Michael Paquier wrote: >> I was reading this thread again, and pondered on this particular >> point: >> https://www.postgresql.org/message-id/caawbhmhjcfc4oaga_7yluhtj6j+rxey+bodrygzndaflgfz...@mail.gmail.com >> We've had

Re: Make ON_ERROR_STOP stop on shell script failure

2023-03-24 Thread Peter Eisentraut
On 20.03.23 19:31, Greg Stark wrote: 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

RE: Initial Schema Sync for Logical Replication

2023-03-24 Thread Kumar, Sachin
> I am not if it's feasible to support the use case the replicate DDL to old > subscriber. > +1 > First, I think the current publisher doesn't know the version number of > client(subscriber) so we need to check the feasibility of same. Also, having > client's version number checks doesn't seem

Re: Initial Schema Sync for Logical Replication

2023-03-24 Thread Euler Taveira
On Fri, Mar 24, 2023, at 8:57 AM, houzj.f...@fujitsu.com wrote: > First, I think the current publisher doesn't know the version number of > client(subscriber) so we need to check the feasibility of same. Also, having > client's version number checks doesn't seem to be a good idea.

RE: Initial Schema Sync for Logical Replication

2023-03-24 Thread Kumar, Sachin
> From: Amit Kapila > > I think we won't be able to use same snapshot because the transaction will > > be committed. > > In CreateSubscription() we can use the transaction snapshot from > > walrcv_create_slot() till walrcv_disconnect() is called.(I am not sure > > about this part maybe

Re: Non-superuser subscription owners

2023-03-24 Thread Robert Haas
On Fri, Mar 24, 2023 at 9:24 AM Robert Haas wrote: > > The other patch you posted seems like it makes a lot of progress in > > that direction, and I think that should go in first. That was one of > > the items I suggested previously[2], so thank you for working on that. > > Perhaps you could

Re: refactoring basebackup.c

2023-03-24 Thread Robert Haas
On Thu, Mar 23, 2023 at 4:11 PM Robert Haas wrote: > On Wed, Mar 22, 2023 at 10:09 PM Thomas Munro wrote: > > > BaseBackupSync is not documented > > > BaseBackupWrite is not documented > > > > [Resending with trimmed CC: list, because the mailing list told me to > > due to a blocked account,

Re: running logical replication as the subscription owner

2023-03-24 Thread Robert Haas
On Fri, Mar 24, 2023 at 3:59 AM Jeff Davis wrote: > That's a little confusing, why not just always use the > SECURITY_RESTRICTED_OPERATION? Is there a use case I'm missing? Some concern was expressed -- not sure exactly where the email is exactly, and it might've been on pgsql-security -- that

Re: Infinite Interval

2023-03-24 Thread Ashutosh Bapat
On Sun, Mar 19, 2023 at 1:04 AM Joseph Koshakow wrote: > > The patches in this email should be rebased over master. > Reviewed 0001 - Looks good to me. The new function is properly placed along with other signed 64 bit functions. All existing calls to int64_multiply_add() have been replaced with

Re: [BUG] pg_stat_statements and extended query protocol

2023-03-24 Thread Imseih (AWS), Sami
> I wonder that this patch changes the meaning of "calls" in the > pg_stat_statement > view a bit; previously it was "Number of times the statement was executed" as > described in the documentation, but currently this means "Number of times the > portal was executed". I'm worried that this makes

Re: Non-superuser subscription owners

2023-03-24 Thread Robert Haas
On Fri, Mar 24, 2023 at 3:17 AM Jeff Davis wrote: > The current patch (non-superuser-subscriptions) is the most user-facing > aspect, and it seems wrong to commit it before we have the security > model in a reasonable place. As you pointed out[1], it's not in a > reasonable place now, so

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

2023-03-24 Thread Merlin Moncure
On Tue, Mar 21, 2023 at 4:47 PM Jeff Davis wrote: > On Tue, 2023-03-21 at 09:22 -0400, Dave Cramer wrote: > > As Jeff mentioned there is a visibility problem if the search path is > > changed. The simplest solution IMO is to look up the OID at the time > > the format is requested and use the OID

Re: pg_bsd_indent vs vpath

2023-03-24 Thread Andrew Dunstan
On 2023-03-23 Th 16:46, Tom Lane wrote: Andrew Dunstan writes: Looks like we need a little magic to allow pg_bsd_indent to be part of a vpath build: Yeah, I think I fixed that at dccef0f2f, but fairywren hasn't run since. (I'd thought that it was some weird Msys-ism, but if you say it's

RE: Initial Schema Sync for Logical Replication

2023-03-24 Thread houzj.f...@fujitsu.com
On Friday, March 24, 2023 12:02 AM Euler Taveira wrote: > > On Thu, Mar 23, 2023, at 8:44 AM, Amit Kapila wrote: > > On Thu, Mar 23, 2023 at 2:48 AM Euler Taveira > > wrote: > > > > > > On Tue, Mar 21, 2023, at 8:18 AM, Amit Kapila wrote: > > > > > > Now, how do we

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

2023-03-24 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for reviewing! PSA new patch set. > 1. > It will be better if all the references follow a consistent pattern: > > Rule 1 - IMO it is quite important/necessary for these option name > “XXX” (see below) to be rendered using markup rather than > just plain text font.

Re: meson documentation build open issues

2023-03-24 Thread Peter Eisentraut
On 24.03.23 08:26, Andres Freund wrote: For the .css: docbook-xsl actually has support for writing the .css: [1] - but it requires the .css file be valid xml. I wonder if the cleanest approch would be to have a build step to create .css.xml - then the non-chunked build's generate.css.header

Re: Make EXPLAIN generate a generic plan for a parameterized query

2023-03-24 Thread Christoph Berg
Re: Laurenz Albe > And here is v10, which includes tab completion for the new option. IMHO everything looks good now. Marking as ready for committer. Thanks! Christoph

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

2023-03-24 Thread Alvaro Herrera
On 2023-Mar-24, brar wrote: > Alvaro wrote: > > But why are there no anchors next to items on that page?  For > > example, how do I get the link for the "Meta Commands" subsection? > I can't look at the code right now, but I suspect the headers are > refsections (not sections) which this patch

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

2023-03-24 Thread brar
> But why are there no anchors next to> items on that page?  For example,> > how do I get the link for the> "Meta Commands" subsection?I can't look at the > code right now, but I suspect the headers are refsections (not sections) > which this patch does not add links for yet.I already have

Re: Transparent column encryption

2023-03-24 Thread Peter Eisentraut
On 23.03.23 16:55, Robert Haas wrote: On Thu, Mar 23, 2023 at 9:55 AM Peter Eisentraut wrote: I thought about this some more. I think we could get rid of attusertypmod and just hardcode it as -1. The idea would be that if you ask for an encrypted column of type, say, varchar(500), the server

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

2023-03-24 Thread Alvaro Herrera
On 2023-Mar-24, Brar Piening wrote: > On 23.03.2023 at 23:31, Karl O. Pinc wrote: > > Hi Brar, > > > > It occurs to me that I had not actually tested the > > way the anchor is put only after the last term in a > > varlistentry. (The code looked obviously right > > and should work if any

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-03-24 Thread Alvaro Herrera
On 2023-Mar-23, Greg Stark wrote: > On Thu, 23 Mar 2023 at 23:30, Bharath Rupireddy > wrote: > > > > > + ereport(log_replication_commands ? LOG : DEBUG3, > > > + (errmsg("acquired physical replication slot \"%s\"", > > > + slotname))); > > So this is just a bit of bike-shedding but I don't feel

Re: Add LZ4 compression in pg_dump

2023-03-24 Thread gkokolatos
--- Original Message --- On Thursday, March 23rd, 2023 at 6:10 PM, Tomas Vondra wrote: > > So pushed all three parts, after updating the commit messages a bit. Thank you very much. > > This leaves the empty-data issue (which we have a fix for) and the > switch to LZ4F. And

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

2023-03-24 Thread torikoshia
On 2023-03-23 02:50, Andres Freund wrote: Hi, Tom, see below - I wonder if should provide one more piece of infrastructure around the saved error stuff... Have you measured whether this has negative performance effects when *NOT* using the new option? As-is this does not work with

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

2023-03-24 Thread Peter Smith
Firstly, +1 for this patch. Directly jumping to the subscription options makes it much easier to navigate in the documentation instead of scrolling up and done in CREATE SUBSCRIPTION page looking for each parameter. Already (just experimenting with this patch) it is noticeably better. ~~ Anyway,

Re: ICU locale validation / canonicalization

2023-03-24 Thread Peter Eisentraut
On 24.03.23 07:39, Jeff Davis wrote: On Thu, 2023-03-23 at 10:16 -0700, Jeff Davis wrote: I could get rid of the SQL-callable function and move the rest of the changes into 0006. I'll see if that arrangement works better, and that way we can add the SQL-callable function later (or perhaps not

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

2023-03-24 Thread wangw.f...@fujitsu.com
On Fri, Mar 24, 2023 at 9:49 AM Peter Smith wrote: > On Thu, Mar 23, 2023 at 8:11 PM wangw.f...@fujitsu.com > wrote: > > > > On Thu, Mar 23, 2023 at 12:27 PM Peter Smith > wrote: > > > Here are some review comments for patch v20-0001. > > > ... > > > == > > >

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

2023-03-24 Thread wangw.f...@fujitsu.com
On Fri, Mar 24, 2023 at 14:17 PM Amit Kapila wrote: > > > > == > > > > src/test/subscription/t/028_row_filter.pl > > > > > > > > 7. > > > > +# insert data into partitioned table. > > > > +$node_publisher->safe_psql('postgres', > > > > + "INSERT INTO tab_rowfilter_viaroot_part(a) VALUES(13),

Re: Raising the SCRAM iteration count

2023-03-24 Thread Daniel Gustafsson
> On 24 Mar 2023, at 00:33, Michael Paquier wrote: > > On Thu, Mar 23, 2023 at 10:46:56PM +0100, Daniel Gustafsson wrote: >> I'm fairly convinced it's a timeout in the interactive psql session. Given >> how >> ugly the use of that is I'm sort of waiting for Andres' refactoring patch >> [0] to

Re: fix a typo in file src/backend/utils/adt/xid8funcs.c comment

2023-03-24 Thread Daniel Gustafsson
> On 24 Mar 2023, at 08:16, Junwang Zhao wrote: > > %s/pg_current_xact/pg_current_xact_id Pushed, thanks! -- Daniel Gustafsson

Re: running logical replication as the subscription owner

2023-03-24 Thread Jeff Davis
On Fri, 2023-03-03 at 11:02 -0500, Robert Haas wrote: > Hi, > > Here's a patch against master for $SUBJECT. It lacks documentation > changes and might have bugs, so please review if you're concerned > about this issue. I think the subject has a typo, you mean "as the table owner", right? >

Re: ICU locale validation / canonicalization

2023-03-24 Thread Peter Eisentraut
On 23.03.23 18:16, Jeff Davis wrote: In 0002, the error "opening default collator is not supported", should that be an assert or an elog?  Is it reachable by the user? It's not reachable by the user, but could catch a bug if we accidentally read a NULL field from the catalog or something like

Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

2023-03-24 Thread Peter Eisentraut
On 23.03.23 09:52, David Rowley wrote: One thing I thought about while looking is it stage 2 might do something similar for SearchSysCacheN. I then wondered if we're more likely to want to keep the localised __FILE__, __LINE__ and __func__ in the elog for those or not. It's probably less

Re: meson documentation build open issues

2023-03-24 Thread Andres Freund
Hi, On 2023-03-22 11:59:17 -0700, Andres Freund wrote: > Unless somebody sees a reason to wait, I am planning to commit: > meson: add install-{quiet, world} targets > meson: add install-{docs,doc-html,doc-man} targets > meson: make install_test_files more generic, rename to install_files

Re: Non-superuser subscription owners

2023-03-24 Thread Jeff Davis
On Wed, 2023-03-22 at 12:16 -0400, Robert Haas wrote: > I've posted a > patch for that at > http://postgr.es/m/CA+TgmoaSCkg9ww9oppPqqs+9RVqCexYCE6Aq=usypfnoode...@mail.gmail.com > and AFAICT everyone agrees with the idea, even if the patch itself > hasn't yet attracted any code reviews. But

fix a typo in file src/backend/utils/adt/xid8funcs.c comment

2023-03-24 Thread Junwang Zhao
%s/pg_current_xact/pg_current_xact_id -- Regards Junwang Zhao 0001-typo-replace-pg_current_xact-with-pg_current_xact_id.patch Description: Binary data

Re: Schema variables - new implementation for Postgres 15

2023-03-24 Thread Pavel Stehule
čt 23. 3. 2023 v 19:54 odesílatel Pavel Stehule napsal: > Hi > > > čt 23. 3. 2023 v 16:33 odesílatel Peter Eisentraut < > peter.eisentr...@enterprisedb.com> napsal: > >> On 17.03.23 21:50, Pavel Stehule wrote: >> > Hi >> > >> > rebase + fix-update pg_dump tests >> > >> > Regards >> > >> > Pavel

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

2023-03-24 Thread wangw.f...@fujitsu.com
On Fri, Mar 24, 2023 at 10:14 AM Peter Smith wrote: > Thanks for the information. > BTW, since this patch changes the signature of the API > pg_get_publication_tables, I assume the example in the CREATE > SUBSCRIPTION Notes [1] may not work anymore. The use case you mentioned is still work. >

Re: ICU locale validation / canonicalization

2023-03-24 Thread Jeff Davis
On Thu, 2023-03-23 at 10:16 -0700, Jeff Davis wrote: > I could get rid of the SQL-callable function and move the rest of the > changes into 0006. I'll see if that arrangement works better, and > that > way we can add the SQL-callable function later (or perhaps not at all > if it's not desired).

Re: Orphaned wait event

2023-03-24 Thread Bharath Rupireddy
On Fri, Mar 24, 2023 at 3:31 AM Thomas Munro wrote: > > On Thu, Mar 23, 2023 at 8:10 PM Bharath Rupireddy > wrote: > > Yeah, commit [1] removed the last trace of it. I wonder if we can add > > a WAIT_EVENT_SLRU_FLUSH_SYNC wait event in SlruSyncFileTag(), similar > > to mdsyncfiletag. This way,

Re: Orphaned wait event

2023-03-24 Thread Drouvot, Bertrand
Hi, On 3/23/23 11:00 PM, Thomas Munro wrote: I think if we want proper automation here we should look into a way to define wait events in a central file similar to what we do for src/backend/storage/lmgr/lwlocknames.txt. It could give the enum name, the display name, and the documentation

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

2023-03-24 Thread Amit Kapila
On Fri, Mar 24, 2023 at 7:19 AM Peter Smith wrote: > > Hi Wang-san. I looked at the v21-0001 patch. > > I don't have any new review comments -- only follow-ups for some of my > previous v20 comments that were rejected. > > On Thu, Mar 23, 2023 at 8:11 PM wangw.f...@fujitsu.com > wrote: > > > >

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

2023-03-24 Thread Brar Piening
On 24.03.2023 at 06:48, Brar Piening wrote: Since (after tweaking the color) the general visual appearence looked ok to me, I didn't bother with this any further. Also, if we go on with this we'll probably end up in an almost prototypical bikeshedding scenario where PostgreSQL itself is the

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-24 Thread Drouvot, Bertrand
Hi, On 3/24/23 1:04 AM, Michael Paquier wrote: On Thu, Mar 02, 2023 at 08:39:14AM +0100, Drouvot, Bertrand wrote: Yeah, there is some dependencies around this one. [1]: depends on it Current one depends of [2], [3] and [4] Waiting on Author is then the right state, thanks for having moved it