Re: GUC for temporarily disabling event triggers

2023-09-06 Thread Michael Paquier
On Wed, Sep 06, 2023 at 10:23:55PM +0200, Daniel Gustafsson wrote: > > On 6 Sep 2023, at 16:22, Robert Haas wrote: >> I usually prefer to give things a positive sense, talking about >> whether things are enabled rather than disabled. I'd do event_triggers >> = off | on, like we have for

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-06 Thread Peter Smith
Hi, here are my code review comments for the patch v32-0002 == src/bin/pg_upgrade/check.c 1. check_new_cluster_logical_replication_slots + res = executeQueryOrDie(conn, "SHOW max_replication_slots;"); + max_replication_slots = atoi(PQgetvalue(res, 0, 0)); + + if (PQntuples(res) != 1) +

psql help message contains excessive indentations

2023-09-06 Thread Kyotaro Horiguchi
This topic is extracted from [1]. As mentioned there, in psql, running \? displays the following lines. > \gdesc describe result of query, without executing it > \gexec execute query, then execute each value in its result > \gset [PREFIX] execute

Re: persist logical slots to disk during shutdown checkpoint

2023-09-06 Thread vignesh C
On Wed, 6 Sept 2023 at 12:09, Dilip Kumar wrote: > > Other than that the patch LGTM. pgindent reported that the new comments added need to be re-adjusted, here is an updated patch for the same. I also verified the following: a) patch applies neatly on HEAD b) make check-world passes c) pgindent

Re: Unlogged relation copy is not fsync'd

2023-09-06 Thread Michael Paquier
On Tue, Sep 05, 2023 at 02:20:18PM -0400, Robert Haas wrote: > The general rule throughout the system is that the init-fork of an > unlogged relation is treated the same as a permanent relation: it is > WAL-logged and fsyncd. But the other forks of an unlogged relation are > neither WAL-logged nor

Re: pg_basebackup: Always return valid temporary slot names

2023-09-06 Thread Michael Paquier
On Thu, Sep 07, 2023 at 01:23:33PM +0900, Michael Paquier wrote: > PQbackendPID() returns a signed value, likely coming from the fact > that it was thought to be OK back in the days where PIDs were always > defined with less bits. The fix is OK taken in isolation, so I am > going to apply it in a

Re: pg_basebackup: Always return valid temporary slot names

2023-09-06 Thread Michael Paquier
On Tue, Sep 05, 2023 at 02:06:14PM +0200, Daniel Gustafsson wrote: >> For that purpose it's actually more secure to use all bits for random >> data, instead of keeping one bit always 0. > > If it's common practice to submit a pid which isn't a pid, I wonder if longer > term it's worth inventing a

Re: A failure in 031_recovery_conflict.pl on Debian/s390x

2023-09-06 Thread Thomas Munro
On Tue, Aug 8, 2023 at 11:08 AM Andres Freund wrote: > On 2023-08-07 12:57:40 +0200, Christoph Berg wrote: > > v8 worked better. It succeeded a few times (at least 12, my screen > > scrollback didn't catch more) before erroring like this: > > > [10:21:58.410](0.151s) ok 15 - startup deadlock:

Re: Synchronizing slots from primary to standby

2023-09-06 Thread shveta malik
On Fri, Aug 25, 2023 at 2:15 PM Alvaro Herrera wrote: > > Wait a minute ... > > From bac0fbef8b203c530e5117b0b7cfee13cfab78b9 Mon Sep 17 00:00:00 2001 > From: Bharath Rupireddy > Date: Sat, 22 Jul 2023 10:17:48 + > Subject: [PATCH v13 1/2] Allow logical walsenders to wait for physical >

Re: A failure in 031_recovery_conflict.pl on Debian/s390x

2023-09-06 Thread Thomas Munro
On Sun, Aug 13, 2023 at 9:00 AM Andres Freund wrote: > On 2023-08-12 15:50:24 +1200, Thomas Munro wrote: > > Thanks. I realised that it's easy enough to test that theory about > > cleanup locks by hacking ConditionalLockBufferForCleanup() to return > > false randomly. Then the test occasionally

Re: A minor adjustment to get_cheapest_path_for_pathkeys

2023-09-06 Thread Richard Guo
On Wed, Sep 6, 2023 at 8:50 PM Robert Haas wrote: > On Wed, Sep 6, 2023 at 2:45 AM Andy Fan wrote: > > In my opinion, we can do some stuff to improve the ROI. > > - Authors should do as much as possible, mainly a better commit > > message. As for this patch, the commit message is "

Re: Add 'worker_type' to pg_stat_subscription

2023-09-06 Thread Peter Smith
On Wed, Sep 6, 2023 at 9:49 AM Nathan Bossart wrote: > > On Wed, Sep 06, 2023 at 09:02:21AM +1200, Peter Smith wrote: > > On Sat, Sep 2, 2023 at 7:41 AM Nathan Bossart > > wrote: > >> I see that the table refers to "leader apply workers". Would those show up > >> as parallel apply workers in

Re: A failure in 031_recovery_conflict.pl on Debian/s390x

2023-09-06 Thread Thomas Munro
I have now disabled the test in 15 and 16 (like the older branches). I'll see about getting the fixes into master today, and we can contemplate back-patching later, after we've collected a convincing volume of test results from the build farm, CI and hopefully your s390x master snapshot builds (if

Re: should frontend tools use syncfs() ?

2023-09-06 Thread Nathan Bossart
On Tue, Sep 05, 2023 at 05:08:53PM -0700, Nathan Bossart wrote: > I've committed 0001 for now. I plan to commit the rest in the next couple > of days. Committed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Can a role have indirect ADMIN OPTION on another role?

2023-09-06 Thread David G. Johnston
On Wed, Sep 6, 2023 at 1:55 PM Ashutosh Sharma wrote: > But what if roleB doesn't want to give roleA access to > the certain objects it owns. Not doable - roleA can always pretend they are roleB one way or another since roleA made roleB. David J.

Re: Performance degradation on concurrent COPY into a single relation in PG16.

2023-09-06 Thread Tom Lane
Andres Freund writes: > On 2023-08-16 13:15:46 +0200, Alvaro Herrera wrote: >> Since the wins from this patch were replicated and it has been pushed, I >> understand that this open item can be marked as closed, so I've done >> that. > Thanks! It turns out that this patch is what's making

Re: Eliminate redundant tuple visibility check in vacuum

2023-09-06 Thread Melanie Plageman
On Wed, Sep 6, 2023 at 1:04 PM Robert Haas wrote: > > On Thu, Aug 31, 2023 at 6:29 PM Melanie Plageman > wrote: > > I have changed this. > > I spent a bunch of time today looking at this, thinking maybe I could > commit it. But then I got cold feet. > > With these patches applied, PruneResult

Re: GUC for temporarily disabling event triggers

2023-09-06 Thread Daniel Gustafsson
> On 6 Sep 2023, at 16:22, Robert Haas wrote: > On Wed, Sep 6, 2023 at 4:50 AM Daniel Gustafsson wrote: >> Fair enough, how about disable_event_trigger instead as per the attached? > > I usually prefer to give things a positive sense, talking about > whether things are enabled rather than

Re: Eager page freeze criteria clarification

2023-09-06 Thread Robert Haas
On Wed, Sep 6, 2023 at 12:20 PM Peter Geoghegan wrote: > This was a case where index vacuuming was never required. It's just a > simple and easy to recreate example of what I think of as a more > general problem. OK. > Why wouldn't we expect a table to have some pages that ought to be > frozen

Simple CustomScan example

2023-09-06 Thread Chris Cleveland
I'm trying to write a custom scan. It's pretty confusing. I've read the documentation at https://www.postgresql.org/docs/current/custom-scan.html, and I've scanned the code in Citus Columnar and in Timescale, both of which are quite complex. Is anyone aware of code with a simple example of a

Re: Release notes wording about logical replication as table owner

2023-09-06 Thread Bruce Momjian
On Wed, Sep 6, 2023 at 09:29:25PM +0200, Magnus Hagander wrote: > We have: > > "This improves security and now requires subscription owners to be > either superusers or to have SET ROLE permissions on all tables in the > replication set. The previous behavior of performing all operations as >

Release notes wording about logical replication as table owner

2023-09-06 Thread Magnus Hagander
We have: "This improves security and now requires subscription owners to be either superusers or to have SET ROLE permissions on all tables in the replication set. The previous behavior of performing all operations as the subscription owner can be enabled with the subscription run_as_owner

Re: Obsolete reference to pg_relation in comment

2023-09-06 Thread Bruce Momjian
On Wed, Jul 26, 2023 at 05:14:08PM -0400, Tom Lane wrote: > Nathan Bossart writes: > > On Wed, Jul 26, 2023 at 06:48:51PM +0100, Dagfinn Ilmari Mannsåker wrote: > >> * All accesses to pg_largeobject and its index make use of a single > >> Relation > >> - * reference, so that we only need to

Re: information_schema and not-null constraints

2023-09-06 Thread Vik Fearing
On 9/6/23 05:40, Tom Lane wrote: Vik Fearing writes: On 9/6/23 02:53, Tom Lane wrote: What solution do you propose? Starting to enforce the spec's rather arbitrary requirement that constraint names be unique per-schema is a complete nonstarter. Changing the set of columns in a spec-defined

Re: Configurable FP_LOCK_SLOTS_PER_BACKEND

2023-09-06 Thread Jeremy Schneider
On 8/8/23 3:04 PM, Andres Freund wrote: > On 2023-08-08 16:44:37 -0400, Robert Haas wrote: >> On Mon, Aug 7, 2023 at 6:05 PM Andres Freund wrote: >>> I think the biggest flaw of the locking scheme is that the LockHash locks >>> protect two, somewhat independent, things: >>> 1) the set of

Re: Can a role have indirect ADMIN OPTION on another role?

2023-09-06 Thread Robert Haas
On Wed, Sep 6, 2023 at 1:33 PM Ashutosh Sharma wrote: > Actually I have one more question. With this new design, assuming that > createrole_self_grant is set to 'set, inherit' in postgresql.conf and > if roleA creates roleB. So, in this case, roleA will inherit > permissions of roleB which means

Re: information_schema and not-null constraints

2023-09-06 Thread Alvaro Herrera
On 2023-Sep-04, Alvaro Herrera wrote: > In reference to [1], 0001 attached to this email contains the updated > view definitions that I propose. Given the downthread discussion, I propose the attached. There are no changes to v2, other than dropping the test part. We can improve the situation

Re: Can a role have indirect ADMIN OPTION on another role?

2023-09-06 Thread Ashutosh Sharma
On Wed, Sep 6, 2023 at 9:03 PM Robert Haas wrote: > > On Wed, Sep 6, 2023 at 11:14 AM Ashutosh Sharma wrote: > > In PG-16, I see that we have made a lot of changes in the area roles > > and privileges. I have a question related to this and here is my > > question: > > > > Let's say there is a

Re: Eliminate redundant tuple visibility check in vacuum

2023-09-06 Thread Robert Haas
On Thu, Aug 31, 2023 at 6:29 PM Melanie Plageman wrote: > I have changed this. I spent a bunch of time today looking at this, thinking maybe I could commit it. But then I got cold feet. With these patches applied, PruneResult ends up being declared in heapam.h, with a comment that says /* State

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-06 Thread Hayato Kuroda (Fujitsu)
Dear Amit, Thank you for reviewing! > > I also think referring to the conflicting field would be better not > only for the purpose of avoiding extra code but also to give accurate > information about invalidated slots for which we want to give an > error. Fixed. > Additionally, I think we

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-06 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > > I think it would be better to write problematic slots in the script > file like we are doing in the function > check_for_composite_data_type_usage()->check_for_data_types_usage() > and give a message suggesting what the user can do as we are doing in >

Re: Debian 12 gcc warning

2023-09-06 Thread Bruce Momjian
On Wed, Aug 30, 2023 at 11:34:22AM -0400, Bruce Momjian wrote: > Good news, I was able to prevent the bug by causing compiling of > clauses.c to use -O2 by adding this to src/Makefile.custom: > > clauses.o : CFLAGS+=-O2 > > Here is my submitted bug report: > >

Re: Eager page freeze criteria clarification

2023-09-06 Thread Peter Geoghegan
On Wed, Sep 6, 2023 at 7:46 AM Robert Haas wrote: > It's interesting that when you raised the threshold the rate of > vacuuming dropped to zero. I haven't seen that behavior. pgbench does > rely very, very heavily on HOT-pruning, so VACUUM only cleans up a > small percentage of the dead tuples

Re: Can a role have indirect ADMIN OPTION on another role?

2023-09-06 Thread Robert Haas
On Wed, Sep 6, 2023 at 11:14 AM Ashutosh Sharma wrote: > In PG-16, I see that we have made a lot of changes in the area roles > and privileges. I have a question related to this and here is my > question: > > Let's say there is a roleA who creates roleB and then roleB creates > another role, say

Re: remaining sql/json patches

2023-09-06 Thread Alvaro Herrera
0001 is quite mysterious to me. I've been reading it but I'm not sure I grok it, so I don't have anything too intelligent to say about it at this point. But here are my thoughts anyway. Assert()ing that a pointer is not null, and in the next line dereferencing that pointer, is useless: the

Re: Eager page freeze criteria clarification

2023-09-06 Thread Robert Haas
On Fri, Sep 1, 2023 at 9:07 PM Peter Geoghegan wrote: > When I reported this a couple of years ago, I noticed that autovacuum > would spin whenever I set autovacuum_vacuum_scale_factor to 0.02. But > autovacuum would *never* run (outside of antiwraparound autovacuums) > when it was set just a

Re: Eager page freeze criteria clarification

2023-09-06 Thread Robert Haas
On Wed, Sep 6, 2023 at 1:09 AM Andres Freund wrote: > Yea, it'd be useful to have a reasonably approximate wall clock time for the > last modification of a page. We just don't have infrastructure for determining > that. We'd need an LSN->time mapping (xid->time wouldn't be particularly > useful,

Re: GUC for temporarily disabling event triggers

2023-09-06 Thread Robert Haas
On Wed, Sep 6, 2023 at 4:50 AM Daniel Gustafsson wrote: > > On 5 Sep 2023, at 17:29, Robert Haas wrote: > > On Tue, Sep 5, 2023 at 8:12 AM Daniel Gustafsson wrote: > > >> The attached version of the patch replaces it with a boolean flag for > >> turning > >> off all event triggers, and I also

Re: generic plans and "initial" pruning

2023-09-06 Thread Robert Haas
On Wed, Sep 6, 2023 at 5:12 AM Amit Langote wrote: > Attached updated patches. Thanks for the review. I think 0001 looks ready to commit. I'm not sure that the commit message needs to mention future patches here, since this code cleanup seems like a good idea regardless, but if you feel

Re: Output affected rows in EXPLAIN

2023-09-06 Thread Tom Lane
Damir Belyalov writes: > I create a patch that outputs affected rows in EXPLAIN that occur by > INSERT/UPDATE/DELETE. > Despite the fact that commands in EXPLAIN ANALYZE query are executed as > usual, EXPLAIN doesn't show outputting affected rows as in these commands. > The patch fixes this

Re: pg_stats and range statistics

2023-09-06 Thread jian he
hi. I played around with the 2023-Apr 4 latest patch. +lower(ARRAY[numrange(1.1,2.2),numrange(3.3,4.4)]) should be + ranges_lower(ARRAY[numrange(1.1,2.2),numrange(3.3,4.4)]) +upper(ARRAY[numrange(1.1,2.2),numrange(3.3,4.4)]) should be +

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-06 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for reviewing! > > == > src/bin/pg_upgrade/controldata.c > > 1. get_control_data > > + if (GET_MAJOR_VERSION(cluster->major_version) >= 1700) > + { > + bool have_error = false; > + > + p = strchr(p, ':'); > + > + if (p == NULL || strlen(p) <= 1) > + pg_fatal("%d:

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-06 Thread Hayato Kuroda (Fujitsu)
Dear Hou, Thank you for giving comments! PSA new version. 0001 is updated based on the forked thread. > > 1. > > + res = executeQueryOrDie(conn, "SHOW wal_level;"); > + wal_level = PQgetvalue(res, 0, 0); > > + res = executeQueryOrDie(conn, "SHOW wal_level;"); > + wal_level =

Re: Output affected rows in EXPLAIN

2023-09-06 Thread Daniel Gustafsson
> On 6 Sep 2023, at 14:49, Damir Belyalov wrote > The patch fixes this problem. Given that EXPLAIN ANALYZE has worked like for a very long time, which problem is it you have identified? I'm also not convinced that the added "EXPLAIN" in the below plan is an improvement in any way. postgres=#

Re: Optimize planner memory consumption for huge arrays

2023-09-06 Thread Ashutosh Bapat
Hi Lepikhov, Thanks for using my patch and I am glad that you found it useful. On Mon, Sep 4, 2023 at 10:56 AM Lepikhov Andrei wrote: > > Hi, hackers, > > Looking at the planner behaviour with the memory consumption patch [1], I > figured out that arrays increase memory consumption by the

Re: A minor adjustment to get_cheapest_path_for_pathkeys

2023-09-06 Thread Andy Fan
On Wed, Sep 6, 2023 at 8:50 PM Robert Haas wrote: > On Wed, Sep 6, 2023 at 2:45 AM Andy Fan wrote: > > I guess the *valuable* sometimes means the effort we pay is greater > > than the benefit we get, As for this patch, the benefit is not huge (it > > is possible the compiler already does

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

2023-09-06 Thread Masahiko Sawada
On Wed, Sep 6, 2023 at 3:23 PM John Naylor wrote: > > > On Mon, Aug 28, 2023 at 9:44 PM Masahiko Sawada wrote: > > > > I've attached v42 patch set. I improved tidstore regression test codes > > in addition of imcorporating the above comments. > > Seems fine at a glance, thanks. I will build on

Re: A minor adjustment to get_cheapest_path_for_pathkeys

2023-09-06 Thread Robert Haas
On Wed, Sep 6, 2023 at 2:45 AM Andy Fan wrote: > I guess the *valuable* sometimes means the effort we pay is greater > than the benefit we get, As for this patch, the benefit is not huge (it > is possible the compiler already does that). and the most effort we pay > should be committer's

Output affected rows in EXPLAIN

2023-09-06 Thread Damir Belyalov
I create a patch that outputs affected rows in EXPLAIN that occur by INSERT/UPDATE/DELETE. Despite the fact that commands in EXPLAIN ANALYZE query are executed as usual, EXPLAIN doesn't show outputting affected rows as in these commands. The patch fixes this problem. Examples: explain analyze

make add_paths_to_append_rel aware of startup cost

2023-09-06 Thread Andy Fan
Hi: This thread is a refactor of thread [1] for easier communication. Currently add_paths_to_append_rel overlooked the startup cost for creating append path, so it may have lost some optimization chances. After a glance, the following 4 identifiers can be impacted. Identifier 1: SELECT ..

Re: How to add a new pg oid?

2023-09-06 Thread jacktby jacktby
> 2023年9月6日 18:50,jacktby jacktby 写道: > > > >> 2023年9月6日 18:19,jacktby jacktby 写道: >> >> >> >>> 2023年9月6日 01:47,David G. Johnston 写道: >>> >>> OIDs don't exist independently of the data they are associated with. Give >>> more context if you want a better answer. Or just go look at

Re: Transaction timeout

2023-09-06 Thread Andrey M. Borodin
Thanks for looking into this! > On 6 Sep 2023, at 13:16, Fujii Masao wrote: > > While testing v4 patch, I noticed it doesn't handle the COMMIT AND CHAIN case > correctly. > When COMMIT AND CHAIN is executed, I believe the transaction timeout counter > should reset > and start from zero with

Re: pgbnech: allow to cancel queries during benchmark

2023-09-06 Thread Yugo NAGATA
Hi Fabien, On Thu, 10 Aug 2023 12:32:44 +0900 Yugo NAGATA wrote: > On Wed, 9 Aug 2023 11:18:43 +0200 (CEST) > Fabien COELHO wrote: > > > > > I forgot, about the test: > > > > I think that it should be integrated in the existing > > "001_pgbench_with_server.pl" script, because a TAP script

Re: information_schema and not-null constraints

2023-09-06 Thread Peter Eisentraut
On 05.09.23 18:24, Alvaro Herrera wrote: On 2023-Sep-05, Peter Eisentraut wrote: The following information schema views are affected by the not-null constraint catalog entries: 1. CHECK_CONSTRAINTS 2. CONSTRAINT_COLUMN_USAGE 3. DOMAIN_CONSTRAINTS 4. TABLE_CONSTRAINTS Note that 1 and 3 also

Re: pg_upgrade and logical replication

2023-09-06 Thread vignesh C
On Wed, 19 Jul 2023 at 12:47, Michael Paquier wrote: > > On Wed, May 10, 2023 at 05:59:24PM +1000, Peter Smith wrote: > > 1. ALTER SUBSCRIPTION name ADD TABLE (relid = XYZ, state = 'x' [, lsn = > > 'X/Y']) > > > > I was a bit confused by this relation 'state' mentioned in multiple > > places.

Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)

2023-09-06 Thread Ranier Vilela
Em seg., 4 de set. de 2023 às 11:27, Ranier Vilela escreveu: > Em dom., 3 de set. de 2023 às 22:01, Michael Paquier > escreveu: > >> On Sat, Sep 02, 2023 at 09:13:11AM -0300, Ranier Vilela wrote: >> > I tried to keep the same behavior as before. >> > Note that if the locale equals

Re: How to add a new pg oid?

2023-09-06 Thread jacktby jacktby
> 2023年9月6日 18:19,jacktby jacktby 写道: > > > >> 2023年9月6日 01:47,David G. Johnston 写道: >> >> OIDs don't exist independently of the data they are associated with. Give >> more context if you want a better answer. Or just go look at the source >> code commits for when the last time

Re: Vectorization of some functions and improving pg_list interface

2023-09-06 Thread Yura Sokolov
06.09.2023 13:24, Yura Sokolov wrote: 24.08.2023 17:07, Maxim Orlov wrote: Hi! Recently, I've been playing around with pg_lists and realize how annoying (maybe, I was a bit tired) some stuff related to the lists. For an example, see this code List *l1 = list_make4(1, 2, 3, 4),  

Re: Vectorization of some functions and improving pg_list interface

2023-09-06 Thread Yura Sokolov
24.08.2023 17:07, Maxim Orlov wrote: Hi! Recently, I've been playing around with pg_lists and realize how annoying (maybe, I was a bit tired) some stuff related to the lists. For an example, see this code List *l1 = list_make4(1, 2, 3, 4), *l2 = list_make4(5, 6, 7, 8),

Re: How to add a new pg oid?

2023-09-06 Thread jacktby jacktby
> 2023年9月6日 01:47,David G. Johnston 写道: > > OIDs don't exist independently of the data they are associated with. Give > more context if you want a better answer. Or just go look at the source code > commits for when the last time something needing an OID got added to the core > catalog. >

Re: [Regression] Incorrect filename in test case comment

2023-09-06 Thread Suraj Kharage
Thanks Daniel and Michael. On Wed, Sep 6, 2023 at 1:52 PM Daniel Gustafsson wrote: > > On 6 Sep 2023, at 10:19, Michael Paquier wrote: > > > > On Wed, Sep 06, 2023 at 10:48:32AM +0530, Suraj Kharage wrote: > >> While browsing the test cases, found that the incorrect filename was > there > >>

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-06 Thread Quan Zongliang
On 2023/9/6 17:07, John Naylor wrote: On Wed, Sep 6, 2023 at 2:50 PM Quan Zongliang > wrote: > If not optimized(--enable-debug CFLAGS='-O0'), there is a clear > difference. When the compiler does the optimization, the performance is > similar. I think the

Can a role have indirect ADMIN OPTION on another role?

2023-09-06 Thread Ashutosh Sharma
Hi, In PG-16, I see that we have made a lot of changes in the area roles and privileges. I have a question related to this and here is my question: Let's say there is a roleA who creates roleB and then roleB creates another role, say roleC. By design, A can administer B and B can administer C.

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-06 Thread Amit Kapila
On Wed, Sep 6, 2023 at 11:01 AM Peter Smith wrote: > > On Tue, Sep 5, 2023 at 7:34 PM Hayato Kuroda (Fujitsu) > wrote: > > > > Also, for simplifying codes, only a first-met invalidated slot is output in > > the > > check_old_cluster_for_valid_slots(). Warning messages int the function were > >

Re: Introduce join_info_array for direct lookups of SpecialJoinInfo by ojrelid

2023-09-06 Thread Richard Guo
On Mon, May 8, 2023 at 10:30 AM Richard Guo wrote: > I'd like to devise a test query that shows performance gain from this > patch, but I'm not sure how to do that. May need help here. > I've been trying for some time but still haven't been able to come up with a test case that shows the

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-06 Thread John Naylor
On Wed, Sep 6, 2023 at 2:50 PM Quan Zongliang wrote: > If not optimized(--enable-debug CFLAGS='-O0'), there is a clear > difference. When the compiler does the optimization, the performance is > similar. I think the compiler does a good enough optimization with > "pg_attribute_always_inline" and

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-06 Thread Amit Kapila
On Wed, Sep 6, 2023 at 8:47 AM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, September 5, 2023 3:35 PM Kuroda, Hayato/黒田 隼人 > wrote: > > > > Dear Hou-san, > > > > > Based on this, it’s possible that the slots we get each time when > > > checking wal_status are different, because they may get

Re: GUC for temporarily disabling event triggers

2023-09-06 Thread Daniel Gustafsson
> On 5 Sep 2023, at 17:29, Robert Haas wrote: > On Tue, Sep 5, 2023 at 8:12 AM Daniel Gustafsson wrote: >> The attached version of the patch replaces it with a boolean flag for turning >> off all event triggers, and I also renamed it to the debug_xxx "GUC >> namespace" >> which seemed more

Re: Synchronizing slots from primary to standby

2023-09-06 Thread shveta malik
On Fri, Sep 1, 2023 at 1:59 PM Peter Smith wrote: > > Hi Shveta. Here are some comments for patch v14-0002 > > The patch is large, so my code review is a WIP... more later next week... > Thanks Peter for the feedback. I have tried to address most of these in v15. Please find my response inline

Re: [Regression] Incorrect filename in test case comment

2023-09-06 Thread Daniel Gustafsson
> On 6 Sep 2023, at 10:19, Michael Paquier wrote: > > On Wed, Sep 06, 2023 at 10:48:32AM +0530, Suraj Kharage wrote: >> While browsing the test cases, found that the incorrect filename was there >> in the test case comment. >> The below commit added the custom hash opclass in insert.sql, > >

Re: [Regression] Incorrect filename in test case comment

2023-09-06 Thread Daniel Gustafsson
> On 6 Sep 2023, at 07:18, Suraj Kharage wrote: > we haven't changed the filename in other test cases. > Did the same in the attached patch. Pushed (along with a small typo fix), thanks! -- Daniel Gustafsson

Re: [Regression] Incorrect filename in test case comment

2023-09-06 Thread Michael Paquier
On Wed, Sep 06, 2023 at 10:48:32AM +0530, Suraj Kharage wrote: > While browsing the test cases, found that the incorrect filename was there > in the test case comment. > The below commit added the custom hash opclass in insert.sql, --- part_part_test_int4_ops and part_test_text_ops in insert.sql.

Re: Transaction timeout

2023-09-06 Thread Fujii Masao
On 2022/12/19 5:53, Andrey Borodin wrote: On Wed, Dec 7, 2022 at 1:30 PM Andrey Borodin wrote: I hope to address other feedback on the weekend. Thanks for implementing this feature! While testing v4 patch, I noticed it doesn't handle the COMMIT AND CHAIN case correctly. When COMMIT AND

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-06 Thread Quan Zongliang
On 2023/9/6 15:50, Quan Zongliang wrote: On 2023/9/5 18:46, John Naylor wrote: On Tue, Sep 5, 2023 at 4:27 PM Quan Zongliang > wrote:  > Here's how I test it  >     EXPLAIN ANALYZE SELECT * FROM orders; Note that EXPLAIN ANALYZE has quite a bit of

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-06 Thread Quan Zongliang
On 2023/9/5 18:46, John Naylor wrote: On Tue, Sep 5, 2023 at 4:27 PM Quan Zongliang > wrote: > Here's how I test it >     EXPLAIN ANALYZE SELECT * FROM orders; Note that EXPLAIN ANALYZE has quite a bit of overhead, so it's not good for these kinds of

Re: A minor adjustment to get_cheapest_path_for_pathkeys

2023-09-06 Thread Andy Fan
> > I guess the *valuable* sometimes means the effort we pay is greater > than the benefit we get, As for this patch, the benefit is not huge (it > is possible the compiler already does that). and the most effort we pay > should be committer's attention, who needs to grab the patch, write the >

Re: Extract numeric filed in JSONB more effectively

2023-09-06 Thread Andy Fan
> > > based on v13. > IMHO, it might be a good idea to write some comments on > jsonb_object_field_internal. especially the second boolean argument. > something like "some case, we just want return JsonbValue rather than > Jsonb. to return JsonbValue, make as_jsonb be false". > OK, I will

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

2023-09-06 Thread Peter Eisentraut
I noticed that on this commitfest entry (https://commitfest.postgresql.org/44/4491/), the reviewers were assigned by the patch author (presumably because they had previously contributed to this thread). Unless these individuals know about that, this is unlikely to work out. It's better to

Re: A minor adjustment to get_cheapest_path_for_pathkeys

2023-09-06 Thread Andy Fan
On Wed, Sep 6, 2023 at 2:45 PM Andy Fan wrote:uld have a different conversation... > > I like this consultation, so +1 from me :) > s/consultation/conclusion. -- Best Regards Andy Fan

Re: A minor adjustment to get_cheapest_path_for_pathkeys

2023-09-06 Thread Andy Fan
On Wed, Sep 6, 2023 at 4:06 AM Robert Haas wrote: > On Tue, Sep 5, 2023 at 12:05 PM Aleksander Alekseev > wrote: > > Now when we continue reviewing the patch, could you please elaborate a > > bit on why you think it's worth committing? > > Well, why not? The test he's proposing to move earlier

Re: persist logical slots to disk during shutdown checkpoint

2023-09-06 Thread Dilip Kumar
On Wed, Sep 6, 2023 at 12:01 PM Amit Kapila wrote: > > On Wed, Sep 6, 2023 at 9:57 AM Dilip Kumar wrote: > > > > On Wed, Sep 6, 2023 at 9:47 AM Amit Kapila wrote: > > > > > > On Tue, Sep 5, 2023 at 6:00 PM Dilip Kumar wrote: > > > > > > > > Right, it can change and in that case, the check

Re: persist logical slots to disk during shutdown checkpoint

2023-09-06 Thread Amit Kapila
On Wed, Sep 6, 2023 at 9:57 AM Dilip Kumar wrote: > > On Wed, Sep 6, 2023 at 9:47 AM Amit Kapila wrote: > > > > On Tue, Sep 5, 2023 at 6:00 PM Dilip Kumar wrote: > > > > > Right, it can change and in that case, the check related to > > confirm_flush LSN will fail during the upgrade. However,

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

2023-09-06 Thread John Naylor
On Mon, Aug 28, 2023 at 9:44 PM Masahiko Sawada wrote: > > I've attached v42 patch set. I improved tidstore regression test codes > in addition of imcorporating the above comments. Seems fine at a glance, thanks. I will build on this to implement variable-length values. I have already finished