Re: [EXTERNAL] Support load balancing in libpq

2023-03-28 Thread Tatsuo Ishii
Hi, "unlikely" macro is used in libpq_prng_init() in the patch. I wonder if the place is really 'hot' to use "unlikely" macro. Best reagards, -- Tatsuo Ishii SRA OSS LLC English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp

Re: [EXTERNAL] Support load balancing in libpq

2023-03-28 Thread Daniel Gustafsson
> On 28 Mar 2023, at 09:16, Tatsuo Ishii wrote: > "unlikely" macro is used in libpq_prng_init() in the patch. I wonder > if the place is really 'hot' to use "unlikely" macro. I don't think it is, I was thinking to rewrite as the below sketch: { if (pg_prng_strong_seed(&conn->prng_state)))

Re: Moving forward with TDE

2023-03-28 Thread Chris Travers
On Tue, Mar 28, 2023 at 5:02 AM Stephen Frost wrote: > > > There's clearly user demand for it as there's a number of organizations >> > who have forks which are providing it in one shape or another. This >> > kind of splintering of the community is actually an actively bad thing >> > for the pro

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

2023-03-28 Thread Hayato Kuroda (Fujitsu)
Dear Amit, Thank you for reviewing! PSA new version. > Isn't it better to move the link-related part to the next line > wherever possible? Currently, it looks bit odd. Previously I preferred not to add a new line inside the tag, but it caused long-line. So I adjusted them not to be too short/l

Re: [EXTERNAL] Support load balancing in libpq

2023-03-28 Thread Jelte Fennema
I think it's fine to remove it. It originated from postmaster.c, where I copied the original implementation of libpq_prng_init from. On Tue, 28 Mar 2023 at 09:22, Daniel Gustafsson wrote: > > > On 28 Mar 2023, at 09:16, Tatsuo Ishii wrote: > > > "unlikely" macro is used in libpq_prng_init() in t

Re: [EXTERNAL] Support load balancing in libpq

2023-03-28 Thread Tatsuo Ishii
>> "unlikely" macro is used in libpq_prng_init() in the patch. I wonder >> if the place is really 'hot' to use "unlikely" macro. > > I don't think it is, I was thinking to rewrite as the below sketch: > > { > if (pg_prng_strong_seed(&conn->prng_state))) > return; > > /* fallback

Re: [EXTERNAL] Support load balancing in libpq

2023-03-28 Thread Tatsuo Ishii
> I think it's fine to remove it. It originated from postmaster.c, where > I copied the original implementation of libpq_prng_init from. I agree to remove unlikely macro here. Best reagards, -- Tatsuo Ishii SRA OSS LLC English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp

Re: Moving forward with TDE

2023-03-28 Thread Chris Travers
On Tue, Mar 28, 2023 at 8:35 AM 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 > > itself is c

Re: Should vacuum process config file reload more often

2023-03-28 Thread Kyotaro Horiguchi
At Mon, 27 Mar 2023 14:12:03 -0400, Melanie Plageman wrote in > So, I've attached an alternate version of the patchset which takes the > approach of having one commit which only enables cost-based delay GUC > refresh for VACUUM and another commit which enables it for autovacuum > and makes the c

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

2023-03-28 Thread Kyotaro Horiguchi
At Tue, 28 Mar 2023 15:16:36 +0900, Michael Paquier wrote in > On Tue, Mar 28, 2023 at 07:49:45AM +0200, Drouvot, Bertrand wrote: > > What about something like? > > > > for pg_stat_get_xact_blocks_fetched(): "block read requests for table or > > index, in the current > > transaction. This numb

Re: running logical replication as the subscription owner

2023-03-28 Thread Jelte Fennema
On Mon, 27 Mar 2023 at 22:47, Robert Haas wrote: > Can a table owner defend themselves > against a subscription owner who wants to usurp their privileges? I have a hard time following the discussion. And I think it's because there's lots of different possible privilege escalations to think about.

Re: running logical replication as the subscription owner

2023-03-28 Thread Jelte Fennema
On Tue, 28 Mar 2023 at 11:15, Jelte Fennema wrote: > Which can currently only be addressed by having 1 > subscription/publication pair for every table owner. Oops, moving sentences around in my email made me not explicitly reference escalation 1 anymore. The above should have been: 1 can currentl

Re: Save a few bytes in pg_attribute

2023-03-28 Thread Peter Eisentraut
On 23.03.23 13:45, Peter Eisentraut wrote: My suggestion is to use this patch and then consider the column encryption patch as it stands now. I have committed this.

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

2023-03-28 Thread Peter Eisentraut
On 24.03.23 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. Or otherwise somebody would have compla

Re: Initial Schema Sync for Logical Replication

2023-03-28 Thread Amit Kapila
On Mon, Mar 27, 2023 at 8:17 AM Masahiko Sawada wrote: > > On Fri, Mar 24, 2023 at 11:51 PM Kumar, Sachin wrote: > > > > > From: Amit Kapila > > > > I think we won't be able to use same snapshot because the transaction > > > > will > > > > be committed. > > > > In CreateSubscription() we can us

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

2023-03-28 Thread Dave Page
On Tue, 28 Mar 2023 at 10:46, Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 24.03.23 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 -

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

2023-03-28 Thread wangw.f...@fujitsu.com
On Tues, Mar 28, 2023 at 7:02 AM Jacob Champion wrote: > 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 tes

Re: Add standard collation UNICODE

2023-03-28 Thread Peter Eisentraut
On 23.03.23 21:16, Jeff Davis wrote: Another thought: for ICU, do we want the default collation to be UNICODE (root collation)? What we have now gets the default from the environment, which is consistent with the libc provider. But now that we have the UNICODE collation, it makes me wonder if we

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

2023-03-28 Thread wangw.f...@fujitsu.com
On Tues, Mar 28, 2023 at 18:00 PM Wang, Wei/王 威 wrote: > Attach the new patch. Sorry, I attached the wrong patch. Here is the correct new version patch which addressed all comments so far. Regards, Wang Wei v25-0001-Avoid-syncing-data-twice-for-the-publish_via_par.patch Description: v25-0001-

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

2023-03-28 Thread Brar Piening
On 28.03.2023 at 00:11, Peter Smith wrote: FYI, there is a lot of overlap between this last attachment and the patches of Kuroda-san's current thread here [1] which is also adding ids to create_subscription.sgml. (Anyway, I guess you might already be aware of that other thread because your new i

Move definition of standard collations from initdb to pg_collation.dat

2023-03-28 Thread Peter Eisentraut
While working on [0], I was wondering why the collations ucs_basic and unicode are not in pg_collation.dat. I traced this back through history, and I think this was just lost in a game of telephone. The initial commit for pg_collation.h (414c5a2ea6) has only the default collation in pg_collat

"variable not found in subplan target list"

2023-03-28 Thread Alvaro Herrera
I have to run now so can't dissect it, but while running sqlsmith on the SQL/JSON patch after Justin's report, I got $SUBJECT in this query: MERGE INTO public.target_parted as target_0 USING (select subq_0.c5 as c0, subq_0.c0 as c1, ref_0.a as c2, s

Re: Move definition of standard collations from initdb to pg_collation.dat

2023-03-28 Thread Tom Lane
Peter Eisentraut writes: > While working on [0], I was wondering why the collations ucs_basic and > unicode are not in pg_collation.dat. I traced this back through > history, and I think this was just lost in a game of telephone. > The initial commit for pg_collation.h (414c5a2ea6) has only the

Re: "variable not found in subplan target list"

2023-03-28 Thread Tom Lane
Alvaro Herrera writes: > I have to run now so can't dissect it, but while running sqlsmith on the > SQL/JSON patch after Justin's report, I got $SUBJECT in this query: Reproduces in HEAD and v15 too (once you replace pg_catalog.system_user with some function that exists in v15). So it's not the

Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths

2023-03-28 Thread Michael Paquier
On Mon, Dec 19, 2022 at 12:37:19PM +0100, Alvaro Herrera wrote: > I have created one in the January commitfest, > https://commitfest.postgresql.org/41/ > and rebased the patch on current master. (I have not reviewed this.) I have spent some time on that, and here are some comments with an updated

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

2023-03-28 Thread torikoshia
On 2023-03-27 23:28, Damir Belyalov wrote: Hi! I made the specified changes and my patch turned out the same as yours. The performance measurements were the same too. Thanks for your review and measurements. The only thing left to do is how not to add IGNORE_DATATYPE_ERRORS as a keyword. See

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

2023-03-28 Thread Damir Belyalov
> > I might misunderstand something, but I believe the v5 patch uses > copy_generic_opt_list and it does not add IGNORE_DATATYPE_ERRORS as a > keyword. > It modifies neither kwlist.h nor gram.y. > Sorry, didn't notice that. I think everything is alright now. Regards, Damir Belyalov Postgres Profe

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

2023-03-28 Thread Amit Kapila
On Tue, Mar 28, 2023 at 1:00 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Amit, > > Thank you for reviewing! PSA new version. > > > Isn't it better to move the link-related part to the next line > > wherever possible? Currently, it looks bit odd. > > Previously I preferred not to add a new line insi

Re: Add standard collation UNICODE

2023-03-28 Thread Joe Conway
On 3/28/23 06:07, Peter Eisentraut wrote: On 23.03.23 21:16, Jeff Davis wrote: Another thought: for ICU, do we want the default collation to be UNICODE (root collation)? What we have now gets the default from the environment, which is consistent with the libc provider. But now that we have the

Re: "variable not found in subplan target list"

2023-03-28 Thread Tom Lane
Alvaro Herrera writes: > I have to run now so can't dissect it, but while running sqlsmith on the > SQL/JSON patch after Justin's report, I got $SUBJECT in this query: I reduced this down to MERGE INTO public.target_parted as target_0 USING public.itest1 as ref_0 ON target_0.b = ref_0.a

Re: Hash table scans outside transactions

2023-03-28 Thread Ashutosh Bapat
Bumping it to attract some attention. On Tue, Mar 21, 2023 at 12:51 PM Ashutosh Bapat wrote: > > Hi, > Hash table scans (seq_scan_table/level) are cleaned up at the end of a > transaction in AtEOXact_HashTables(). If a hash seq scan continues > beyond transaction end it will meet "ERROR: no hash_

Re: "variable not found in subplan target list"

2023-03-28 Thread Tom Lane
I wrote: > I reduced this down to > MERGE INTO public.target_parted as target_0 > USING public.itest1 as ref_0 > ON target_0.b = ref_0.a > WHEN NOT MATCHED >THEN INSERT VALUES (42, 13); > The critical moving part seems to just be that the MERGE target > is a partitioned table

Re: Memory leak from ExecutorState context?

2023-03-28 Thread Jehan-Guillaume de Rorthais
On Tue, 28 Mar 2023 00:43:34 +0200 Tomas Vondra wrote: > On 3/27/23 23:13, Jehan-Guillaume de Rorthais wrote: > > Please, find in attachment a patch to allocate bufFiles in a dedicated > > context. I picked up your patch, backpatch'd it, went through it and did > > some minor changes to it. I hav

Re: TAP output format in pg_regress

2023-03-28 Thread Daniel Gustafsson
> On 15 Mar 2023, at 11:36, Peter Eisentraut > wrote: > > On 24.02.23 10:49, Daniel Gustafsson wrote: >> Another rebase on top of 337903a16f. Unless there are conflicting reviews, I >> consider this patch to be done and ready for going in during the next CF. > > I think this is just about as g

Re: Add standard collation UNICODE

2023-03-28 Thread Jeff Davis
On Tue, 2023-03-28 at 08:46 -0400, Joe Conway wrote: > > As long as we still have to initialize the libc locale fields to > > some > > language, I think it would be less confusing to keep the ICU locale > > on > > the same language. > > I definitely agree with that. Sounds good -- no changes then

Re: Infinite Interval

2023-03-28 Thread Ashutosh Bapat
On Sun, Mar 19, 2023 at 12:18 AM Joseph Koshakow wrote: > > The problem is that `secs = rint(secs)` rounds the seconds too early > and loses any fractional seconds. Do we have an overflow detecting > multiplication function for floats? We have float8_mul() which checks for overflow. typedef doubl

Re: SQL/JSON revisited

2023-03-28 Thread Erik Rijkers
Op 3/27/23 om 20:54 schreef Alvaro Herrera: Docs amended as I threatened. Other than that, this has required more > [v12-0001-SQL-JSON-constructors.patch] > [v12-0001-delta-uniqueifyJsonbObject-bugfix.patch] In doc/src/sgml/func.sgml, some minor stuff: 'which specify the data type returned'

Re: Infinite Interval

2023-03-28 Thread Ashutosh Bapat
On Sun, Mar 26, 2023 at 1:28 AM Tom Lane wrote: > > I think you can take it as read that simple C test programs on modern > platforms will exhibit IEEE-compliant handling of float infinities. > For the record, I tried the attached. It gives a warning at compilation time. $gcc float_inf.c float_i

Re: Infinite Interval

2023-03-28 Thread Ashutosh Bapat
On Mon, Mar 20, 2023 at 3:16 AM Joseph Koshakow wrote: > > > > On Sun, Mar 19, 2023 at 5:13 PM Tom Lane wrote: > > > >Did you actually write "if TIMESTAMP_IS_NOBEGIN(dt2)" and not > >"if (TIMESTAMP_IS_NOBEGIN(dt2))"? If the former, I'm not surprised > >that pgindent gets confused. T

Re: TAP output format in pg_regress

2023-03-28 Thread Daniel Gustafsson
> On 28 Mar 2023, at 15:26, Daniel Gustafsson wrote: > I think the attached is a good candidate for going in, but I would like to > see it > for another spin in the CF bot first. Another candidate due to a thinko which raised a compiler warning. -- Daniel Gustafsson v19-0001-pg_regress-Emit

Re: Move definition of standard collations from initdb to pg_collation.dat

2023-03-28 Thread Peter Eisentraut
On 28.03.23 13:33, Tom Lane wrote: While we're here, do we want to adopt some other spelling of "the root locale" than "und", in view of recent discoveries about the instability of that on old ICU versions? That issue was fixed by 3b50275b12, so we can keep using the "und" spelling.

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

2023-03-28 Thread Dave Cramer
On Sun, 26 Mar 2023 at 21:30, Tom Lane wrote: > Dave Cramer writes: > > On Sun, 26 Mar 2023 at 18:12, Tom Lane wrote: > >> I would not expect DISCARD ALL to reset a session-level property. > > > Well if we can't reset it with DISCARD ALL how would that work with > > pgbouncer, or any pool for t

Re: Support logical replication of global object commands

2023-03-28 Thread Zheng Li
> I think that there are some (possibly) tricky challenges that haven't > been discussed yet to support replicating global objects. > > First, as for publications having global objects (roles, databases, > and tablespaces), but storing them in database specific tables like > pg_publication doesn't

Re: Kerberos delegation support in libpq and postgres_fdw

2023-03-28 Thread Stephen Frost
Greetings, * Stephen Frost (sfr...@snowman.net) wrote: > * Greg Stark (st...@mit.edu) wrote: > > The CFBot says there's a function be_gssapi_get_proxy() which is > > undefined. Presumably this is a missing #ifdef or a definition that > > should be outside an #ifdef. > > Yup, just a couple of miss

Re: Missing update of all_hasnulls in BRIN opclasses

2023-03-28 Thread Tomas Vondra
Hi, It took me a while but I finally got back to reworking this to use the bt_info bit, as proposed by Alvaro. And it turned out to work great, because (a) it's a tuple-level flag, i.e. the right place, and (b) it does not overload existing flags. This greatly simplified the code in add_values_to

Re: "variable not found in subplan target list"

2023-03-28 Thread Tom Lane
I wrote: > The planner is reducing the scan of target_parted to > a dummy scan, as is reasonable, but it forgets to > provide ctid as an output from that scan; then the > parent join node is unhappy because it does have > a ctid output. So it looks like the problem is some > shortcut we take while

Re: Support logical replication of DDLs

2023-03-28 Thread Jonathan S. Katz
On 3/27/23 2:37 AM, Amit Kapila wrote: On Mon, Mar 27, 2023 at 2:52 AM Tom Lane wrote: And TBH, I don't think that I quite believe the premise in the first place. The whole point of using logical rather than physical replication is that the subscriber installation(s) aren't exactly like the

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2023-03-28 Thread Denis Laxalde
Hi Jelte, I had a look into your patchset (v16), did a quick review and played a bit with the feature. Patch 2 is missing the documentation about PQcancelSocket() and contains a few typos; please find attached a (fixup) patch to correct these. --- a/src/interfaces/libpq/libpq-fe.h +++ b/src/int

Re: Memory leak from ExecutorState context?

2023-03-28 Thread Jehan-Guillaume de Rorthais
Hi, Sorry for the late answer, I was reviewing the first patch and it took me some time to study and dig around. On Thu, 23 Mar 2023 08:07:04 -0400 Melanie Plageman wrote: > On Fri, Mar 10, 2023 at 1:51 PM Jehan-Guillaume de Rorthais > wrote: > > > So I guess the best thing would be to go thro

Re: Initial Schema Sync for Logical Replication

2023-03-28 Thread Masahiko Sawada
On Tue, Mar 28, 2023 at 6:47 PM Amit Kapila wrote: > > On Mon, Mar 27, 2023 at 8:17 AM Masahiko Sawada wrote: > > > > On Fri, Mar 24, 2023 at 11:51 PM Kumar, Sachin wrote: > > > > > > > From: Amit Kapila > > > > > I think we won't be able to use same snapshot because the transaction > > > > >

Re: Memory leak from ExecutorState context?

2023-03-28 Thread Tomas Vondra
On 3/28/23 15:17, Jehan-Guillaume de Rorthais wrote: > On Tue, 28 Mar 2023 00:43:34 +0200 > Tomas Vondra wrote: > >> On 3/27/23 23:13, Jehan-Guillaume de Rorthais wrote: >>> Please, find in attachment a patch to allocate bufFiles in a dedicated >>> context. I picked up your patch, backpatch'd

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2023-03-28 Thread Jelte Fennema
On Tue, 28 Mar 2023 at 16:54, Denis Laxalde wrote: > I had a look into your patchset (v16), did a quick review and played a > bit with the feature. > > Patch 2 is missing the documentation about PQcancelSocket() and contains > a few typos; please find attached a (fixup) patch to correct these. Th

Re: Add LZ4 compression in pg_dump

2023-03-28 Thread gkokolatos
--- Original Message --- On Friday, March 24th, 2023 at 10:30 AM, gkokola...@pm.me wrote: > > --- Original Message --- > On Thursday, March 23rd, 2023 at 6:10 PM, Tomas Vondra > tomas.von...@enterprisedb.com wrote: > > > This leaves the empty-data issue (which we have a f

Re: Commitfest 2023-03 starting tomorrow!

2023-03-28 Thread Gregory Stark (as CFM)
Status summary: Needs review: 116. Waiting on Author: 30. Ready for Committer: 32. Committed: 94. Moved to next CF: 17. Returned with Feedback: 6. Rejected: 6. Withdrawn: 18. Total: 319. Ok, here are the patches that have been stuck in "Waiting on Author" for a while. I divided t

Re: running logical replication as the subscription owner

2023-03-28 Thread Robert Haas
On Mon, Mar 27, 2023 at 6:08 PM Jelte Fennema wrote: > Attached is an updated version of your patch with what I had in mind > (admittedly it needed one more line than "just" the return to make it > work). But as you can see all previous tests for a lowly privileged > subscription owner that **cann

Re: zstd compression for pg_dump

2023-03-28 Thread Tomas Vondra
On 3/27/23 19:28, Justin Pryzby wrote: > 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

Re: logical decoding and replication of sequences, take 2

2023-03-28 Thread Masahiko Sawada
On Mon, Mar 27, 2023 at 11:46 PM Tomas Vondra wrote: > > > > 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

Re: Add LZ4 compression in pg_dump

2023-03-28 Thread Tomas Vondra
On 3/28/23 18:07, gkokola...@pm.me wrote: > > > > > > --- Original Message --- > On Friday, March 24th, 2023 at 10:30 AM, gkokola...@pm.me > wrote: > >> >> --- Original Message --- >> On Thursday, March 23rd, 2023 at 6:10 PM, Tomas Vondra >> tomas.von...@enterprisedb.com

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

2023-03-28 Thread Jacob Champion
On Tue, Mar 28, 2023 at 2:59 AM wangw.f...@fujitsu.com wrote: > The scenario of this bug is to subscribe to two publications at the same time, > and these two publications publish parent table and child table respectively. > And option via_root is specified in both publications or only in the > p

Re: Non-superuser subscription owners

2023-03-28 Thread Jeff Davis
On Fri, 2023-03-24 at 00:17 -0700, Jeff Davis 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. The above is not a hard objec

Re: running logical replication as the subscription owner

2023-03-28 Thread Robert Haas
On Tue, Mar 28, 2023 at 1:38 AM Jeff Davis wrote: > > If they do have those things then in > > theory they might be able to protect themselves, but in practice they > > are unlikely to be careful enough. I judge that practically every > > installation where table owners use triggers would be easi

Re: zstd compression for pg_dump

2023-03-28 Thread Kirk Wolak
On Tue, Mar 28, 2023 at 12:23 PM Tomas Vondra wrote: > On 3/27/23 19:28, Justin Pryzby wrote: > > 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, 2

Re: Add pg_walinspect function with block info columns

2023-03-28 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 7:47 PM Bharath Rupireddy wrote: > Hm, agreed. Changed in the attached v7-0002 patch. We can as well > write a case statement in the create function SQL to output forkname > instead forknumber, but I'd stop doing that to keep in sync with > pg_buffercache. I just don't see

Re: allow_in_place_tablespaces vs. pg_basebackup

2023-03-28 Thread Thomas Munro
On Tue, Mar 28, 2023 at 5:15 PM Thomas Munro wrote: > I guess we should add a test of -Fp too, to keep it working? Oops, that was already tested in existing tests, so I take that back.

Re: "variable not found in subplan target list"

2023-03-28 Thread Alvaro Herrera
So I'm back home and found a couple more weird errors in the log: MERGE INTO public.idxpart2 as target_0 USING (select 1 from public.xmltest2 as ref_0 inner join public.prt1_l_p1 as sample_0 inner join fkpart4.droppk as ref

Re: logical decoding and replication of sequences, take 2

2023-03-28 Thread Tomas Vondra
On 3/28/23 18:34, Masahiko Sawada wrote: > On Mon, Mar 27, 2023 at 11:46 PM Tomas Vondra > wrote: >> >> >> >> 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, an

Re: "variable not found in subplan target list"

2023-03-28 Thread Tom Lane
Alvaro Herrera writes: > So I'm back home and found a couple more weird errors in the log: > ERROR: mismatching PartitionPruneInfo found at part_prune_index 0 > DETALLE: plan node relids (b 1), pruneinfo relids (b 36) This one reproduces for me. > select > pg_catalog.pg_stat_get_buf_f

Re: POC: Better infrastructure for automated testing of concurrency issues

2023-03-28 Thread Gregory Stark (as CFM)
On Wed, 31 Aug 2022 at 20:52, Alexander Korotkov wrote: > > I'll continue work on this patch. The rebased patch is attached. It > implements stop events as configure option (not runtime GUC option). It looks like this patch isn't going to be ready this commitfest. And it hasn't received much di

Re: zstd compression for pg_dump

2023-03-28 Thread Tomas Vondra
On 3/28/23 20:03, Kirk Wolak wrote: > On Tue, Mar 28, 2023 at 12:23 PM Tomas Vondra > mailto:tomas.von...@enterprisedb.com>> > wrote: > > On 3/27/23 19:28, Justin Pryzby wrote: > > On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > >> On 3/16/23 05:50, Justin Pryzby wrote:

Re: Add LZ4 compression in pg_dump

2023-03-28 Thread Justin Pryzby
On Tue, Mar 28, 2023 at 06:40:03PM +0200, Tomas Vondra wrote: > On 3/28/23 18:07, gkokola...@pm.me wrote: > > --- Original Message --- > > On Friday, March 24th, 2023 at 10:30 AM, gkokola...@pm.me > > wrote: > > > >> --- Original Message --- > >> On Thursday, March 23rd, 2023 at

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

2023-03-28 Thread Gregory Stark (as CFM)
FYI I attached this thread to https://commitfest.postgresql.org/42/3777 which I believe is the same issue. I mistakenly had this listed as a CF entry with no discussion for a long time due to that missing link. -- Gregory Stark As Commitfest Manager

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-03-28 Thread Gregory Stark (as CFM)
On Tue, 3 Jan 2023 at 14:16, Tom Lane wrote: > > Vik Fearing writes: > > > I don't think we should add that syntax until I do get it through the > > committee, just in case they change something. > > Agreed. So this is something we won't be able to put into v16; > it'll have to wait till there's

Re: running logical replication as the subscription owner

2023-03-28 Thread Jelte Fennema
On Tue, 28 Mar 2023 at 18:13, Robert Haas wrote: > > On Mon, Mar 27, 2023 at 6:08 PM Jelte Fennema wrote: > > For high privileged subscription owners, > > we downgrade to the permissions of the table owner, but for low > > privileged ones we care about permissions of the subscription owner > > it

Re: [PATCH]Feature improvement for MERGE tab completion

2023-03-28 Thread Gregory Stark (as CFM)
It looks like this remaining work isn't going to happen this CF and therefore this release. There hasn't been an update since January when Dean Rasheed posted a review. Unless there's any updates soon I'll move this on to the next commitfest or mark it returned with feedback. -- Gregory Stark As

Re: [PATCH]Feature improvement for MERGE tab completion

2023-03-28 Thread Gregory Stark (as CFM)
Ah, another thread with a bouncing email address... Please respond to to thread from this point to avoid bounces. -- Gregory Stark As Commitfest Manager

Re: Why mark empty pages all visible?

2023-03-28 Thread Andres Freund
Hi, On 2023-03-27 21:51:09 -0700, Peter Geoghegan wrote: > On Mon, Mar 27, 2023 at 9:32 PM Andres Freund wrote: > > > You haven't said anything about the leading cause of marking empty > > > pages all-frozen, by far: lazy_vacuum_heap_page(). Should it also stop > > > marking empty pages all-froze

Re: Schema variables - new implementation for Postgres 15

2023-03-28 Thread Pavel Stehule
ne 26. 3. 2023 v 13:32 odesílatel Julien Rouhaud napsal: > Hi, > > I just have a few minor wording improvements for the various comments / > documentation you quoted. > > On Sun, Mar 26, 2023 at 08:53:49AM +0200, Pavel Stehule wrote: > > út 21. 3. 2023 v 17:18 odesílatel Peter Eisentraut < > > pe

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-03-28 Thread Isaac Morland
On Mon, 19 Dec 2022 at 17:57, Corey Huinker wrote: > > Attached is my work in progress to implement the changes to the CAST() > function as proposed by Vik Fearing. > > CAST(expr AS typename NULL ON ERROR) > will use error-safe functions to do the cast of expr, and will return > NULL if the c

Re: Documentation for building with meson

2023-03-28 Thread samay sharma
Hi, On Wed, Mar 15, 2023 at 4:28 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > > [PATCH v8 1/5] Make minor additions and corrections to meson docs > > The last hunk revealed that there is some mixing up between meson setup > and meson configure. This goes a bit further. For

Re: Schema variables - new implementation for Postgres 15

2023-03-28 Thread Pavel Stehule
Hi ne 26. 3. 2023 v 19:53 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Sun, Mar 26, 2023 at 07:32:05PM +0800, Julien Rouhaud wrote: > > Hi, > > > > I just have a few minor wording improvements for the various comments / > > documentation you quoted. > > Talking about documentat

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2023-03-28 Thread stephane tachoires
Hi, Patch v15-0001-ALTER-TABLE-MERGE-PARTITIONS-command.patch Apply nicely. One warning on meson compile (configure -Dssl=openssl -Dldap=enabled -Dauto_features=enabled -DPG_TEST_EXTRA='ssl,ldap,kerberos' -Dbsd_auth=disabled -Dbonjour=disabled -Dpam=disabled -Dpltcl=disabled -Dsystemd=disabled

Re: POC: Better infrastructure for automated testing of concurrency issues

2023-03-28 Thread Alexander Korotkov
On Tue, Mar 28, 2023 at 9:44 PM Gregory Stark (as CFM) wrote: > On Wed, 31 Aug 2022 at 20:52, Alexander Korotkov wrote: > > > > I'll continue work on this patch. The rebased patch is attached. It > > implements stop events as configure option (not runtime GUC option). > > It looks like this pat

Re: Some revises in adding sorting path

2023-03-28 Thread David Rowley
On Tue, 21 Feb 2023 at 22:02, Richard Guo wrote: > Looking at the codes now I have some concern that what we do in > create_ordered_paths for partial paths may have already been done in > generate_useful_gather_paths, especially when query_pathkeys is equal to > sort_pathkeys. Not sure if this is

Re: Why mark empty pages all visible?

2023-03-28 Thread Peter Geoghegan
On Tue, Mar 28, 2023 at 12:01 PM Andres Freund wrote: > I will probably make that argument - so far I was just trying to understand > the intent of the current code. There aren't really comments explaining why we > want to mark currently-pinned empty/new pages all-visible and enter them into > the

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-03-28 Thread Corey Huinker
On Tue, Mar 28, 2023 at 2:53 PM Gregory Stark (as CFM) wrote: > On Tue, 3 Jan 2023 at 14:16, Tom Lane wrote: > > > > Vik Fearing writes: > > > > > I don't think we should add that syntax until I do get it through the > > > committee, just in case they change something. > > > > Agreed. So this

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-03-28 Thread Corey Huinker
On Tue, Mar 28, 2023 at 3:25 PM Isaac Morland wrote: > On Mon, 19 Dec 2022 at 17:57, Corey Huinker > wrote: > >> >> Attached is my work in progress to implement the changes to the CAST() >> function as proposed by Vik Fearing. >> >> CAST(expr AS typename NULL ON ERROR) >> will use error-safe

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

2023-03-28 Thread Robert Haas
On Mon, Mar 27, 2023 at 4:52 PM Peter Geoghegan wrote: > This is fine, as far as it goes. Obviously it fixes the immediate problem. OK, I've committed and back-patched this fix to v14, just like the erroneous commit that created the issue. -- Robert Haas EDB: http://www.enterprisedb.com

Re: Support logical replication of DDLs

2023-03-28 Thread Zheng Li
On Sun, Mar 26, 2023 at 5:22 PM Tom Lane wrote: > I spent some time looking through this thread to try to get a sense > of the state of things, and I came away quite depressed. The patchset > has ballooned to over 2MB, which is a couple orders of magnitude > larger than anyone could hope to mean

Re: Add LZ4 compression in pg_dump

2023-03-28 Thread Tomas Vondra
On 3/28/23 18:07, gkokola...@pm.me wrote: > > --- Original Message --- > On Friday, March 24th, 2023 at 10:30 AM, gkokola...@pm.me > wrote: > >> >> --- Original Message --- >> On Thursday, March 23rd, 2023 at 6:10 PM, Tomas Vondra >> tomas.von...@enterprisedb.com wrote: >> >>>

Re: Why mark empty pages all visible?

2023-03-28 Thread Andres Freund
Hi, On 2023-03-28 13:05:19 -0700, Peter Geoghegan wrote: > On Tue, Mar 28, 2023 at 12:01 PM Andres Freund wrote: > > I will probably make that argument - so far I was just trying to understand > > the intent of the current code. There aren't really comments explaining why > > we > > want to mark

Re: zstd compression for pg_dump

2023-03-28 Thread Jacob Champion
On Wed, Mar 15, 2023 at 9:50 PM Justin Pryzby wrote: > On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: > > It looks like pg_dump's meson.build is missing dependencies on zstd > > (meson couldn't find the headers in the subproject without them). > > I saw that this was added for LZ4

Re: Add pg_walinspect function with block info columns

2023-03-28 Thread Michael Paquier
On Tue, Mar 28, 2023 at 11:15:17AM -0700, Peter Geoghegan wrote: > On Mon, Mar 27, 2023 at 7:47 PM Bharath Rupireddy > wrote: >> Hm, agreed. Changed in the attached v7-0002 patch. We can as well >> write a case statement in the create function SQL to output forkname >> instead forknumber, but I'd

Re: running logical replication as the subscription owner

2023-03-28 Thread Jeff Davis
On Tue, 2023-03-28 at 13:55 -0400, Robert Haas wrote: > Oh, interesting. I hadn't realized we were doing that, and I do think > that narrows the vulnerability quite a bit. It's good to know I wasn't missing something obvious. > bsent logical replication, you don't really need to worry > about whe

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

2023-03-28 Thread Jeff Davis
On Tue, 2023-03-28 at 10:22 -0400, Dave Cramer wrote: > OK, IIUC what you are proposing here is that there would be a > separate pool for  > database, user, and OIDs. This doesn't seem too flexible. For > instance if I create a UDT and then want it to be returned  > as binary then I have to reconfi

Re: Why mark empty pages all visible?

2023-03-28 Thread Peter Geoghegan
On Tue, Mar 28, 2023 at 3:29 PM Andres Freund wrote: > Why is that? It's as clear a signal of concurrent activity on the buffer > you're going to get. Not immediately getting a cleanup lock in VACUUM is informative to the extent that you only care about what is happening that very nanosecond. If

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

2023-03-28 Thread Michael Paquier
On Tue, Mar 28, 2023 at 05:43:26PM +0900, Kyotaro Horiguchi wrote: > No. Fine by me, except that "block read requests" seems to suggest > kernel read() calls, maybe because it's not clear whether "block" > refers to our buffer blocks or file blocks to me.. If it is generally > clear, I'm fine with

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2023-03-28 Thread Michael Paquier
On Tue, Mar 28, 2023 at 02:56:28PM +0900, Michael Paquier wrote: > Hmm. This is a good point. It is true that the patch feels > incomplete on this side. I don't see why we could not be flexible, > and allow a value of 0 in a partitioned table's relam to mean that we > would pick up the database

Re: Should vacuum process config file reload more often

2023-03-28 Thread Melanie Plageman
On Tue, Mar 28, 2023 at 4:21 AM Kyotaro Horiguchi wrote: > > At Mon, 27 Mar 2023 14:12:03 -0400, Melanie Plageman > wrote in > > So, I've attached an alternate version of the patchset which takes the > > approach of having one commit which only enables cost-based delay GUC > > refresh for VACUUM

Re: Add LZ4 compression in pg_dump

2023-03-28 Thread Tomas Vondra
On 3/28/23 00:34, gkokola...@pm.me wrote: > > ... > >> Got it. In that case I agree it's fine to do that in a single commit. > > For what is worth, I think that this patch should get a +1 and get in. It > solves the empty writes problem and includes a test to a previous untested > case. > Pushe

Re: [RFC] Add jit deform_counter

2023-03-28 Thread David Rowley
On Sun, 12 Jun 2022 at 21:14, Dmitry Dolgov <9erthali...@gmail.com> wrote: > I've noticed that JIT performance counter generation_counter seems to include > actions, relevant for both jit_expressions and jit_tuple_deforming options. It > means one can't directly see what is the influence of jit_tup

  1   2   >