RE: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-07-14 Thread shiy.f...@fujitsu.com
On Mon, Jul 11, 2022 9:54 PM Masahiko Sawada wrote: > > I've attached an updated patch, please review it. > Thanks for your patch. Here are some comments for the REL14-v1 patch. 1. + Sizesz = sizeof(TransactionId) * nxacts;; There is a redundant semicolon at the end.

Re: SQL/JSON documentation JSON_TABLE

2022-07-14 Thread Erik Rijkers
On 7/14/22 17:45, Andrew Dunstan wrote: On 2022-07-08 Fr 16:20, Andrew Dunstan wrote: On 2022-07-08 Fr 16:03, Erik Rijkers wrote: Hi, Attached are a few small changes to the JSON_TABLE section in func.sgml. The first two changes are simple typos. Then there was this line: context_item

RE: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger

2022-07-14 Thread houzj.f...@fujitsu.com
On Friday, July 15, 2022 11:41 AM Michael Paquier wrote: Hi, > > On Fri, Jul 15, 2022 at 03:21:30AM +, kuroda.hay...@fujitsu.com wrote: > > Sounds good. I grepped ATExecXXX() functions called in ATExecCmd(), > > and I confirmed that all returned values have been collected except them. > > >

Re: POC: GROUP BY optimization

2022-07-14 Thread David Rowley
On Thu, 31 Mar 2022 at 12:19, Tomas Vondra wrote: > Pushed, after going through the patch once more, running check-world > under valgrind, and updating the commit message. I'm still working in this area and I noticed that db0d67db2 updated some regression tests in partition_aggregate.out without

RE: Support load balancing in libpq

2022-07-14 Thread kuroda.hay...@fujitsu.com
Dear Jelte, I like your idea. But do we have to sort randomly even if target_session_attr is set to 'primary' or 'read-write'? I think this parameter can be used when all listed servers have same data, and we can assume that one of members is a primary and others are secondary. In this case use

Re: EINTR in ftruncate()

2022-07-14 Thread Thomas Munro
On Fri, Jul 15, 2022 at 9:34 AM Tom Lane wrote: > (Someday we oughta go ahead and make our Windows signal API look more > like POSIX, as I suggested back in 2015. I'm still not taking > point on that, though.) For the sigprocmask() part, here's a patch that passes CI. Only the SIG_SETMASK case

Re: Allowing REINDEX to have an optional name

2022-07-14 Thread Michael Paquier
On Mon, Jul 04, 2022 at 03:59:55PM +0900, Michael Paquier wrote: > Please note that patch authors should not switch a patch as RfC by > themselves. This is something that a reviewer should do. This patch has been marked as waiting for a review, however the CF bot is completely red: http://commitf

Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger

2022-07-14 Thread Michael Paquier
On Fri, Jul 15, 2022 at 03:21:30AM +, kuroda.hay...@fujitsu.com wrote: > Sounds good. I grepped ATExecXXX() functions called in ATExecCmd(), > and I confirmed that all returned values have been collected except them. > > While checking test code test about EVENT TRIGGER, > I found there were n

RE: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger

2022-07-14 Thread kuroda.hay...@fujitsu.com
Hi, > > I noticed that we didn't collect the ObjectAddress returned by > > ATExec[Attach|Detach]Partition. I think collecting this information can > > make it > > easier for users to get the partition OID of the attached or detached table > > in > > the event trigger. So how about collecting it

RE: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger

2022-07-14 Thread houzj.f...@fujitsu.com
On Wednesday, July 13, 2022 5:58 PM Hou, Zhijie wrote: > Hi hackers, > > I noticed that we didn't collect the ObjectAddress returned by > ATExec[Attach|Detach]Partition. I think collecting this information can make > it > easier for users to get the partition OID of the attached or detached table

Re: [PATCH v1] remove redundant check of item pointer

2022-07-14 Thread David Rowley
On Fri, 15 Jul 2022 at 10:31, Bruce Momjian wrote: > for non-Assert builds, ItemPointerGetOffsetNumberNoCheck() and > ItemPointerGetOffsetNumber() are the same, so I don't see the point to > making this change. Frankly, I don't know why we even have two > functions for this. I am guessing ItemPo

Re: doc: Clarify Routines and Extension Membership

2022-07-14 Thread David G. Johnston
On Thu, Jul 14, 2022 at 2:41 PM Bruce Momjian wrote: > On Fri, Jul 8, 2022 at 10:55:55PM -0400, Bruce Momjian wrote: > > > The/that inconsistency ... choose one. Or actually, the "an ... the" > > > combination you used elsewhere doesn't grate on the ear either. > > > > > > + For each exten

Re: Doc about how to set max_wal_senders when setting minimal wal_level

2022-07-14 Thread Bruce Momjian
On Tue, Jul 5, 2022 at 08:02:33PM -0400, Tom Lane wrote: > "Precondition" is an overly fancy word that makes things less clear > not more so. Does it mean that setting wal_level = minimal will fail > if you don't do these other things, or does it just mean that you > won't be getting the absolute

Re: Fix typo in progress reporting doc

2022-07-14 Thread Bruce Momjian
On Fri, Mar 11, 2022 at 04:07:32PM +0530, Nitin Jadhav wrote: > Hi, > > I have observed that the table naming conventions used in > 'progress-reporting.html' are not consistent across different > sections. For some cases "Phases" (Table 28.37. CREATE INDEX Phases) > is used and for some cases "pha

Re: doc: New cumulative stats subsystem obsoletes comment in maintenance.sgml

2022-07-14 Thread Andres Freund
Hi, I had missed David's original email on this topic... On 2022-07-14 18:58:09 -0400, Bruce Momjian wrote: > On Wed, Apr 20, 2022 at 04:40:44PM -0700, David G. Johnston wrote: > > The new cumulative stats subsystem no longer has a "lost under heavy load" > > problem so that parenthetical should

Re: [PATCH v1] remove redundant check of item pointer

2022-07-14 Thread Peter Geoghegan
On Thu, Jul 14, 2022 at 3:59 PM Tom Lane wrote: > Even in an assert-enabled build, wouldn't you expect the compiler to > optimize away the second assertion as unreachable code? I think that it probably would, even at -O0 (GCC doesn't really allow you to opt out of all optimizations). I did think

Re: [PATCH v1] remove redundant check of item pointer

2022-07-14 Thread Tom Lane
Peter Geoghegan writes: > The proposal doesn't seem like an improvement. Technically the > assertion cannot possibly fail here because the earlier assertion > would always fail instead, so strictly speaking it is redundant -- at > least right now. That is true. But it seems much more important to

Re: doc: New cumulative stats subsystem obsoletes comment in maintenance.sgml

2022-07-14 Thread Bruce Momjian
On Wed, Apr 20, 2022 at 04:40:44PM -0700, David G. Johnston wrote: > Hackers, > > The new cumulative stats subsystem no longer has a "lost under heavy load" > problem so that parenthetical should go (or at least be modified). > > These stats can be reset so some discussion about how the system us

Re: pg_parameter_aclcheck() and trusted extensions

2022-07-14 Thread Nathan Bossart
On Thu, Jul 14, 2022 at 06:03:45PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> On Thu, Jul 14, 2022 at 04:02:30PM -0400, Tom Lane wrote: >>> I noted something that ought to be looked at separately: >>> validate_option_array_item() seems like it needs to be taught about >>> grantable permiss

Re: Move Section 9.27.7 (Data Object Management Functions) to System Information Chapter

2022-07-14 Thread Tom Lane
Bruce Momjian writes: > On Mon, Apr 25, 2022 at 08:33:47AM -0700, David G. Johnston wrote: >> Both the location and name of the linked to section make no sense to me: >> https://www.postgresql.org/docs/current/functions-admin.html# >> FUNCTIONS-ADMIN-DBOBJECT >> Neither of the tables listed there

Re: [PATCH v1] remove redundant check of item pointer

2022-07-14 Thread Peter Geoghegan
On Thu, Jul 14, 2022 at 3:31 PM Bruce Momjian wrote: > On Wed, Apr 27, 2022 at 08:04:00PM +0800, Junwang Zhao wrote: > for non-Assert builds, ItemPointerGetOffsetNumberNoCheck() and > ItemPointerGetOffsetNumber() are the same, so I don't see the point to > making this change. Frankly, I don't kno

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2022-07-14 Thread Melanie Plageman
In addition to adding several new tests, the attached version 26 fixes a major bug in constructing the view. The only valid combination of IOPATH/IOOP that is not tested now is IOPATH_STRATEGY + IOOP_WRITE. In most cases when I ran this in regress, the checkpointer wrote out the dirty strategy buf

Re: Move Section 9.27.7 (Data Object Management Functions) to System Information Chapter

2022-07-14 Thread Bruce Momjian
On Mon, Apr 25, 2022 at 08:33:47AM -0700, David G. Johnston wrote: > Hi, > > Both the location and name of the linked to section make no sense to me: > > https://www.postgresql.org/docs/current/functions-admin.html# > FUNCTIONS-ADMIN-DBOBJECT > > Neither of the tables listed there manage (cause

Re: [PATCH v1] remove redundant check of item pointer

2022-07-14 Thread Bruce Momjian
On Wed, Apr 27, 2022 at 08:04:00PM +0800, Junwang Zhao wrote: > In function ItemPointerEquals, the ItemPointerGetBlockNumber > already checked the ItemPointer if valid, there is no need > to check it again in ItemPointerGetOffset, so use > ItemPointerGetOffsetNumberNoCheck instead. > > Signed-off-

Re: pg_parameter_aclcheck() and trusted extensions

2022-07-14 Thread Tom Lane
Nathan Bossart writes: > On Thu, Jul 14, 2022 at 04:02:30PM -0400, Tom Lane wrote: >> I noted something that ought to be looked at separately: >> validate_option_array_item() seems like it needs to be taught about >> grantable permissions on GUCs. I think that right now it may report >> permissio

Re: pg_parameter_aclcheck() and trusted extensions

2022-07-14 Thread Nathan Bossart
On Thu, Jul 14, 2022 at 04:02:30PM -0400, Tom Lane wrote: > Here's a draft patch for that. I initially ran around and changed all > the set_config_option callers as I threatened before, but as I did it > I could not help observing that they were all changing in exactly the > same way: basically, t

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2022-07-14 Thread Alvaro Herrera
Here's a couple of fixups. 0001 is the same as before. In 0002 I think CheckTablespaceDirectory ends up easier to read if we split out the test for validity of the link. Looking at that again, I think we don't need to piggyback on ignore_invalid_pages, which is already a stretch, so let's not --

Re: doc: Clarify Routines and Extension Membership

2022-07-14 Thread Bruce Momjian
On Fri, Jul 8, 2022 at 10:55:55PM -0400, Bruce Momjian wrote: > > The/that inconsistency ... choose one. Or actually, the "an ... the" > > combination you used elsewhere doesn't grate on the ear either. > > > > + For each extension, refuse to drop anything if any objects (other > > than th

Re: Introduce "log_connection_stages" setting.

2022-07-14 Thread Euler Taveira
On Thu, Jul 14, 2022, at 8:20 AM, Sergey Dudoladov wrote: > I've taken connection stages and terminology from the existing log messages. > The reason I have separated "authorized" and "authenticated" are [1] > and [2] usages of "log_connections"; > "received" is mentioned at [3]. After checking the

Re: EINTR in ftruncate()

2022-07-14 Thread Tom Lane
Thomas Munro writes: > So why would I add another wrapper like PG_SETMASK and leave it > unimplemented for now on Windows, when I could just use sigprocmask() > directly and leave it unimplemented for now on Windows? Fair enough, I guess. No objection to this patch. (Someday we oughta go ahead

Re: EINTR in ftruncate()

2022-07-14 Thread Thomas Munro
On Fri, Jul 15, 2022 at 3:27 AM Tom Lane wrote: > Alvaro Herrera writes: > > ISTM it would be cleaner to patch PG_SETMASK to have a second argument > > and to return the original mask if that's not NULL. This is more > > invasive, but there aren't that many callsites of that macro. > > [ shoulda

Re: Issue with recovery_target = 'immediate'

2022-07-14 Thread David Steele
On 7/14/22 04:26, Kyotaro Horiguchi wrote: At Wed, 13 Jul 2022 14:41:40 -0400, David Steele wrote in While it is certainly true that timeline 2 cannot be replayed to from timeline 1, it should not matter for an immediate recovery that stops at consistency. No timeline switch will occur until pr

Re: Making the subquery alias optional in the FROM clause

2022-07-14 Thread Tom Lane
Dean Rasheed writes: > Attached is an update with the following changes: > * Docs updated as suggested. > * transformLockingClause() updated to skip subquery and values rtes > without aliases. > * eref->aliasname changed to "unnamed_subquery" for subqueries without > aliases. This looks good to

Re: [PATCH] Log details for client certificate failures

2022-07-14 Thread Jacob Champion
On Thu, Jul 14, 2022 at 1:12 PM Peter Eisentraut wrote: > Concretely, I was thinking like the attached top-up patch. > > The other way can surely be made to work somehow, but this seems much > simpler and with fewer questions about the details. Ah, seeing it side-by-side helps. That's much easier

Re: [PATCH] Log details for client certificate failures

2022-07-14 Thread Peter Eisentraut
On 13.07.22 01:06, Jacob Champion wrote: I had to read up on this "ex_data" API. Interesting. But I'm wondering a bit about how the life cycle of these objects is managed. What happens if the allocated error string is deallocated before its containing object? Or vice versa? Yeah, I'm curren

Re: System catalog documentation chapter

2022-07-14 Thread Bruce Momjian
On Tue, Jul 12, 2022 at 05:16:41PM -0400, Bruce Momjian wrote: > On Tue, Jul 12, 2022 at 08:56:01PM +0200, Peter Eisentraut wrote: > > On 08.07.22 18:07, Bruce Momjian wrote: > > > so I guess we can backpatch this with no issues. > > > > It inserts a new chapter, which would renumber all other cha

Re: [RFC] building postgres with meson -v9

2022-07-14 Thread Andres Freund
Hi, On 2022-07-07 12:09:32 +0200, Peter Eisentraut wrote: > On 06.07.22 15:21, Andres Freund wrote: > > > Here is my rough assessment of where we are with this patch set: > > > > > > 08b4330ded prereq: deal with \ paths in basebackup_to_shell tests. > > > > > > This still needs clarification, pe

Re: pg_parameter_aclcheck() and trusted extensions

2022-07-14 Thread Tom Lane
I wrote: > Michael Paquier writes: >> Looks like a bug to me, so I have added an open item assigned to Tom. > Yeah. So the fix here seems pretty obvious: rather than applying the > permissions check using bare GetUserId(), we need to remember the role > OID that originally applied the setting, a

Re: doc: Clarify Savepoint Behavior

2022-07-14 Thread Bruce Momjian
On Sat, Jul 9, 2022 at 12:59:23PM -0400, Bruce Momjian wrote: > On Sun, Jun 26, 2022 at 09:14:56AM -0700, David G. Johnston wrote: > > So leave the "release" behavior implied from the rollback behavior? > > > > On the whole I'm slightly in favor of your proposed wording (mostly due to > > the >

Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT

2022-07-14 Thread Bruce Momjian
On Fri, Jul 8, 2022 at 11:18:43PM -0400, Bruce Momjian wrote: > On Fri, Jul 1, 2022 at 08:11:36AM -0700, David G. Johnston wrote: > > That said, I still think that the current wording should be tweak with > > respect > > to row vs. rows (especially if we continue to call it a table): > > > > Cu

Re: doc: Bring mention of unique index forced transaction wait behavior outside of the internal section

2022-07-14 Thread Bruce Momjian
On Mon, Jul 11, 2022 at 05:22:41PM +0300, Aleksander Alekseev wrote: > Hi Bruce, > > > I was not happy with putting this in the Transaction Isolation section. > > I rewrote it and put it in the INSERT secion, right before ON CONFLICT; > > patch attached. > > Looks good. Applied to all supported

Re: Pre-allocating WAL files

2022-07-14 Thread Nathan Bossart
On Fri, Apr 08, 2022 at 01:30:03PM -0700, Nathan Bossart wrote: > On Thu, Mar 17, 2022 at 04:12:12PM -0700, Nathan Bossart wrote: >> It seems unlikely that this will be committed for v15, so I've adjusted the >> commitfest entry to v16 and moved it to the next commitfest. > > rebased It's now bee

Re: optimize lookups in snapshot [sub]xip arrays

2022-07-14 Thread Nathan Bossart
Hi Bharath, Thanks for taking a look. On Thu, Jul 14, 2022 at 03:10:56PM +0530, Bharath Rupireddy wrote: > Aren't these snapshot arrays always sorted? I see the following code: > > /* sort so we can bsearch() */ > qsort(snapshot->xip, snapshot->xcnt, sizeof(TransactionId), xidComparator); > > /

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-07-14 Thread Masahiko Sawada
On Thu, Jul 14, 2022 at 12:06 PM Masahiko Sawada wrote: > > On Thu, Jul 14, 2022 at 11:16 AM shiy.f...@fujitsu.com > wrote: > > > > On Tue, Jul 12, 2022 5:23 PM Masahiko Sawada wrote: > > > > > > On Tue, Jul 12, 2022 at 5:58 PM shiy.f...@fujitsu.com > > > wrote: > > > > > > > > It happened when

Re: Refactor to make use of a common function for GetSubscriptionRelations and GetSubscriptionNotReadyRelations.

2022-07-14 Thread vignesh C
On Thu, Jul 14, 2022 at 4:34 AM Peter Smith wrote: > > On Wed, Jul 13, 2022 at 7:55 PM vignesh C wrote: > > > > On Wed, Jul 13, 2022 at 1:13 PM Michael Paquier wrote: > > > > > > On Wed, Jul 13, 2022 at 12:22:06PM +0530, vignesh C wrote: > > > > Most of the code is common between GetSubscription

MERGE and parsing with prepared statements

2022-07-14 Thread Justin Pryzby
We've used INSERT ON CONFLICT for a few years (with partitions as the target). That's also combined with prepared statements, for bulk loading. I was looking to see if we should use MERGE (probably not, but looking anyway). And came across this behavior. I'm not sure if it's any issue. CREATE TA

Re: SQL/JSON documentation JSON_TABLE

2022-07-14 Thread Andrew Dunstan
On 2022-07-08 Fr 16:20, Andrew Dunstan wrote: > On 2022-07-08 Fr 16:03, Erik Rijkers wrote: >> Hi, >> >> Attached are a few small changes to the JSON_TABLE section in func.sgml. >> >> The first two changes are simple typos. >> >> Then there was this line: >> >> >> context_item, path_expressio

Re: EINTR in ftruncate()

2022-07-14 Thread Tom Lane
Thomas Munro writes: > ... but now I'm wondering if we should be more defensive and possibly > even save/restore the mask. +1, sounds like a more future-proof solution. > Originally I discounted that because I > thought I had to go through PG_SETMASK for portability reasons, but on > closer insp

Re: EINTR in ftruncate()

2022-07-14 Thread Tom Lane
Alvaro Herrera writes: > ISTM it would be cleaner to patch PG_SETMASK to have a second argument > and to return the original mask if that's not NULL. This is more > invasive, but there aren't that many callsites of that macro. [ shoulda read your message before replying ] Given that this needs

Re: First draft of the PG 15 release notes

2022-07-14 Thread Bruce Momjian
On Thu, Jul 14, 2022 at 01:24:41PM +0700, John Naylor wrote: > Regarding this item: > > "Allow hash lookup for NOT IN clauses with many constants (David Rowley, James > Coleman) > Previously the code always sequentially scanned the list of values." > > The todo list has an entry titled "Planning

Re: replacing role-level NOINHERIT with a grant-level option

2022-07-14 Thread tushar
On 7/11/22 11:01 PM, Robert Haas wrote: Oops. Here is a rebased version of v3 which aims to fix this bug. I found one issue where pg_upgrade is failing PG v14.4 , create these below objects create user u1 with superuser; create user u3; create group g2 with user  u1; now try to perform pg_upg

Re: EINTR in ftruncate()

2022-07-14 Thread Alvaro Herrera
On 2022-Jul-15, Thomas Munro wrote: > I checked that this throw-away assertion doesn't fail currently: > > if (IsUnderPostmaster) > + { > + sigset_t old; > + sigprocmask(SIG_SETMASK, NULL, &old); > + Assert(memcmp(&old, &UnBlockSig, sizeof(U

Re: EINTR in ftruncate()

2022-07-14 Thread Thomas Munro
On Fri, Jul 15, 2022 at 1:02 AM Thomas Munro wrote: > On Fri, Jul 15, 2022 at 12:15 AM Thomas Munro wrote: > > Yeah. Done, and pushed. 0002 not back-patched. > > Hmm, there were a couple of hard to understand build farm failures. > My first thought is that the signal mask stuff should only be d

Re: Problem about postponing gathering partial paths for topmost scan/join rel

2022-07-14 Thread Antonin Houska
Richard Guo wrote: > On Wed, Jul 28, 2021 at 3:42 PM Richard Guo wrote: > > To fix this problem, I'm thinking we can leverage 'root->all_baserels' > to tell if we are at the topmost scan/join rel, something like: > > --- a/src/backend/optimizer/path/allpaths.c > +++ b/src/backend/optimizer

Re: Handle infinite recursion in logical replication setup

2022-07-14 Thread Dilip Kumar
On Thu, 14 Jul 2022 at 6:34 PM, vignesh C wrote: > On Thu, Jul 14, 2022 at 11:26 AM Dilip Kumar > wrote: > > > > On Wed, Jul 13, 2022 at 4:49 PM Dilip Kumar > wrote: > > > > > > On Tue, Jul 12, 2022 at 2:58 PM vignesh C wrote: > > > > > > > > On Tue, Jul 12, 2022 at 9:51 AM Amit Kapila > wrot

Re: EINTR in ftruncate()

2022-07-14 Thread Thomas Munro
On Fri, Jul 15, 2022 at 12:15 AM Thomas Munro wrote: > Yeah. Done, and pushed. 0002 not back-patched. Hmm, there were a couple of hard to understand build farm failures. My first thought is that the signal mask stuff should only be done if IsUnderPostmaster, otherwise it clobbers the postmaster

Re: Lazy JIT IR code generation to increase JIT speed with partitions

2022-07-14 Thread David Geier
On Mon, Jul 4, 2022 at 10:32 PM Andres Freund wrote: > Hi, > > On 2022-06-27 16:55:55 +0200, David Geier wrote: > > Indeed, the total JIT time increases the more modules are used. The > reason > > for this to happen is that the inlining pass loads and deserializes all > to > > be inlined modules

Re: EINTR in ftruncate()

2022-07-14 Thread Thomas Munro
On Tue, Jul 12, 2022 at 5:45 AM Andres Freund wrote: > Hm - given that we've observed ftruncate failing with strace, and that > stracing to find problems isn't insane, shouldn't we retry the ftruncate too? > It's kind of obsoleted by your next patch, but not really, because it's not > unconceivabl

Re: Fix gcc warning in sync.c (usr/src/backend/storage/sync/sync.c)

2022-07-14 Thread Thomas Munro
On Mon, Jul 11, 2022 at 9:45 PM Kyotaro Horiguchi wrote: > At Mon, 11 Jul 2022 01:45:16 -0400, Tom Lane wrote in > > Kyotaro Horiguchi writes: > > > At Sat, 9 Jul 2022 21:53:31 -0300, Ranier Vilela > > > wrote in > > >> 528 |entry = (PendingUnlinkEntry *) lfirst(cell); > > > > > Actually,

Re: enable/disable broken for statement triggers on partitioned tables

2022-07-14 Thread Amit Langote
On Thu, Jul 14, 2022 at 8:20 PM Dmitry Koval wrote: > > I agree that the patch shouldn't have changed that behavior, so I've > > fixed the patch so that EnableDisableTrigger() recurses even if the > > parent trigger is unchanged. > > Thanks, I think this patch is ready for committer. Great, thank

Re: Introduce "log_connection_stages" setting.

2022-07-14 Thread Sergey Dudoladov
Hello, Thank you for the constructive feedback. > Your proposal will add more confusion to the already-confused logging-related > GUCs. > I wouldn't introduce a new GUC that depends on the stage of other GUC as you > proposed. Agreed, coupling a new GUC with "log_connections" is likely to lead

Re: enable/disable broken for statement triggers on partitioned tables

2022-07-14 Thread Dmitry Koval
I agree that the patch shouldn't have changed that behavior, so I've fixed the patch so that EnableDisableTrigger() recurses even if the parent trigger is unchanged. Thanks, I think this patch is ready for committer. -- With best regards, Dmitry Koval Postgres Professional: http://postgrespro.

Re: Bug: Reading from single byte character column type may cause out of bounds memory reads.

2022-07-14 Thread Nikolay Shaplov
В письме от среда, 13 июля 2022 г. 16:14:39 MSK пользователь Aleksander Alekseev написал: Hi! Let me join the review process. Postgres data types is field of expertise I am interested in. 0. Though it looks like a steady bug, I can't reproduce it. Not using valgrind, not using ASan (address sa

Re: [PATCH] Implement INSERT SET syntax

2022-07-14 Thread Gareth Palmer
Hello, Here is a new version of the patch that applies to HEAD. It also adds some regression tests for overriding {system,user} values based on Wenjing Zeng's work. Gareth On Thu, 14 Jul 2022 at 22:40, Jacob Champion wrote: > > On Thu, Apr 7, 2022 at 11:29 AM Marko Tiikkaja wrote: > > I can h

Improving scalability of Parallel Bitmap Heap/Index Scan

2022-07-14 Thread David Geier
Hi hackers, While debugging some slow queries containing Bitmap Heap/Index Scans (in short BHS / BIS), we observed a few issues regarding scalability: 1. The BIS always only runs in a single process, also when the parent BHS is parallel. The first process arriving in the BHS serves as leade

Re: remove_useless_groupby_columns is too enthusiastic

2022-07-14 Thread Richard Guo
On Wed, Jul 13, 2022 at 1:31 AM Tom Lane wrote: > I tried the attached quick-hack patch that just prevents > remove_useless_groupby_columns from removing anything that > appears in ORDER BY. That successfully fixes the complained-of > case, and it doesn't change any existing regression test resu

Re: Patch proposal: New hooks in the connection path

2022-07-14 Thread Bharath Rupireddy
On Fri, Jul 8, 2022 at 5:54 PM Bharath Rupireddy wrote: > > Looking at v2-0003 patch and emit_log_hook, how about we filter out > for those connectivity errors either based on error codes and if they > aren't unique, perhaps passing special flags to ereport API indicating > that it's a connectivit

Re: optimize lookups in snapshot [sub]xip arrays

2022-07-14 Thread Bharath Rupireddy
On Wed, Jul 13, 2022 at 10:40 PM Nathan Bossart wrote: > > Hi hackers, > > A few years ago, there was a proposal to create hash tables for long > [sub]xip arrays in snapshots [0], but the thread seems to have fizzled out. > I was curious whether this idea still showed measurable benefits, so I > r

Re: [PATCH] Add native windows on arm64 support

2022-07-14 Thread Niyas Sait
Hello, Please find a new patch (no further changes) rebased on top of the master. On Tue, 10 May 2022 at 02:02, Michael Paquier wrote: > On Mon, May 09, 2022 at 12:44:22PM +0100, Niyas Sait wrote: > > Microsoft updated documentation [1] and clarified that ASLR cannot be > > disabled for Arm64 t

Re: Issue with recovery_target = 'immediate'

2022-07-14 Thread Kyotaro Horiguchi
At Wed, 13 Jul 2022 14:41:40 -0400, David Steele wrote in > While it is certainly true that timeline 2 cannot be replayed to from > timeline 1, it should not matter for an immediate recovery that stops > at consistency. No timeline switch will occur until promotion. Of > course the cluster could

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-07-14 Thread Alvaro Herrera
This is not a review, but I think the isolation tests should be expanded. At least, include the case of serializable transactions being involved. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ "Pensar que el espectro que vemos es ilusorio no lo despoja de espant

Re: Backup command and functions can cause assertion failure and segmentation fault

2022-07-14 Thread Michael Paquier
On Fri, Jul 08, 2022 at 08:56:14AM -0400, Robert Haas wrote: > On Thu, Jul 7, 2022 at 10:58 AM Fujii Masao > wrote: >> But if many think that it's worth adding the test, I will give a >> try. But even in that case, I think it's better to commit the >> proposed patch at first to fix the bug, and t

Re: [PROPOSAL] Detecting plan changes with plan_id in pg_stat_activity

2022-07-14 Thread Julien Rouhaud
Hi, On Thu, Jul 14, 2022 at 08:51:24AM +0200, Antonin Houska wrote: > Shouldn't the patch status be set to "Waiting on Author"? > > (I was curious if this is a patch that I can review.) Ah indeed, I just updated the CF entry!