Re: Recovery of .partial WAL segments

2024-08-01 Thread Stefan Fercot
Hi, I've added a CF entry for this patch: https://commitfest.postgresql.org/49/5148/ Not sure why CFbot CI fails on macOS/Windows while it works with the Github CI on my fork ( https://cirrus-ci.com/github/pgstef/postgres/partial-walseg-recovery). Many thanks in advance for your feedback and tho

Re: Statistics Import and Export

2024-08-01 Thread Jeff Davis
On Sat, 2024-07-27 at 21:08 -0400, Corey Huinker wrote: > > > I don't like the idea of mixing statistics and control parameters > > in > > the same list. > > > > > There's no way around it, at least now we need never worry about a > confusing order for the parameters in the _restore_ functions

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-08-01 Thread Antonin Houska
Kirill Reshke wrote: > What is the size of the biggest relation successfully vacuumed > via pg_squeeze? > Looks like in case of big relartion or high insertion load, > replication may lag and never catch up... Users reports problems rather than successes, so I don't know. 400 GB was reported in

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

2024-08-01 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, > Thanks for updating the patch! > > > - Changed the name of new API from `GetUserMappingFromOid` to > `GetUserMappingByOid` > >to keep the name consistent with others. > > If we expose this function as an FDW helper function, it should return > a complete UserMapping object,

Re: pg_dump: optimize dumpFunc()

2024-08-01 Thread Tom Lane
Nathan Bossart writes: > I've recently committed some optimizations for dumping sequences and > pg_class information (commits 68e9629, bd15b7d, and 2329cad), and I noticed > that we are also executing a query per function in pg_dump. Commit be85727 > optimized this by preparing the query ahead of

Re: [Patch] remove duplicated smgrclose

2024-08-01 Thread Junwang Zhao
Hi Steven, On Fri, Aug 2, 2024 at 12:12 PM Steven Niu wrote: > > Hi, Junwang, > > Thank you for the review and excellent summary in commit message! > > This is my first contribution to community, and not so familiar with the > overall process. > After reading the process again, it looks like tha

Re: [BUG?] check_exclusion_or_unique_constraint false negative

2024-08-01 Thread Amit Kapila
On Thu, Aug 1, 2024 at 2:55 PM Michail Nikolaev wrote: > > > Thanks for pointing out the issue! > > Thanks for your attention! > > > IIUC, the issue can happen when two concurrent transactions using > > DirtySnapshot access > > the same tuples, which is not specific to the parallel apply > > Not

Casts from jsonb to other types should cope with json null

2024-08-01 Thread David G. Johnston
On Thursday, August 1, 2024, Tom Lane wrote: > Maciek Sakrejda writes: > > Oddly, it looks like you only get a null if you use the '->>' > > operator. With '->' and a subsequent cast to text, you get the string > > "null": > > > maciek=# select (('{"a":null}'::jsonb)->'a')::text; > > text > > -

Re: [Patch] remove duplicated smgrclose

2024-08-01 Thread Steven Niu
Hi, Junwang, Thank you for the review and excellent summary in commit message! This is my first contribution to community, and not so familiar with the overall process. After reading the process again, it looks like that I'm not qualified to submit the patch to commitfest as I never had reviewed

Re: Query results vary depending on the plan cache mode used

2024-08-01 Thread Tom Lane
Richard Guo writes: > Yeah, it's not the fault of the plan cache. I noticed this because in > check_ungrouped_columns, both Const and Param are treated as always > acceptable. However, in setrefs.c these two expression types are > handled differently: Const is never matched to the lower tlist, w

Re: rare crash - FailedAssertion snapbuild.c Line: 580

2024-08-01 Thread Alexander Lakhin
Hello Euler, 01.08.2024 21:09, Euler Taveira wrote: According to this discussion, there isn't a clue about the root cause. If you have a test case, share it (mainly if you are observing it in version 16+ that exposes some data which may be useful for analysis). Please take a look at [1], wher

Re: On disable_cost

2024-08-01 Thread David Rowley
On Fri, 2 Aug 2024 at 06:03, Robert Haas wrote: > I think this may be a bit hard to understand, so let me give a > concrete example. Suppose we're planning some join where one side can > only be planned with a sequential scan and sequential scans are > disabled. We have ten paths in the path list

wrong translation file reference in pg_createsubscriber

2024-08-01 Thread Kyotaro Horiguchi
Hi, I found that pg_createsubscriber doesn't use NLS files. This is due to the wrong reference name "pg_createsubscriber" being passed to set_pglocale_pgservice(). It should be "pg_basebackup" instead. See the attached patch. # Sorry for being away for a while. I should be able to return soon. r

Re: PG buildfarm member cisticola

2024-08-01 Thread Thomas Munro
On Thu, Jul 25, 2024 at 8:38 PM Michael Paquier wrote: > On Wed, Jul 24, 2024 at 01:09:22PM +0200, Alvaro Herrera wrote: > > Hmm, it appears that these symbols did not exist in 1.1.1g, and since > > neither of them is invoked directly by the Postgres code, maybe the > > reason for this is that the

Re: Query results vary depending on the plan cache mode used

2024-08-01 Thread Richard Guo
On Thu, Aug 1, 2024 at 10:34 PM Tom Lane wrote: > Richard Guo writes: > > While working on the grouping sets patches for queries with GROUP BY > > items that are constants, I noticed $subject on master. As an > > example, consider > > This particular example seems like it's just an illustration

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Robert Haas
On Thu, Aug 1, 2024 at 4:45 PM Jacob Champion wrote: > Would it provide enough value for effort to explicitly mark leaky > procedures as such? Maybe that could shrink the grey area enough to be > protective? You mean like proleakproof = true/false/maybe? -- Robert Haas EDB: http://www.enterpris

Re: Casts from jsonb to other types should cope with json null

2024-08-01 Thread Tom Lane
Maciek Sakrejda writes: > Oddly, it looks like you only get a null if you use the '->>' > operator. With '->' and a subsequent cast to text, you get the string > "null": > maciek=# select (('{"a":null}'::jsonb)->'a')::text; > text > -- > null > (1 row) > Is that expected? I think what is

Re: Casts from jsonb to other types should cope with json null

2024-08-01 Thread Maciek Sakrejda
On Thu, Aug 1, 2024 at 3:52 PM Tom Lane wrote: > I complained in the discussion of bug #18564 [1] that it's quite > inconsistent that you can cast a jsonb null to text and get > a SQL NULL: > > =# select ('{"a": null}'::jsonb)->>'a'; > ?column? > -- > > (1 row) Oddly, it looks like you o

Re: Use pgBufferUsage for block reporting in analyze

2024-08-01 Thread Masahiko Sawada
On Wed, Jul 31, 2024 at 11:27 PM Anthonin Bonnefoy wrote: > > On Wed, Jul 31, 2024 at 9:36 PM Masahiko Sawada wrote: > > Meanwhile, I think we can push 0001 and 0002 patches since they are in > > good shape. I've updated commit messages to them and slightly changed > > 0002 patch to write "finish

Re: Why is citext/regress failing on hamerkop?

2024-08-01 Thread Thomas Munro
On Fri, Aug 2, 2024 at 1:37 AM Oleg Tselebrovskiy wrote: > I would appreciate if you would backpatch this change to 15 and 16 > branches. Done (e52a44b8, 91f498fd). Any elucidation on how and why Windows machines have started using UTF-8 would be welcome.

Casts from jsonb to other types should cope with json null

2024-08-01 Thread Tom Lane
I complained in the discussion of bug #18564 [1] that it's quite inconsistent that you can cast a jsonb null to text and get a SQL NULL: =# select ('{"a": null}'::jsonb)->>'a'; ?column? -- (1 row) but if you cast it to any other type it's an error: =# select (('{"a": null}'::jsonb)->

Re: Asymmetric partition-wise JOIN

2024-08-01 Thread Alexander Korotkov
On Sun, May 5, 2024 at 5:55 PM Andrei Lepikhov wrote: > On 18/10/2023 16:59, Ashutosh Bapat wrote: > > On Wed, Oct 18, 2023 at 10:55 AM Andrei Lepikhov > >>> The relid is also used to track the scans at executor level. Since we > >>> have so many scans on A, each may be using different plan, we wi

Re: optimizing pg_upgrade's once-in-each-database steps

2024-08-01 Thread Nathan Bossart
On Thu, Aug 01, 2024 at 12:44:35PM -0500, Nathan Bossart wrote: > On Wed, Jul 31, 2024 at 10:55:33PM +0100, Ilya Gladyshev wrote: >> I like your idea of parallelizing these checks with async libpq API, thanks >> for working on it. The patch doesn't apply cleanly on master anymore, but >> I've rebas

Re: Official devcontainer config

2024-08-01 Thread Andrew Dunstan
On 2024-08-01 Th 10:56 AM, Junwang Zhao wrote: Stack Overflow 2024 developer survey[1] said VSCode is the most used development environment. In a PostgreSQL Hacker Mentoring discussion, we talked about how to use vscode to debug and running postgres, Andrey(ccd) has tons of tips for new develo

Re: Improving tracking/processing of buildfarm test failures

2024-08-01 Thread Andrew Dunstan
On 2024-08-01 Th 5:00 AM, Alexander Lakhin wrote: I also wrote a simple script (see attached) to check for unknown buildfarm failures using "HTML API", to make sure no failures missed. Surely, it could be improved in many ways, but I find it rather useful as-is. I think we can improve o

Re: Pluggable cumulative statistics

2024-08-01 Thread Michael Paquier
On Sun, Jul 28, 2024 at 10:03:56PM +0200, Dmitry Dolgov wrote: > So far I've got nothing against :) I've looked again at the first patch of this series, and applied the first one. Another last-minute edit I have done is to use more consistently PgStat_Kind in the loops for the stats kinds across

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Jacob Champion
On Thu, Aug 1, 2024 at 7:26 AM Tom Lane wrote: > Are you proposing that we invent two levels of leakproofness > with different guarantees? That seems like a mess, not least > because there are going to be varying opinions about where we > should set the bar for the lower level. It kind of remind

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Jacob Champion
On Wed, Jul 31, 2024 at 1:26 PM Robert Haas wrote: > However, the risk is that an end-user is going to be much less able to > evaluate what is and isn't safe than we are. I think some people are > going to be like -- well the core project doesn't mark enough stuff > leakproof, so I'll just go add

Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

2024-08-01 Thread Jeff Davis
On Fri, 2024-08-02 at 00:13 +0500, Kirill Reshke wrote: > On Thu, 1 Aug 2024 at 23:27, Jeff Davis wrote: > > > > EXPLAIN ANALYZE CREATE MATERIALIZED VIEW doesn't go through > > ExecCreateTableAs(), but does use CreateIntoRelDestReceiver(). > > EXPLAIN ANALYZE and regular query goes through creat

Re: Support LIKE with nondeterministic collations

2024-08-01 Thread Daniel Verite
Jeff Davis wrote: > > col LIKE 'smith%' collate "nd" > > > > is equivalent to: > > > > col >= 'smith' collate "nd" AND col < U&'smith\' collate "nd" > > That logic seems to assume something about the collation. If you have a > collation that orders strings by their sha256 hash,

Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

2024-08-01 Thread Kirill Reshke
On Thu, 1 Aug 2024 at 23:27, Jeff Davis wrote: > > EXPLAIN ANALYZE CREATE MATERIALIZED VIEW doesn't go through > ExecCreateTableAs(), but does use CreateIntoRelDestReceiver(). EXPLAIN ANALYZE and regular query goes through create_ctas_internal (WITH NO DATA case too). Maybe we can simply move Set

Re: Asymmetric partition-wise JOIN

2024-08-01 Thread Alexander Korotkov
Hi! On Tue, Apr 2, 2024 at 6:07 AM Andrei Lepikhov wrote: > On 15/10/2023 13:25, Alexander Korotkov wrote: > > Great! I'm looking forward to the revised patch. > Revising the code and opinions before restarting this work, I found two > different possible strategies mentioned in the thread: > 1.

Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

2024-08-01 Thread Kirill Reshke
On Thu, 1 Aug 2024 at 23:27, Jeff Davis wrote: > Relatedly, if we can EXPLAIN a CREATE MATERIALIZED VIEW, perhaps we > should be able to EXPLAIN a REFRESH MATERIALIZED VIEW, too? Sure > Comments? Seems like this is indeed inconsistent behaviour and should be fixed in all PGDG-supported versions i

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-08-01 Thread Jeff Davis
On Wed, 2024-07-31 at 18:20 +0900, Yugo NAGATA wrote: > I agree that it might not be important, but I think adding the flag > would be > also helpful for improving code-readability because it clarify the > function > is used in the two cases. I attached patch for this fix (patch 0003). Committed w

Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW

2024-08-01 Thread Jeff Davis
EXPLAIN ANALYZE CREATE MATERIALIZED VIEW doesn't go through ExecCreateTableAs(), but does use CreateIntoRelDestReceiver(). That bypasses the SECURITY_RESTRICTED_OPERATION in ExecCreateTableAs(). That is *not* a security problem, because the SECURITY_RESTRICTED_OPERATION in CREATE MATERIALIZED VIEW

Re: rare crash - FailedAssertion snapbuild.c Line: 580

2024-08-01 Thread Euler Taveira
On Thu, Aug 1, 2024, at 6:59 AM, Pradeep Kumar wrote: > Any update on this? Are you using version 11? This version is obsolete and is not supported anymore. Consider a supported version [1]. Per the following commit (in version 16), this Assert was replaced by elog. commit: 240e0dbacd390a8465552

Re: On disable_cost

2024-08-01 Thread Robert Haas
On Wed, Jul 31, 2024 at 10:01 PM David Rowley wrote: > I've reviewed both patches, here's what I noted down during my review: Thanks. > 0. I've not seen any mention so far about postgres_fdw's > use_remote_estimate. Maybe changing the costs is fixing an issue that > existed before. I'm just not

Re: optimizing pg_upgrade's once-in-each-database steps

2024-08-01 Thread Nathan Bossart
On Wed, Jul 31, 2024 at 10:55:33PM +0100, Ilya Gladyshev wrote: > I like your idea of parallelizing these checks with async libpq API, thanks > for working on it. The patch doesn't apply cleanly on master anymore, but > I've rebased locally and taken it for a quick spin with a pg16 instance of > 10

Re: PG17beta2: SMGR: inconsistent type for nblocks

2024-08-01 Thread Matthias van de Meent
Hi, On Thu, 1 Aug 2024 at 18:44, Andres Freund wrote: > On 2024-08-01 12:45:16 +0200, Matthias van de Meent wrote: > > Here's one that covers both master and the v17 backbranch. > > FWIW, I find it quite ugly to use BlockNumber to indicate the number of blocks > to be written. It's just further i

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

2024-08-01 Thread Fujii Masao
On 2024/07/29 12:58, Hayato Kuroda (Fujitsu) wrote: Dear Fujii-san, IIUC, the patch which adds user_name attribute to get_connection() can be discussed in later stage, is it right? No, let's work on the patch at this stage :) OK, here is a rebased patch. Thanks for updating the patch

Re: Flush pgstats file during checkpoints

2024-08-01 Thread Michael Paquier
On Tue, Jul 30, 2024 at 08:53:48AM +, Bertrand Drouvot wrote: > Did a quick check and still LGTM. Applied 0003 for now to add the redo LSN to the pgstats file, adding the redo LSN to the two DEBUG2 entries when reading and writing while on it, that I forgot. (It was not 01:57 where I am now.)

pg_dump: optimize dumpFunc()

2024-08-01 Thread Nathan Bossart
I've recently committed some optimizations for dumping sequences and pg_class information (commits 68e9629, bd15b7d, and 2329cad), and I noticed that we are also executing a query per function in pg_dump. Commit be85727 optimized this by preparing the query ahead of time, but I found that we can i

Re: PG17beta2: SMGR: inconsistent type for nblocks

2024-08-01 Thread Andres Freund
Hi, On 2024-08-01 12:45:16 +0200, Matthias van de Meent wrote: > On Tue, 30 Jul 2024 at 14:32, Thomas Munro wrote: > > > > On Tue, Jul 30, 2024 at 11:24 PM Matthias van de Meent > > wrote: > > > While working on rebasing the patches of Neon's fork onto the > > > REL_17_STABLE branch, I noticed t

Re: Official devcontainer config

2024-08-01 Thread Jelte Fennema-Nio
On Thu, 1 Aug 2024 at 16:56, Junwang Zhao wrote: > I post my daily used devcontainer config[2] , Jelte(ccd) > suggested that it might be a good idea we integrate the > config into postgres repo so that the barrier to entry for > new developers will be much lower. In my experience adding a devcont

Re: [PATCH] Add crc32(text) & crc32(bytea)

2024-08-01 Thread Nathan Bossart
+/* + * Calculate CRC32 of the given data. + */ +static inline pg_crc32 +crc32_sz(const char *buf, int size) +{ + pg_crc32crc; + const char *p = buf; + + INIT_TRADITIONAL_CRC32(crc); + while (size > 0) + { + charc = (char) (*p); + +

Official devcontainer config

2024-08-01 Thread Junwang Zhao
Stack Overflow 2024 developer survey[1] said VSCode is the most used development environment. In a PostgreSQL Hacker Mentoring discussion, we talked about how to use vscode to debug and running postgres, Andrey(ccd) has tons of tips for new developers, and I post my daily used devcontainer config[

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Robert Haas
On Thu, Aug 1, 2024 at 10:05 AM Joe Conway wrote: > Sure. Of course you should be monitoring your production servers for > anomalous workloads, no? "Gee, why is Joe running the same query > millions of times that keeps throwing errors? Maybe we should go see > what Joe is up to" I think it's poss

Re: Query results vary depending on the plan cache mode used

2024-08-01 Thread Tom Lane
Richard Guo writes: > While working on the grouping sets patches for queries with GROUP BY > items that are constants, I noticed $subject on master. As an > example, consider This particular example seems like it's just an illustration of our known bugs with grouping sets using non-Var columns.

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Tom Lane
Joe Conway writes: > On 8/1/24 07:17, Laurenz Albe wrote: >> But what do you tell the users who would not accept that risk? > Document that the option should not be used if that is the case Are you proposing that we invent two levels of leakproofness with different guarantees? That seems like a

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Joe Conway
On 8/1/24 07:57, Robert Haas wrote: On Wed, Jul 31, 2024 at 4:42 PM Joe Conway wrote: You are assuming that everyone allows direct logins with the ability to create procedures. Plenty don't. Well, if you can send queries, then you can do the same thing, driven by client-side logic. Sure. Of

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Joe Conway
On 8/1/24 07:17, Laurenz Albe wrote: On Wed, 2024-07-31 at 14:43 -0400, Joe Conway wrote: I still maintain that there is a whole host of users that would accept the risk of side channel attacks via existence of an error or not, if they could only be sure nothing sensitive leaks directly into th

Re: Why is citext/regress failing on hamerkop?

2024-08-01 Thread Oleg Tselebrovskiy
Thomas Munro wrote 2024-05-12 06:31: Hamerkop is already green on the 15 and 16 branches, apparently because it's using the pre-meson test stuff that I guess just didn't run the relevant test. In other words, nobody would notice the difference anyway, and a master-only fix would be enough to end

Re: [Patch] remove duplicated smgrclose

2024-08-01 Thread Junwang Zhao
Hi Steven, On Wed, Jul 31, 2024 at 11:16 AM Steven Niu wrote: > > Hello, hackers, > > I think there may be some duplicated codes. > Function smgrDoPendingDeletes() calls both smgrdounlinkall() and smgrclose(). > But both functions would close SMgrRelation object, it's dupliacted behavior? > > So

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Robert Haas
On Wed, Jul 31, 2024 at 4:42 PM Joe Conway wrote: > You are assuming that everyone allows direct logins with the ability to > create procedures. Plenty don't. Well, if you can send queries, then you can do the same thing, driven by client-side logic. If you can't directly send queries in any for

Re: Memory growth observed with C++ application consuming libpq.dll on Windows

2024-08-01 Thread Yasir
Hi Rajesh, Can you please attach a sample code snippet showing libpq's functions being called? It will help to identify the libpq's functions to investigate further for a potential mem leak. Regards... Yasir Hussain On Thu, Aug 1, 2024 at 4:30 PM Rajesh Kokkonda wrote: > Hi, > > We are seeing

Re: Conflict detection and logging in logical replication

2024-08-01 Thread Amit Kapila
On Thu, Aug 1, 2024 at 2:26 PM Hayato Kuroda (Fujitsu) wrote: > > 04. general > > According to the documentation [1], there is another constraint "exclude", > which > can cause another type of conflict. But this pattern cannot be logged in > detail. > As per docs, "exclusion constraints can spe

Memory growth observed with C++ application consuming libpq.dll on Windows

2024-08-01 Thread Rajesh Kokkonda
Hi, We are seeing a gradual growth in the memory consumption of our process on Windows. Ours is a C++ application that directly loads libpq.dll and handles the queries and functions. We use setSingleRowMethod to limit the number of rows returned simultaneously to the application. We do not observe

Re: proposal: schema variables

2024-08-01 Thread Pavel Stehule
čt 1. 8. 2024 v 13:22 odesílatel Laurenz Albe napsal: > On Thu, 2024-08-01 at 08:12 +0200, Pavel Stehule wrote: > > fresh rebase + fix format in doc > > Thanks! > > I'm curious, but too lazy to build the patch now, so I'm asking: > what did you do about this error? > I try to investigate this is

Re: proposal: schema variables

2024-08-01 Thread Laurenz Albe
On Thu, 2024-08-01 at 08:12 +0200, Pavel Stehule wrote: > fresh rebase + fix format in doc Thanks! I'm curious, but too lazy to build the patch now, so I'm asking: what did you do about this error? > CREATE VARIABLE var AS date; > LET var = current_date; > PREPARE stmt(date) AS SELECT $1; > EXEC

Re: can we mark upper/lower/textlike functions leakproof?

2024-08-01 Thread Laurenz Albe
On Wed, 2024-07-31 at 14:43 -0400, Joe Conway wrote: > I still maintain that there is a whole host of users that would accept > the risk of side channel attacks via existence of an error or not, if > they could only be sure nothing sensitive leaks directly into the logs > or to the clients. We s

Re: PG17beta2: SMGR: inconsistent type for nblocks

2024-08-01 Thread Matthias van de Meent
On Tue, 30 Jul 2024 at 14:32, Thomas Munro wrote: > > On Tue, Jul 30, 2024 at 11:24 PM Matthias van de Meent > wrote: > > While working on rebasing the patches of Neon's fork onto the > > REL_17_STABLE branch, I noticed that the nblocks arguments of various > > smgr functions have inconsistent ty

Re: Add LSN <-> time conversion functionality

2024-08-01 Thread Andrey M. Borodin
This is a copy of my message for pgsql-hackers mailing list. Unfortunately original message was rejected due to one of recipients addresses is blocked. > On 1 Aug 2024, at 10:54, Andrey M. Borodin wrote: > > > >> On 1 Aug 2024, at 05:44, Melanie Plageman wrote: >> >> Thanks for the review!

Re: make pg_createsubscriber option names more consistent

2024-08-01 Thread Peter Eisentraut
On 31.07.24 11:15, Hayato Kuroda (Fujitsu) wrote: Dear Peter, I propose to rename the pg_createsubscriber option --socket-directory to --socketdir. This would make it match the equivalent option in pg_upgrade. (It even has the same short option '-s'.) pg_createsubscriber and pg_upgrade have a

Re: rare crash - FailedAssertion snapbuild.c Line: 580

2024-08-01 Thread Pradeep Kumar
Hello all, Any update on this? Thanks and regards Pradeep On Thu, Jul 25, 2024 at 1:09 PM Pradeep Kumar wrote: > Hello all, > > Message Id: > https://www.postgresql.org/message-id/flat/3808dc548e144c860fc3fe57de013809%40xs4all.nl#72629a188e99e14387230fccc8eef518 > > Actually I'm also facing th

Re: [BUG?] check_exclusion_or_unique_constraint false negative

2024-08-01 Thread Michail Nikolaev
Hello, Hayato! > Thanks for pointing out the issue! Thanks for your attention! > IIUC, the issue can happen when two concurrent transactions using DirtySnapshot access > the same tuples, which is not specific to the parallel apply Not exactly, it happens for any DirtySnapshot scan over a B-tree

Re: Comment in portal.h

2024-08-01 Thread Etsuro Fujita
Hi, On Wed, Jul 31, 2024 at 8:55 AM Andy Fan wrote: > Etsuro Fujita writes: > > I noticed $SUBJECT while working on something else: > > > > /* > > * Where we store tuples for a held cursor or a PORTAL_ONE_RETURNING or > > * PORTAL_UTIL_SELECT query. (A cursor held past the end of

Re: Improving tracking/processing of buildfarm test failures

2024-08-01 Thread Alexander Lakhin
02.07.2024 15:00, Alexander Lakhin wrote: One month later,  I'd like to summarize failures that I've investigated and classified during June, 2024 on the aforementioned wiki page. (Maybe it would make sense to issue a monthly report with such information in the future.) Please take a look at J

RE: Conflict detection and logging in logical replication

2024-08-01 Thread Hayato Kuroda (Fujitsu)
Dear Hou, Let me contribute the great feature. I read only the 0001 patch and here are initial comments. 01. logical-replication.sgml track_commit_timestamp must be specified only on the subscriber, but it is not clarified. Can you write down that? 02. logical-replication.sgml I felt that th

Re: Remove duplicate table scan in logical apply worker and code refactoring

2024-08-01 Thread Amit Kapila
On Thu, Aug 1, 2024 at 7:29 AM Hayato Kuroda (Fujitsu) wrote: > > > Thanks for reviewing the patch, and your understanding is correct. > > > > Here is the updated patch 0001. I removed the comments as suggested by Amit. > > > > Since 0002 patch is only refactoring the code and I need some time to

Query results vary depending on the plan cache mode used

2024-08-01 Thread Richard Guo
While working on the grouping sets patches for queries with GROUP BY items that are constants, I noticed $subject on master. As an example, consider prepare q1(int) as select $1 as c1, $1 as c2 from generate_series(1,2) t group by rollup(c1); set plan_cache_mode to force_custom_plan; execute q1(

Re: Pgoutput not capturing the generated columns

2024-08-01 Thread Peter Smith
Hi, Here are my review comments for patch v22-0001 All comments now are only for the TAP test. == src/test/subscription/t/011_generated.pl 1. I added all new code for the missing combination test case "gen-to-missing". See nitpicks diff. - create a separate publication for this "tab_gen_to_m

Re: proposal: schema variables

2024-08-01 Thread Pavel Stehule
čt 1. 8. 2024 v 9:45 odesílatel Erik Rijkers napsal: > doc-build fails: a slash tumbled backwards in doc/src/sgml: > > $ grep 'xref.*.\\>' *.sgml > plpgsql.sgml: (see ). > > That should simply be a forward slash, of course. > should be fixed in my today patchset > > Thanks, > > Erik Rijk

Re: proposal: schema variables

2024-08-01 Thread Erik Rijkers
doc-build fails: a slash tumbled backwards in doc/src/sgml: $ grep 'xref.*.\\>' *.sgml plpgsql.sgml: (see ). That should simply be a forward slash, of course. Thanks, Erik Rijkers Op 8/1/24 om 08:12 schreef Pavel Stehule: Hi fresh rebase + fix format in doc Regards Pavel

Re: v17 vs v16 performance comparison

2024-08-01 Thread Alexander Lakhin
Hello Thomas. 01.08.2024 08:57, Thomas Munro wrote: On Thu, Aug 1, 2024 at 3:00 PM Alexander Lakhin wrote: So it looks like q15 from TPC-DS is not the only query suffering from that change. I'm going to try to set up a local repro to study these new cases. If you have a write-up somewhere of