Re: meson PGXS compatibility

2022-10-12 Thread Andres Freund
Hi, On 2022-10-12 07:50:07 +0200, Peter Eisentraut wrote: > On 05.10.22 22:07, Andres Freund wrote: > > 0001: autoconf: Unify CFLAGS_SSE42 and CFLAGS_ARMV8_CRC32C > > I wonder, there has been some work lately to use SIMD and such in other > places. Would that affect what kinds of extra

Re: meson PGXS compatibility

2022-10-12 Thread Andres Freund
Hi, On 2022-10-10 14:35:14 -0700, Andres Freund wrote: > On 2022-10-05 13:07:10 -0700, Andres Freund wrote: > > 0004: solaris: Check for -Wl,-E directly instead of checking for gnu LD > > > > This allows us to get rid of the nontrivial detection of with_gnu_ld, > > simplifying meson PGXS

Re: create subscription - improved warning message

2022-10-12 Thread Amit Kapila
On Wed, Oct 12, 2022 at 8:31 PM Tom Lane wrote: > > Alvaro Herrera writes: > > On 2022-Oct-12, Amit Kapila wrote: > >> Okay, then I think we can commit the last error message patch of Peter > >> [1] as we have an agreement on the same, and then work on this as a > >> separate patch. What do you

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-12 Thread Amit Kapila
On Wed, Oct 12, 2022 at 3:41 PM Peter Smith wrote: > > Here are some review comments for v36-0001. > > > 6. LogicalParallelApplyLoop > > + for (;;) > + { > + void*data; > + Size len; > + int c; > + StringInfoData s; > + MemoryContext oldctx; > + > + CHECK_FOR_INTERRUPTS(); > + > + /* Ensure

Re: Fast COPY FROM based on batch insert

2022-10-12 Thread Andrey Lepikhov
On 10/12/22 07:56, Etsuro Fujita wrote: On Tue, Oct 11, 2022 at 3:06 PM Andrey Lepikhov wrote: I reviewed the patch one more time. Only one question: bistate and ri_FdwRoutine are strongly bounded. Maybe to add some assertion on (ri_FdwRoutine XOR bistate) ? Just to prevent possible errors in

Add mssing test to test_decoding/meson.build

2022-10-12 Thread kuroda.hay...@fujitsu.com
Hi hackers, I found that the test catalog_change_snapshot was missed in test_decoding/meson.build file. PSA the patch to fix it. Best Regards, Hayato Kuroda FUJITSU LIMITED 0001-add-missing-test-to-test_decoding-meson.build.patch Description:

Re: how to correctly react on exception in pfree function?

2022-10-12 Thread Julien Rouhaud
On Wed, Oct 12, 2022 at 11:34:32PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > On Wed, Oct 12, 2022 at 11:08:25PM -0400, Tom Lane wrote: > >> It may be worth looking at the GUC code, which has been dealing > >> with the same sorts of issues pretty successfully for many years. > > > The

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-12 Thread Amit Kapila
On Thu, Oct 6, 2022 at 6:09 PM kuroda.hay...@fujitsu.com wrote: > > ~~~ > 10. worker.c - apply_handle_stream_start > > ``` > + * > + * XXX We can avoid sending pair of the START/STOP messages to the parallel > + * worker because unlike apply worker it will process only one > + *

Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant

2022-10-12 Thread Richard Guo
On Thu, Oct 13, 2022 at 4:50 AM David Rowley wrote: > The problem is that I'm only added the LimitPath to the > cheapest_total_path. I think to make your case work we'd need to add > the LimitPath only in cases where the distinct_pathkeys are empty but > the sort_pathkeys are not and

Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant

2022-10-12 Thread Richard Guo
On Thu, Oct 13, 2022 at 4:41 AM David Rowley wrote: > We could do something like set some bool flag in PlannerInfo to tell > the planner not to bother adding the final LimitPath as we've already > added another which does the job, but is it really worth adding that > complexity for this patch?

Re: how to correctly react on exception in pfree function?

2022-10-12 Thread Tom Lane
Julien Rouhaud writes: > On Wed, Oct 12, 2022 at 11:08:25PM -0400, Tom Lane wrote: >> It may be worth looking at the GUC code, which has been dealing >> with the same sorts of issues pretty successfully for many years. > The GUC code relies on malloc/free, Not for much longer [1]. And no, I

Re: how to correctly react on exception in pfree function?

2022-10-12 Thread Julien Rouhaud
On Wed, Oct 12, 2022 at 11:08:25PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > We can change the API to accept an optional new value (and the few other > > needed > > information) when cleaning the old one, but that's adding some complication > > just to deal with a possible error in

Re: how to correctly react on exception in pfree function?

2022-10-12 Thread Tom Lane
Julien Rouhaud writes: > We can change the API to accept an optional new value (and the few other > needed > information) when cleaning the old one, but that's adding some complication > just to deal with a possible error in pfree. So it still unclear to me what > to > do here. I think it's

Re: how to correctly react on exception in pfree function?

2022-10-12 Thread Julien Rouhaud
On Wed, Oct 12, 2022 at 10:34:29PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > On Wed, Oct 12, 2022 at 07:24:53PM -0400, Tom Lane wrote: > >> There are hundreds, if not thousands, of "shouldn't ever happen" elogs > >> in Postgres. We don't make any attempt to trap any of them. Why do >

Re: how to correctly react on exception in pfree function?

2022-10-12 Thread Tom Lane
Julien Rouhaud writes: > On Wed, Oct 12, 2022 at 07:24:53PM -0400, Tom Lane wrote: >> There are hundreds, if not thousands, of "shouldn't ever happen" elogs >> in Postgres. We don't make any attempt to trap any of them. Why do >> you think this one should be different? > Because session

Re: how to correctly react on exception in pfree function?

2022-10-12 Thread Julien Rouhaud
On Wed, Oct 12, 2022 at 07:24:53PM -0400, Tom Lane wrote: > Pavel Stehule writes: > > I had a talk with Julien about the correct handling of an exception raised > > by pfree function. > > > Currently, this exception (elog(ERROR, "could not find block containing > > chunk %p", chunk);) is not

Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering

2022-10-12 Thread Michael Paquier
On Wed, Oct 12, 2022 at 08:54:34PM -0400, Tom Lane wrote: > Don't we need to back-patch these fixes? I guess I should, though I have finished by not doing due to the unlikeliness of the problem, where we would need the combination of a page eviction with an error in the critical section to force

Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering

2022-10-12 Thread Tom Lane
Michael Paquier writes: > Thanks. This looks fine on a second look, so applied. Don't we need to back-patch these fixes? regards, tom lane

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-10-12 Thread kuroda.hay...@fujitsu.com
Dear Önder, Thanks for updating the patch! I think your saying seems reasonable. I have no comments anymore now. Thanks for updating so quickly. Best Regards, Hayato Kuroda FUJITSU LIMITED

Re: GUC values - recommended way to declare the C variables?

2022-10-12 Thread Michael Paquier
On Wed, Oct 12, 2022 at 12:12:15PM -0700, Nathan Bossart wrote: > Looks reasonable to me. I've marked this as ready-for-committer. So, the initial values of max_wal_senders and max_replication_slots became out of sync with their defaults in guc_tables.c. FWIW, I would argue the opposite way:

Re: Allow WindowFuncs prosupport function to use more optimal WindowClause options

2022-10-12 Thread David Rowley
On Wed, 12 Oct 2022 at 16:33, Vik Fearing wrote: > Per spec, the ROW_NUMBER() window function is not even allowed to have a > frame specified. > > b) The window framing clause of WDX shall not be present. > > Also, the specification for ROW_NUMBER() is: > > f) ROW_NUMBER() OVER WNS is

Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering

2022-10-12 Thread Michael Paquier
On Wed, Oct 12, 2022 at 09:39:11PM +0800, Zhang Mingli wrote: > Patch added. Thanks. This looks fine on a second look, so applied. -- Michael signature.asc Description: PGP signature

Re: Bloom filter Pushdown Optimization for Merge Join

2022-10-12 Thread Zhihong Yu
On Wed, Oct 12, 2022 at 3:36 PM Lyu Pan wrote: > Hello Zhihong Yu & Tomas Vondra, > > Thank you so much for your review and feedback! > > We made some updates based on previous feedback and attached the new > patch set. Due to time constraints, we didn't get to resolve all the > comments, and

Re: how to correctly react on exception in pfree function?

2022-10-12 Thread Tom Lane
Pavel Stehule writes: > I had a talk with Julien about the correct handling of an exception raised > by pfree function. > Currently, this exception (elog(ERROR, "could not find block containing > chunk %p", chunk);) is not specially handled ever. There are hundreds, if not thousands, of

Re: Pluggable toaster

2022-10-12 Thread Nikita Malakhov
Hi hackers! Due to recent changes in postgres.h cfbot is failing again. Here's rebased patch: v22-0001-toaster-interface.patch - Pluggable TOAST API interface with reference (original) TOAST mechanics - new API is introduced but reference TOAST is still left unchanged;

Re: Tracking last scan time

2022-10-12 Thread Andres Freund
Hi, On 2022-10-12 12:50:31 -0700, Andres Freund wrote: > I think this should have at a basic test in src/test/regress/sql/stats.sql. If > I can write one in a few minutes I'll go for that, otherwise will reply > detailing difficulties. Took a bit longer (+lunch). Attached. In the attached

Re: create subscription - improved warning message

2022-10-12 Thread Peter Smith
On Thu, Oct 13, 2022 at 2:01 AM Tom Lane wrote: > > Alvaro Herrera writes: > > On 2022-Oct-12, Amit Kapila wrote: > >> Okay, then I think we can commit the last error message patch of Peter > >> [1] as we have an agreement on the same, and then work on this as a > >> separate patch. What do you

Re: problems with making relfilenodes 56-bits

2022-10-12 Thread Andres Freund
Hi, On 2022-10-12 22:05:30 +0200, Matthias van de Meent wrote: > On Wed, 5 Oct 2022 at 01:50, Andres Freund wrote: > > On 2022-10-03 10:01:25 -0700, Andres Freund wrote: > > > On 2022-10-03 08:12:39 -0400, Robert Haas wrote: > > > > On Fri, Sep 30, 2022 at 8:20 PM Andres Freund > > > > wrote:

Re: allowing for control over SET ROLE

2022-10-12 Thread Nathan Bossart
On Fri, Sep 30, 2022 at 04:34:32PM -0400, Robert Haas wrote: > That thread has not reached an entirely satisfying conclusion. > However, the behavior that was deemed outright buggy over there has > been fixed. The remaining question is what to do about commands that > allow you to give objects to

Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant

2022-10-12 Thread David Rowley
On Thu, 13 Oct 2022 at 01:13, Richard Guo wrote: > For DISTINCT ON, if all the distinct pathkeys are redundant but there > are available sort pathkeys, then for adequately-presorted paths I think > we can also apply this optimization, using a Limit 1 rather than Unique. > > regression=# explain

Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant

2022-10-12 Thread David Rowley
On Thu, 13 Oct 2022 at 00:30, Richard Guo wrote: > I also have concerns about the 2 Limit nodes pointed by the comment > inside the patch. Maybe we can check with limit_needed() and manually > add the limit node only if there is no LIMIT clause in the origin query? I wasn't hugely concerned

Re: Tracking last scan time

2022-10-12 Thread Andres Freund
Hi, On 2022-10-12 15:40:21 +0900, Michael Paquier wrote: > On Mon, Oct 03, 2022 at 12:55:40PM +0100, Dave Page wrote: > > Thanks. It's just the changes in xact.c, so it doesn't seem like it would > > cause you any more work either way, in which case, I'll leave it to you :-) > > Okay, I have

how to correctly react on exception in pfree function?

2022-10-12 Thread Pavel Stehule
Hi I had a talk with Julien about the correct handling of an exception raised by pfree function. Currently, this exception (elog(ERROR, "could not find block containing chunk %p", chunk);) is not specially handled ever. Because the check of pointer sanity is executed first (before any memory

Re: Summary function for pg_buffercache

2022-10-12 Thread Andres Freund
Hi, On 2022-09-28 18:19:57 +0300, Melih Mutlu wrote: > diff --git a/contrib/pg_buffercache/pg_buffercache--1.3--1.4.sql > b/contrib/pg_buffercache/pg_buffercache--1.3--1.4.sql > new file mode 100644 > index 00..77e250b430 > --- /dev/null > +++

Re: Simplifying our Trap/Assert infrastructure

2022-10-12 Thread Peter Eisentraut
On 12.10.22 20:36, Nathan Bossart wrote: On Sun, Oct 09, 2022 at 02:01:48PM -0700, Nathan Bossart wrote: The patch LGTM. It might be worth removing usages of AssertArg and AssertState, too, but that can always be done separately. If you are so inclined... I'm in favor of this. These

Re: GUC values - recommended way to declare the C variables?

2022-10-12 Thread Nathan Bossart
On Wed, Sep 28, 2022 at 10:13:22AM +1000, Peter Smith wrote: > PSA a small patch to tidy a few of the GUC C variables - adding > comments and removing unnecessary declaration assignments. > > make check-world passed OK. Looks reasonable to me. I've marked this as ready-for-committer. --

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-10-12 Thread Önder Kalacı
Hi, > ~~~ > 01. 032_subscribe_use_index.pl - SUBSCRIPTION CAN UPDATE THE INDEX IT > USES AFTER ANALYZE > > ``` > # show that index_b is not used > $node_subscriber->poll_query_until( > 'postgres', q{select idx_scan=0 from pg_stat_all_indexes where > indexrelname = 'index_b';} > ) or

Re: Simplifying our Trap/Assert infrastructure

2022-10-12 Thread Nathan Bossart
On Sun, Oct 09, 2022 at 02:01:48PM -0700, Nathan Bossart wrote: > The patch LGTM. It might be worth removing usages of AssertArg and > AssertState, too, but that can always be done separately. If you are so inclined... -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From

Re: Git tag for v15

2022-10-12 Thread Matthias van de Meent
On Wed, 12 Oct 2022 at 20:08, Nemo wrote: > Since v15 doesn't seem to be announced yet - this is confusing me. It > doesn't impact us anywhere (yet), since we haven't added the v15 release > cycle to our page yet, but I'd like to check if this is an incorrect tag > or? If not, what's the correct

Git tag for v15

2022-10-12 Thread Nemo
Hi, Writing this on behalf of endoflife.date, where we track postgres releases for the endoflife.date/postgres page. We have our automation linked to git tags published on the postgres repo mirror on GitHub[0]. It recently picked up the REL_15_0 tag[2], and compiled it here:

Re: possibility of partial data dumps with pg_dump

2022-10-12 Thread Никита Старовойтов
Good afternoon, Indeed, the functionality that I started to implement in the patch is very similar to what is included in the program you proposed. Many of the use cases are the same. Thanks for giving me a hint about it. I have been working on implementing referential integrity, but have not been

Re: Support for Rust

2022-10-12 Thread Jeff Davis
On Mon, 2022-09-12 at 11:29 -0400, Tom Lane wrote: > > Rust gives many things we wanted for decades: > > > 1. No undefined behavior > > 2. No memory leaks, guaranteed at compile time > > Really?  It seems impossible to me that a language that even thinks > it can guarantee that could

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Peter Eisentraut
On 10.10.22 12:04, Alvaro Herrera wrote: In my own tags script I just call "ctags -R", and I feed cscope with these find lines (find $SRCDIR \( -name tmp_install -prune -o -name tmp_check -prune \) -o \( -name "*.[chly]" -o -iname "*makefile*" -o -name "*.mk" -o -name "*.in" -o -name "*.sh" -o

Re: [PoC] Let libpq reject unexpected authentication requests

2022-10-12 Thread Jacob Champion
On 10/5/22 06:33, Peter Eisentraut wrote: > I think it would be good to put some provisions in place here, even if > they are elementary. Otherwise, there will be a significant burden on > the person who implements the next SASL method (i.e., you ;-) ) to > figure that out then. Sounds good,

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-12 Thread Andres Freund
Hi, On 2022-10-11 17:10:52 +0900, Masahiko Sawada wrote: > +# Reset the replication slot statistics. > +$node->safe_psql('postgres', > + "SELECT pg_stat_reset_replication_slot('regression_slot');"); > +my $result = $node->safe_psql('postgres', > + "SELECT * FROM pg_stat_replication_slots

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Bruce Momjian
On Wed, Oct 12, 2022 at 10:26:03PM +0900, Tatsuo Ishii wrote: > > However ... hmm ... > > > >> find . \( -name 'CVS' -prune \) -o \( -name .git -prune \) -o -type d > >> -print | > >> while read DIR > >> -do[ "$DIR" != "." ] && ln -f -s `echo "$DIR" | sed > >> 's;/[^/]*;/..;g'`/tags

Re: Warning about using pg_stat_reset() and pg_stat_reset_shared()

2022-10-12 Thread Bruce Momjian
On Wed, Oct 12, 2022 at 08:50:19AM +1300, David Rowley wrote: > On Wed, 12 Oct 2022 at 04:11, Bruce Momjian wrote: > > As far as I can tell, analyze updates pg_statistics values, but not > > pg_stat_all_tables.n_dead_tup and n_live_tup, which are used by > > autovacuum to trigger vacuum

Re: create subscription - improved warning message

2022-10-12 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Oct-12, Amit Kapila wrote: >> Okay, then I think we can commit the last error message patch of Peter >> [1] as we have an agreement on the same, and then work on this as a >> separate patch. What do you think? > No objection. Yeah, the v3-0001 patch is fine. I

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-12, Tatsuo Ishii wrote: > >> find . \( -name 'CVS' -prune \) -o \( -name .git -prune \) -o -type d > >> -print | > >> while read DIR > >> -do[ "$DIR" != "." ] && ln -f -s `echo "$DIR" | sed > >> 's;/[^/]*;/..;g'`/tags "$DIR"/tags > >> +do[ "$DIR" != "." ] && ln -f

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-12, Tom Lane wrote: > Tatsuo Ishii writes: > >> If we're going to do this, then I suggest that make_etags should become > >> a symlink to make_ctags, and behave as if -e is given when called under > >> that name. > > > What I had in my mind was making make_etags a script just exec >

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Julien Rouhaud
On Wed, Oct 12, 2022 at 10:09:06AM -0400, Tom Lane wrote: > > I don't think it's possible to store a symlink in git, so > having one file exec the other sounds saner to me too. Git handles symlink just fine, but those will obviously create extra burden for Windows users (git will just create a

[PATCH] Improve tab completion for ALTER TABLE on identity columns

2022-10-12 Thread Dagfinn Ilmari Mannsåker
Hi Hackers, I noticed that psql has no tab completion around identity columns in ALTER TABLE, so here's some patches for that. In passing, I also added completion for ALTER SEQUECNE … START, which was missing for some reason. - ilmari >From 4dad38d17e82b2efafe3666a0a92aa248cfc5e60 Mon Sep 17

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Tom Lane
Tatsuo Ishii writes: >> If we're going to do this, then I suggest that make_etags should become >> a symlink to make_ctags, and behave as if -e is given when called under >> that name. > What I had in my mind was making make_etags a script just exec > make_ctags (with -e option). But I don't

Re: ExecRTCheckPerms() and many prunable partitions

2022-10-12 Thread Peter Eisentraut
On 06.10.22 15:29, Amit Langote wrote: I tried in the attached 0004. ModifyTable gets a new member extraUpdatedColsBitmaps, which is List of Bitmapset "nodes". Actually, List of Bitmapsets turned out to be something that doesn't just-work with our Node infrastructure, which I found out thanks

Re: Issue in GIN fast-insert: XLogBeginInsert + Read/LockBuffer ordering

2022-10-12 Thread Zhang Mingli
HI, On Oct 12, 2022, 10:09 +0800, Michael Paquier , wrote: > > Nice catches, both of you. Let's adjust everything spotted in one > shot. Matthias' patch makes the ordering right, but the > initialization path a bit harder to follow when using a separate list. > The code is short so it does not

Re: [Proposal] Add foreign-server health checks infrastructure

2022-10-12 Thread Önder Kalacı
Hi, Sounds reasonable. Do you mean that we can add additional GUC like > "postgres_fdw.initial_check", > wait WL_SOCKET_CLOSED if the conneciton is found in the hash table, and do > reconnection if it might be closed, right? > > Alright, it took me sometime to realize that postgres_fdw already

Re: shadow variables - pg15 edition

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-11, David Rowley wrote: > I'm also keen to wait for complaints and only if we really have to, > remove the shadow flag from being used only in the places where we > need to. +1 -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ "The problem with the

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Tatsuo Ishii
>> I tried to apply the v2 patch approach to make_etags but noticed that >> make_ctags and make_etags have quite a few duplicate codes, that would >> bring maintenance headache. I think we could merge make_etags into >> make_ctags, then add "-e" option (or whatever) to make_ctags so that >> it

Re: doc: add entry for pg_get_partkeydef()

2022-10-12 Thread Ian Lawrence Barwick
2022年10月12日(水) 3:29 Tom Lane : > Ian Lawrence Barwick writes: > > Small patch for $subject, as the other pg_get_XXXdef() functions are > > documented > > and I was looking for this one but couldn't remember what it was called. > > Seems reasonable. Pushed with minor wording adjustment. > Many

Re: create subscription - improved warning message

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-12, Amit Kapila wrote: > Okay, then I think we can commit the last error message patch of Peter > [1] as we have an agreement on the same, and then work on this as a > separate patch. What do you think? No objection. -- Álvaro HerreraBreisgau, Deutschland —

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-12, Tatsuo Ishii wrote: > I tried to apply the v2 patch approach to make_etags but noticed that > make_ctags and make_etags have quite a few duplicate codes, that would > bring maintenance headache. I think we could merge make_etags into > make_ctags, then add "-e" option (or

Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant

2022-10-12 Thread Richard Guo
On Wed, Oct 12, 2022 at 5:19 PM David Rowley wrote: > When all the distinct pathkeys are redundant then there can only be, > at most, 1 single distinct value. There may be many rows with that > value, but we can remove those extra ones with a LIMIT 1 rather than > troubling over needlessly

Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock

2022-10-12 Thread vignesh C
On Wed, 12 Oct 2022 at 16:16, vignesh C wrote: > > On Thu, 6 Oct 2022 at 12:44, Amit Kapila wrote: > > > > On Sat, Oct 1, 2022 at 12:35 AM Andres Freund wrote: > > > > > > This issue does occasionally happen in CI, as e.g. noted in this thread: > > >

Re: Proposal to provide the facility to set binary format output for specific OID's per session

2022-10-12 Thread Dave Cramer
Waiting on the author to do what ? I'm waiting for a review.

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Tatsuo Ishii
Hi, >> > I found that tag files generated by src/tools/make_ctags >> > doesn't include some keywords, that were field names of node >> > structs, for example norm_select in RestrictInfo. Such fields >> > are defined with pg_node_attr macro that was introduced >> > recently, like: >> > >> >

Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant

2022-10-12 Thread Richard Guo
On Wed, Oct 12, 2022 at 5:19 PM David Rowley wrote: > When all the distinct pathkeys are redundant then there can only be, > at most, 1 single distinct value. There may be many rows with that > value, but we can remove those extra ones with a LIMIT 1 rather than > troubling over needlessly

Re: create subscription - improved warning message

2022-10-12 Thread Amit Kapila
On Wed, Oct 12, 2022 at 2:08 PM Alvaro Herrera wrote: > > On 2022-Oct-12, Amit Kapila wrote: > > > I think it is a good idea to expand the docs for this but note that > > there are multiple places that use a similar description. For example, > > see the description slot_name option: "When

Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock

2022-10-12 Thread vignesh C
On Thu, 6 Oct 2022 at 12:44, Amit Kapila wrote: > > On Sat, Oct 1, 2022 at 12:35 AM Andres Freund wrote: > > > > This issue does occasionally happen in CI, as e.g. noted in this thread: > > https://www.postgresql.org/message-id/20220930185345.GD6256%40telsasoft.com > > > > On 2022-08-18 15:17:47

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-12 Thread Peter Smith
Here are some review comments for v36-0001. == 1. GENERAL Houzj wrote ([1] #3a): The word 'streaming' is the same as the actual option name, so personally I think it's fine. But if others also agreed that the name can be improved, I can change it. ~ Sure, I was not really complaining that

Re: slab allocator performance issues

2022-10-12 Thread David Rowley
On Sat, 11 Sept 2021 at 09:07, Tomas Vondra wrote: > I've been investigating the regressions in some of the benchmark > results, together with the generation context benchmarks [1]. I've not looked into the regression you found with this yet, but I did rebase the patch. slab.c has seen quite a

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-12 Thread Yugo NAGATA
Hello On Mon, 10 Oct 2022 12:04:22 +0200 Alvaro Herrera wrote: > Hello > > On 2022-Oct-07, Yugo NAGATA wrote: > > > I found that tag files generated by src/tools/make_ctags > > doesn't include some keywords, that were field names of node > > structs, for example norm_select in RestrictInfo.

Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant

2022-10-12 Thread David Rowley
Over on [1], Klint highlights a query with a DISTINCT which is a little sub-optimal in PostgreSQL. ISTM that in cases where all DISTINCT pathkeys have been marked as redundant due to constants existing in all of the EquivalenceClasses of the DISTINCT columns, then it looks like it should be okay

Re: Make ON_ERROR_STOP stop on shell script failure

2022-10-12 Thread bt22nakamorit
There was a mistake in the error message for \! so I updated the patch. Best, Tatsuhiro Nakamoridiff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 9494f28063..82febf0ace 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -4143,7

Re: Fix wrong syntax about CREATE_REPLICATION_SLOT

2022-10-12 Thread Michael Paquier
On Wed, Oct 12, 2022 at 08:33:43AM +, tachikake.ay...@fujitsu.com wrote: > Hi hackers, > > A minor bug was found in the "CREATE_REPLICATION_SLOT" syntax. > It is in protocol.sgml at line 1990. Indeed, right. The command is described two times, in its old and new fashions and the new flavor

Re: [Commitfest 2022-09] Date is Over.

2022-10-12 Thread Michael Paquier
On Wed, Oct 05, 2022 at 06:01:01PM +0800, Julien Rouhaud wrote: > The CF should be marked as closed, and its entries fully processed within a > few > days after its final day. > > The general rule is that patches that have been waiting on authors for 2 weeks > or more without any answer from the

Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-10-12 Thread Michael Paquier
On Tue, Sep 06, 2022 at 11:37:32AM +0500, Ibrar Ahmed wrote: > The patch failed different regression tests on all platforms. Please > correct that and send an updated patch. > > [06:40:02.370] Test Summary Report > [06:40:02.370] --- > [06:40:02.370] t/002_pg_upgrade.pl (Wstat:

Re: create subscription - improved warning message

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-12, Amit Kapila wrote: > I think it is a good idea to expand the docs for this but note that > there are multiple places that use a similar description. For example, > see the description slot_name option: "When slot_name is set to NONE, > there will be no replication slot associated

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2022-10-12 Thread Michael Paquier
On Tue, Sep 06, 2022 at 11:32:18AM +0500, Ibrar Ahmed wrote: > Hunk #5 succeeded at 147 with fuzz 2 (offset -3 lines). > Hunk #6 FAILED at 170. > Hunk #7 succeeded at 165 (offset -69 lines). > 2 out of 7 hunks FAILED -- saving rejects to file > src/include/portability/instr_time.h.rej > patching

Fix wrong syntax about CREATE_REPLICATION_SLOT

2022-10-12 Thread tachikake.ay...@fujitsu.com
Hi hackers, A minor bug was found in the "CREATE_REPLICATION_SLOT" syntax. It is in protocol.sgml at line 1990. The current syntax written in it is as follows, CREATE_REPLICATION_SLOT slot_name [ TEMPORARY ] { PHYSICAL | LOGICAL } [ ( option [, ...] ) ] However, when I executed a command as

Re: create subscription - improved warning message

2022-10-12 Thread Amit Kapila
On Wed, Oct 12, 2022 at 12:34 PM Alvaro Herrera wrote: > > On 2022-Oct-11, Peter Smith wrote: > > > > BTW, do we want to slightly adjust the documentation for the > > > connect option on CREATE SUBSCRIPTION page [1]? It says: "Since no > > > connection is made when this option is false, no tables

Re: Tracking last scan time

2022-10-12 Thread Michael Paquier
On Wed, Oct 12, 2022 at 09:09:46AM +0100, Dave Page wrote: > On Wed, 12 Oct 2022 at 07:40, Michael Paquier wrote: >> Okay, I have just moved the patch to the next CF then, still marked as >> ready for committer. Are you planning to look at that? > > Thanks. Was the question directed at me or

Re: Tracking last scan time

2022-10-12 Thread Dave Page
On Wed, 12 Oct 2022 at 07:40, Michael Paquier wrote: > On Mon, Oct 03, 2022 at 12:55:40PM +0100, Dave Page wrote: > > Thanks. It's just the changes in xact.c, so it doesn't seem like it would > > cause you any more work either way, in which case, I'll leave it to you > :-) > > Okay, I have just

Re: future of serial and identity columns

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-11, Peter Eisentraut wrote: > diff --git a/src/test/modules/test_ddl_deparse/expected/alter_table.out > b/src/test/modules/test_ddl_deparse/expected/alter_table.out > index 87a1ab7aabce..30e3dbb8d08a 100644 > --- a/src/test/modules/test_ddl_deparse/expected/alter_table.out > +++

Re: Use extended statistics to estimate (Var op Var) clauses

2022-10-12 Thread Michael Paquier
On Fri, Jul 22, 2022 at 02:17:47PM +0100, Dean Rasheed wrote: > It's a worry that none of the existing regression tests picked up on > that. Perhaps a similar test could be added using the existing test > data. Otherwise, I think it'd be worth adding a new test with similar > data to the above.

Re: Fix obsolete reference to ExecCreatePartitionPruneState

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-12, Amit Langote wrote: > Robert pointed out in [1] that ExecCreatePartitionPruneState() that > was renamed to CreatePartitionPruneState() in 297daa9d4353 is still > referenced in src/test/modules/delay_execution/specs/partition-addition.spec. > > Please find attached a patch to fix

Re: create subscription - improved warning message

2022-10-12 Thread Amit Kapila
On Tue, Oct 11, 2022 at 4:27 PM Alvaro Herrera wrote: > > On 2022-Oct-10, Peter Smith wrote: > > > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: > > > > I think the below gives accurate information: > > > WARNING: subscription was created, but is not connected > > > HINT: You should create

Re: Implementing Incremental View Maintenance

2022-10-12 Thread Michael Paquier
On Fri, Sep 09, 2022 at 08:10:32PM +0900, Yugo NAGATA wrote: > I am working on above issues (#1-#4) now, and I'll respond on each later. Okay, well. There has been some feedback sent lately and no update for one month, so I am marking it as RwF for now. As a whole the patch has been around for

Re: BufferAlloc: don't take two simultaneous locks

2022-10-12 Thread Michael Paquier
On Wed, Sep 07, 2022 at 12:53:07PM +0500, Ibrar Ahmed wrote: > Hunk #1 FAILED at 231. > Hunk #2 succeeded at 409 (offset 82 lines). > > 1 out of 2 hunks FAILED -- saving rejects to file > src/include/storage/buf_internals.h.rej With no rebase done since this notice, I have marked this entry as

Re: libpq error message refactoring

2022-10-12 Thread Peter Eisentraut
On 23.09.22 04:37, Tom Lane wrote: Separately from that: is it really okay to delegate use of a va_list argument like that? The other call paths of appendPQExpBufferVA[_internal] write va_start/va_end directly around it, not somewhere else in the call chain. I'm too tired to language-lawyer

Re: Proposal: allow database-specific role memberships

2022-10-12 Thread Michael Paquier
On Wed, Sep 07, 2022 at 12:50:32PM +0500, Ibrar Ahmed wrote: > The patch requires a rebase, please do that. > > Hunk #5 succeeded at 454 (offset 28 lines). 1 out of 5 hunks FAILED > -- saving rejects to file doc/src/sgml/ref/grant.sgml.rej There has been no updates on this thread for one month,

Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]

2022-10-12 Thread Michael Paquier
On Sun, Oct 02, 2022 at 09:53:01AM -0700, Andres Freund wrote: > The CF entry for this patch doesn't currently apply and there has been a bunch > of feedback on the approach. Mats, are you actually waiting for further > feedback right now? Okay, for now this has been marked as RwF. -- Michael

Re: Add 64-bit XIDs into PostgreSQL 15

2022-10-12 Thread Michael Paquier
On Fri, Oct 07, 2022 at 02:04:09PM +0300, Maxim Orlov wrote: > As always, reviews are very welcome! This patch set needs a rebase, as far as I can see. -- Michael signature.asc Description: PGP signature

Re: Move backup-related code to xlogbackup.c/.h

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-06, Bharath Rupireddy wrote: > On Thu, Oct 6, 2022 at 4:50 AM Andres Freund wrote: > > > > I'm doubtful it's a good idea to expose these to outside of xlog.c - they > > are > > very low level, and it's very easy to break stuff by using them wrongly. > > Hm. Here's the v3 patch set

Re: test_decoding assertion failure for the loss of top-sub transaction relationship

2022-10-12 Thread Masahiko Sawada
On Wed, Oct 12, 2022 at 3:35 PM kuroda.hay...@fujitsu.com wrote: > > Dear Sawada-san, > > > FYI, as I just replied to the related thread[1], the assertion failure > > in REL14 and REL15 can be fixed by the patch proposed there. So I'd > > like to see how the discussion goes. Regardless of this

Re: Re[2]: Possible solution for masking chosen columns when using pg_dump

2022-10-12 Thread Виктория Шепард
Hi, Here is an idea of how to read masking options from a file. Please, take a look. пн, 10 окт. 2022 г. в 14:54, Олег Целебровский : > Hi, > > I applied most of suggestions: used separate files for most of added code, > fixed typos/mistakes, got rid of that pesky TODO that was already >

Re: Add index scan progress to pg_stat_progress_vacuum

2022-10-12 Thread Masahiko Sawada
On Tue, Oct 11, 2022 at 10:50 PM Imseih (AWS), Sami wrote: > > >One idea would be to add a flag, say report_parallel_vacuum_progress, > >to IndexVacuumInfo struct and expect index AM to check and update the > >parallel index vacuum progress, say every 1GB blocks processed. The > >

Re: Fix gin index cost estimation

2022-10-12 Thread Ronan Dunklau
> > You're right, I was too eager to try to raise the CPU cost proportionnally to > > the number of array scans (scalararrayop). I'd really like to understand where > > this equation comes from though... > > So, what's the latest update here? Thanks Michael for reviving this thread. Before

Re: future of serial and identity columns

2022-10-12 Thread Peter Eisentraut
On 12.10.22 08:22, Corey Huinker wrote: Question: the xref  refers the reader to sql-createtable, which is a pretty big page, which could leave the reader lost. Would it make sense to create a SQL-CREATETABLE-IDENTITY anchor and link to that instead? Yes, I think that would be good.

Fix obsolete reference to ExecCreatePartitionPruneState

2022-10-12 Thread Amit Langote
Robert pointed out in [1] that ExecCreatePartitionPruneState() that was renamed to CreatePartitionPruneState() in 297daa9d4353 is still referenced in src/test/modules/delay_execution/specs/partition-addition.spec. Please find attached a patch to fix that. -- Thanks, Amit Langote EDB:

Re: create subscription - improved warning message

2022-10-12 Thread Alvaro Herrera
On 2022-Oct-11, Peter Smith wrote: > On Tue, Oct 11, 2022 at 2:46 PM Amit Kapila wrote: > > > > On Mon, Oct 10, 2022 at 8:14 PM Tom Lane wrote: > > > It feels a little strange to me that we describe two steps rather > > > vaguely and then give exact SQL for the third step. How about, > > >

  1   2   >