Re: A problem in deconstruct_distribute_oj_quals

2023-02-07 Thread Richard Guo
On Tue, Feb 7, 2023 at 2:12 PM Tom Lane wrote: > Richard Guo writes: > > I noticed this code because I came across a problem with a query as > > below. > > > create table t (a int); > > > select t1.a from (t t1 left join t t2 on true) left join (t t3 left join > t > > t4 on t3.a = t4.a) on t2.a

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

2023-02-07 Thread Tatsuo Ishii
>> Since this commit, make_etags has started failing to generate >> tags files with the following error messages, on my MacOS. >> >> $ src/tools/make_etags >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags: >> illegal option -- e >> usage: ctags [-BFad

Regarding TPCC benchmarking of postgresql for streaming

2023-02-07 Thread chandan kunal
Hi All, I want to do TPCC benchmarking of postgresql with streaming data Now I am guessing the COPY command can be used for this purpose or is there any other option for this? Can someone point me towards a better option to do it in the best way? Regards, Chandan

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-07 Thread Amit Kapila
On Tue, Feb 7, 2023 at 8:22 AM Hayato Kuroda (Fujitsu) wrote: > > Thank you for reviewing! PSA new version. > Few comments: = 1. @@ -74,6 +74,8 @@ CATALOG(pg_subscription,6100,SubscriptionRelationId) BKI_SHARED_RELATION BKI_ROW Oid subowner BKI_LOOKUP(pg_authid); /* Owner of the su

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

2023-02-07 Thread Yugo NAGATA
On Tue, 07 Feb 2023 17:19:37 +0900 (JST) Tatsuo Ishii wrote: > >> Since this commit, make_etags has started failing to generate > >> tags files with the following error messages, on my MacOS. > >> > >> $ src/tools/make_etags > >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault

Re: Pluggable toaster

2023-02-07 Thread Aleksander Alekseev
Hi, > I believe that is a misrepresentation of the situation. ZSON had > (has?) several systemic issues and could not be accepted to /contrib/ > in the way it was implemented, and it was commented that it would make > sense that the feature of compression assisted by dictionaries would > be implem

Re: Add a test case related to the error "cannot fetch toast data without an active snapshot"

2023-02-07 Thread Nitin Jadhav
> if a procedure fetches a toasted value into a local variable, commits, > and then tries to detoast the value. I spent some time and tried to reproduce this error by using [1] queries. But the error did not occur. Not sure whether I followed what is mentioned in the above comment. Please correct

Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Rinat Shigapov
Hi, TLDR: this email describes a serialization failure that happens (as I understand it) due to too coarse predicate locks granularity for primary key index. I have a concurrent testsuite that runs 14 test cases. Each test case operates on a disjoint set of records, doesn't retry transactions and

Re: MERGE ... WHEN NOT MATCHED BY SOURCE

2023-02-07 Thread Dean Rasheed
On Sat, 21 Jan 2023 at 14:18, Ted Yu wrote: > > On Sat, Jan 21, 2023 at 3:05 AM Dean Rasheed wrote: >> >> Rebased version, following 8eba3e3f02 and 5d29d525ff. >> Another rebased version attached. > In transform_MERGE_to_join : > > + if (action->matchKind == > MERGE_WHEN_

Re: Pluggable toaster

2023-02-07 Thread Pavel Borisov
Hi, hackers! Maybe I've read the thread too superficially, but for me, it seems like more of a discussion on what TOAST should NOT be. Maybe someone more in the topic could explain what is the consensus on what we require and what we like to to have in a new TOAST? For me, a good toast should be

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-02-07 Thread Dilip Kumar
On Mon, Dec 26, 2022 at 2:20 PM Bharath Rupireddy wrote: > I have gone through this patch, I have some comments (mostly cosmetic and comments) 1. + /* + * We have found the WAL buffer page holding the given LSN. Read from a + * pointer to the right offset within the page. + */ + memcpy(page, (XL

Re: [PATCH] Compression dictionaries for JSONB

2023-02-07 Thread Alvaro Herrera
On 2023-Feb-05, Aleksander Alekseev wrote: > Since PostgreSQL is not a specified document-oriented DBMS I think we > better focus our (far from being infinite) resources on something more > people would benefit from: AIO/DIO [1] or perhaps getting rid of > freezing [2], to name a few examples. Fo

Re: MERGE ... RETURNING

2023-02-07 Thread Dean Rasheed
On Mon, 23 Jan 2023 at 16:54, Dean Rasheed wrote: > > On Sun, 22 Jan 2023 at 19:08, Alvaro Herrera wrote: > > > > Regarding mas_action_idx, I would have thought that it belongs in > > MergeAction rather than MergeActionState. After all, you determine it > > once at parse time, and it is a consta

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Thomas Munro
On Tue, Feb 7, 2023 at 11:24 PM Rinat Shigapov wrote: > Does the current PostgreSQL release support B+ tree index predicate locks > more granular then page-level locks? No. I tried to follow some breadcrumbs left by Kevin and Dan that should allow unique index scans that find a match to skip th

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-07 Thread Amit Kapila
On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada wrote: > > Attached updated patches. > In back-branch patches, the change is as below: + * + * NB: the caller must hold ProcArrayLock in an exclusive mode regardless of + * already_locked which is unused now but kept for ABI compatibility. */ voi

Hi i am Intrested to contribute

2023-02-07 Thread Shivam Ardeshna
Respected Sir/Mam I am Shivam Ardeshna, A Computer Science Undergraduate 2nd Year. I was looking for a contribution and then I saw pgsql and wanted to contribute to it even if I don't know about some languages I will try to learn and solve the issues so can you allow me to do somethi

Missing TAG for FEB (current) Minor Version Release

2023-02-07 Thread sujit.rat...@fujitsu.com
Hi OSS Community, We just wanted to confirm when the TAG will be created for the current FEB minor release as we could not find the TAG for none of the minor versions, below is the screen shot for the some of the minor versions. [cid:image001.png@01D93B13.7BF82E20] Could you please confirm when w

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Andrew Dunstan
On 2023-02-06 Mo 23:43, Noah Misch wrote: Well, we did talk about adding a pre-commit hook to the repository, with instructions for how to enable it. And I don't see a problem with adding the pre-receive we're discussing here to src/tools/something. Yeah. I don't think we are seriously consi

Re: Hi i am Intrested to contribute

2023-02-07 Thread Pavel Borisov
Hi, Shivam! > Respected Sir/Mam > > I am Shivam Ardeshna, A Computer Science Undergraduate 2nd > Year. I was looking for a contribution and then I saw pgsql and wanted to > contribute to it even if I don't know about some languages I will try to > learn and solve the issues so can

Re: Understanding years part of Interval

2023-02-07 Thread Marcos Pegoraro
> > The years are converted to months and the fractional month is rounded half >> up: >> >> 1.05 year = 12.6 month >> => 1 year 0.6 month >> => 1 year 1 month(after rounding) >> >> Compare that to 12.5 months to see when the rounding occurs: >> >> 12.5 month

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Rinat Shigapov
Thomas, thank you for the details! Have you kept the branch that you used to generate the patch? Which commit should the patch apply to? With kindest regards, Rinat Shigapov вт, 7 февр. 2023 г. в 17:11, Thomas Munro : > On Tue, Feb 7, 2023 at 11:24 PM Rinat Shigapov > wrote: > > Does the curr

Re: Support logical replication of DDLs

2023-02-07 Thread vignesh C
On Mon, 6 Feb 2023 at 17:02, vignesh C wrote: > > On Mon, 6 Feb 2023 at 06:47, Peter Smith wrote: > > > > Here are some comments for patch v63-0002. > > > > This is a WIP because I have not yet looked at the large file - > > ddl_deparse.c. > > > > == > > Commit Message > > > > 1. > > This pa

Re: OpenSSL 3.0.0 vs old branches

2023-02-07 Thread Andrew Dunstan
On 2023-02-07 Tu 02:18, Peter Eisentraut wrote: On 06.02.23 16:56, Andrew Dunstan wrote: I recently moved crake to a new machine running Fedora 36, which has OpenSSL 3.0.0. This causes the SSL tests to fail on branches earlier than release 13, so I propose to backpatch commit f0d2c65f17 to the

Re: Missing TAG for FEB (current) Minor Version Release

2023-02-07 Thread Alvaro Herrera
On 2023-Feb-07, sujit.rat...@fujitsu.com wrote: > Hi OSS Community, > We just wanted to confirm when the TAG will be created for the current FEB > minor release as we could not find the TAG for none of the minor versions, > below is the screen shot for the some of the minor versions. Yes, it wil

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

2023-02-07 Thread Tatsuo Ishii
> Does is make sense to change make_etags as the attached patch does? > This allows make_etags to use etags if Exuberant-type ctags is not > available. This allows users to use make_etags if hey has either > Exuberant-type ctags or etags. The patch drops support for "-n" option :-< Attached is th

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Amit Kapila
On Tue, Feb 7, 2023 at 5:16 PM Andrew Dunstan wrote: > > On 2023-02-06 Mo 23:43, Noah Misch wrote: > > > Well, we did talk about adding a pre-commit hook to the repository, with > instructions for how to enable it. And I don't see a problem with adding the > pre-receive we're discussing here to sr

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Magnus Hagander
On Tue, Feb 7, 2023 at 1:56 PM Amit Kapila wrote: > On Tue, Feb 7, 2023 at 5:16 PM Andrew Dunstan wrote: > > > > On 2023-02-06 Mo 23:43, Noah Misch wrote: > > > > > > Well, we did talk about adding a pre-commit hook to the repository, with > > instructions for how to enable it. And I don't see a

Allow auto_explain to log plan duration and buffer usage

2023-02-07 Thread torikoshia
Hi, -- commit 9d2d9728b8d546434aade4f9667a59666588edd6 Author: Michael Paquier Date: Thu Jan 26 12:23:16 2023 +0900 Make auto_explain print the query identifier in verbose mode ..(snip).. While looking at the area, I have noticed that more consolidation between EXPLAIN and auto_explain would

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Andrew Dunstan
On 2023-02-06 Mo 09:40, Robert Haas wrote: 2. I'd like an easy way to indent the unstaged files in the current directory (e.g. pgindent --dirty) or the files that have been queued up for commit (e.g. pgindent --cached). My git-fu is probably not all that it should be. I think we could possib

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Andrew Dunstan
On 2023-02-07 Tu 07:59, Magnus Hagander wrote: On Tue, Feb 7, 2023 at 1:56 PM Amit Kapila wrote: On Tue, Feb 7, 2023 at 5:16 PM Andrew Dunstan wrote: > > On 2023-02-06 Mo 23:43, Noah Misch wrote: > > > Well, we did talk about adding a pre-commit hook to the

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

2023-02-07 Thread Yugo NAGATA
On Tue, 07 Feb 2023 21:29:04 +0900 (JST) Tatsuo Ishii wrote: > > Does is make sense to change make_etags as the attached patch does? > > This allows make_etags to use etags if Exuberant-type ctags is not > > available. This allows users to use make_etags if hey has either > > Exuberant-type ctags

Re: [PATCH] Compression dictionaries for JSONB

2023-02-07 Thread Aleksander Alekseev
Hi, > > The complexity of page-level compression is significant, as pages are > > currently a base primitive of our persistency and consistency scheme. > > +many > > It's also not all a panacea performance-wise, datum-level decompression can > often be deferred much longer than page level decompre

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-07 Thread Takamichi Osumi (Fujitsu)
Hi, On Tuesday, February 7, 2023 6:56 PM Amit Kapila wrote: > On Tue, Feb 7, 2023 at 8:22 AM Hayato Kuroda (Fujitsu) > wrote: > > > > Thank you for reviewing! PSA new version. > > > > Few comments: > = Thanks for your comments ! > 1. > @@ -74,6 +74,8 @@ CATALOG(pg_subscription,61

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-07 Thread Takamichi Osumi (Fujitsu)
Hi, On Tuesday, February 7, 2023 2:26 PM Amit Kapila wrote: > On Tue, Feb 7, 2023 at 10:13 AM Kyotaro Horiguchi > wrote: > > > > At Mon, 6 Feb 2023 13:10:01 +, "Takamichi Osumi (Fujitsu)" > > wrote in > > > The attached patch v29 has included your changes. > > > > catalogs.sgml > > > > +

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-02-07 Thread Takamichi Osumi (Fujitsu)
Hi, Horiguchi-san Thanks for your review ! On Tuesday, February 7, 2023 1:43 PM From: Kyotaro Horiguchi wrote: > At Mon, 6 Feb 2023 13:10:01 +, "Takamichi Osumi (Fujitsu)" > wrote in > subscriptioncmds.c > > + if (opts.streaming == > LOGICALREP_STREAM_P

Track Oldest Initialized WAL Buffer Page

2023-02-07 Thread Bharath Rupireddy
Hi, While working on [1], I was looking for a quick way to tell if a WAL record is present in the WAL buffers array without scanning but I couldn't find one. Hence, I put up a patch that basically tracks the oldest initialized WAL buffer page, named OldestInitializedPage, in XLogCtl. With OldestIn

How to solve "too many Lwlocks taken"?

2023-02-07 Thread jack...@gmail.com
I'm trying to write am table_am extension. But I get "too many Lwlocks taken" after I insert too many tuples. So I try to use UnLockBuffers() everywhere; but it still give me "too many Lwlocks taken", So how should I release All locks? -- jack...@gmail.com

RE: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Hayato Kuroda (Fujitsu)
Dear Andres, Amit, > On 2023-02-07 09:00:13 +0530, Amit Kapila wrote: > > On Tue, Feb 7, 2023 at 2:04 AM Andres Freund wrote: > > > How about we make it an option in START_REPLICATION? Delayed logical > rep can > > > toggle that on by default. > > > Works for me. So, when this option is set in S

Re: daitch_mokotoff module

2023-02-07 Thread Dag Lem
Hi Paul, I just went by to check the status of the patch, and I noticed that you've added yourself as reviewer earlier - great! Please tell me if there is anything I can do to help bring this across the finish line. Best regards, Dag Lem

SQLFunctionCache and generic plans

2023-02-07 Thread Ronan Dunklau
Hello, It has been brought to my attention that SQL functions always use generic plans. Take this function for example: create or replace function test_plpgsql(p1 oid) returns text as $$ BEGIN RETURN (SELECT relname FROM pg_class WHERE oid = p1 OR p1 IS NULL LIMIT 1); END; $$ language pl

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Tom Lane
Amit Kapila writes: > On Tue, Feb 7, 2023 at 5:16 PM Andrew Dunstan wrote: >> On 2023-02-06 Mo 23:43, Noah Misch wrote: Yeah. I don't think we are seriously considering putting any restrictions in place on gitmaster >>> I could have sworn that was exactly what we were discussing, a pr

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Justin Pryzby
On Sat, Feb 04, 2023 at 12:37:11PM -0500, Tom Lane wrote: > Justin Pryzby writes: > Hmmm ... inserting all of those as the default options would likely > make it impossible to update pg_bsd_indent itself with anything like > its current indent style (not that it's terribly consistent about > that

Re: SQLFunctionCache and generic plans

2023-02-07 Thread Tom Lane
Ronan Dunklau writes: > The following comment can be found in functions.c, about the SQLFunctionCache: > * Note that currently this has only the lifespan of the calling query. > * Someday we should rewrite this code to use plancache.c to save parse/plan > * results for longer than that. > I w

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Andrew Dunstan
On 2023-02-07 Tu 10:25, Justin Pryzby wrote: On Sat, Feb 04, 2023 at 12:37:11PM -0500, Tom Lane wrote: Justin Pryzby writes: Hmmm ... inserting all of those as the default options would likely make it impossible to update pg_bsd_indent itself with anything like its current indent style (not th

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Tom Lane
Justin Pryzby writes: > On Sat, Feb 04, 2023 at 12:37:11PM -0500, Tom Lane wrote: >> But it's not clear to me why you're allergic to the perl wrapper? > My allergy is to the totality of the process, not to the perl component. > It's a bit weird to enforce a coding style that no upstream indent to

RE: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Hayato Kuroda (Fujitsu)
> Dear Andres, Amit, > > > On 2023-02-07 09:00:13 +0530, Amit Kapila wrote: > > > On Tue, Feb 7, 2023 at 2:04 AM Andres Freund wrote: > > > > How about we make it an option in START_REPLICATION? Delayed logical > > rep can > > > > toggle that on by default. > > > > > Works for me. So, when this o

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Robert Haas
On Tue, Feb 7, 2023 at 8:17 AM Andrew Dunstan wrote: > My git-fu is probably not all that it should be. I think we could possibly > get at this list of files by running > > git status --porcelain --untracked-files=no --ignored=no -- . > > And then your --dirty list would be lines beginning with

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Andrey Borodin
On Tue, Feb 7, 2023 at 4:01 AM Rinat Shigapov wrote: > > Thomas, thank you for the details! > > Have you kept the branch that you used to generate the patch? Which commit > should the patch apply to? > You can try something like git checkout 'master@{2018-05-13 13:37:00}' to get a commit by date

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Jelte Fennema
On Tue, 7 Feb 2023 at 17:11, Robert Haas wrote: > I don't know if that works or not, but it does seem plausible, at > least. My idea would have been to use the --name-status option, which > works for both git diff and git show. You just look and see which > lines in the output start with M or A an

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Robert Haas
On Tue, Feb 7, 2023 at 11:32 AM Jelte Fennema wrote: > On Tue, 7 Feb 2023 at 17:11, Robert Haas wrote: > > I don't know if that works or not, but it does seem plausible, at > > least. My idea would have been to use the --name-status option, which > > works for both git diff and git show. You just

Re: A problem in deconstruct_distribute_oj_quals

2023-02-07 Thread Tom Lane
Richard Guo writes: > On Tue, Feb 7, 2023 at 2:12 PM Tom Lane wrote: >> I don't see any change in this query plan when I remove that code, so >> I'm not sure you're explaining your point very well. > To observe an obvious plan change, we can add unique constraint for 'a' > and look how outer-joi

Re: daitch_mokotoff module

2023-02-07 Thread Paul Ramsey
> On Feb 7, 2023, at 6:47 AM, Dag Lem wrote: > > I just went by to check the status of the patch, and I noticed that > you've added yourself as reviewer earlier - great! > > Please tell me if there is anything I can do to help bring this across > the finish line. Honestly, I had set it to Re

RE: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Hayato Kuroda (Fujitsu)
> I noticed that previous ones are rejected by cfbot, even if they passed on my > environment... > PSA fixed version. While analyzing more, I found the further bug that forgets initialization. PSA new version that could be passed automated tests on my github repository. Sorry for noise. Best Rega

Re: run pgindent on a regular basis / scripted manner

2023-02-07 Thread Jelte Fennema
> On Mon, Feb 6, 2023 at 10:21 AM Andrew Dunstan wrote: > > Here's a quick patch for 1 and 3. Would also need to adjust the docco. > > > > This time with patch. When supplying the --commit flag it still formats all files for me. I was able to fix that by replacing: # no non-option arguments given

Re: Speed up transaction completion faster after many relations are accessed in a transaction

2023-02-07 Thread Andres Freund
Hi, On 2023-01-24 16:57:37 +1300, David Rowley wrote: > I've attached a rebased patch. Looks like there's some issue causing tests to fail probabilistically: https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest%2F42%2F3501 Several failures are when testing a 32bit build. > Whi

Re: generic plans and "initial" pruning

2023-02-07 Thread Andres Freund
Hi, On 2023-02-03 22:01:09 +0900, Amit Langote wrote: > I've added a test case under src/modules/delay_execution by adding a > new ExecutorStart_hook that works similarly as > delay_execution_planner(). The test works by allowing a concurrent > session to drop an object being referenced in a cach

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2023-02-07 Thread Andres Freund
Hi, On 2023-01-24 14:30:34 +0100, David Geier wrote: > Attached is v7 of the patch: > > - Rebased on latest master (most importantly on top of the int64 instr_time > commits). - Includes two commits from Andres which introduce > INSTR_TIME_SET_SECONDS(), INSTR_TIME_IS_LT() and WIP to report > pg_

Re: Can we let extensions change their dumped catalog schemas?

2023-02-07 Thread Jacob Champion
On Tue, Jan 17, 2023 at 3:18 PM Jacob Champion wrote: > As a concrete example, Timescale's extension control file could look > like this: > > default_version = '2.x.y' > module_pathname = '$libdir/timescaledb-2.x.y' > ... > dump_version = true > > which would then cause pg_dump to

Re: How to solve "too many Lwlocks taken"?

2023-02-07 Thread Andres Freund
Hi, On 2023-02-07 22:16:36 +0800, jack...@gmail.com wrote: > > I'm trying to write am table_am extension. But I get "too many Lwlocks taken" > after I insert > too many tuples. So I try to use UnLockBuffers() everywhere; but it still > give me "too many Lwlocks taken", > So how should I releas

Re: [PATCH] Make ON CONFLICT DO NOTHING and ON CONFLICT DO UPDATE consistent

2023-02-07 Thread Andres Freund
Hi, On 2023-01-26 13:07:08 +0300, Aleksander Alekseev wrote: > > It *certainly* can't be right to just continue with the update in > > heap_update, > > I see no reason why. What makes this case so different from updating a > tuple created by the previous command? To me it's a pretty fundamental

Re: OpenSSL 3.0.0 vs old branches

2023-02-07 Thread Tom Lane
Andrew Dunstan writes: > On 2023-02-07 Tu 02:18, Peter Eisentraut wrote: >> This is not the only patch that we did to support OpenSSL 3.0.0. There >> was a very lengthy discussion that resulted in various patches.  >> Unless we have a complete analysis of what was done and how it affects >> var

possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-02-07 Thread Pavel Stehule
Hi I have a question about the possibility of simply getting the name of the currently executed function. The reason for this request is simplification of writing debug messages. GET DIAGNOSTICS _oid = PG_ROUTINE_OID; RAISE NOTICE '... % ... %', _oid, _oid::regproc::text; The advantage of this d

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-07 Thread Andres Freund
Hi, On 2023-02-01 11:23:57 +0530, Amit Kapila wrote: > On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada wrote: > > > > Attached updated patches. > > > > Thanks, Andres, others, do you see a better way to fix this problem? I > have reproduced it manually and the steps are shared at [1] and > Sawada

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-07 Thread Andres Freund
Hi, On 2023-02-07 11:49:03 -0800, Andres Freund wrote: > On 2023-02-01 11:23:57 +0530, Amit Kapila wrote: > > On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada > > wrote: > > > > > > Attached updated patches. > > > > > > > Thanks, Andres, others, do you see a better way to fix this problem? I > >

Re: improving user.c error messages

2023-02-07 Thread Nathan Bossart
On Fri, Jan 27, 2023 at 03:15:07PM -0800, Nathan Bossart wrote: > One thing that feels a bit odd is how some of the DETAILs mention the > operation being attempted while others do not. For example, we have > > ERROR: permission denied to drop role > DETAIL: You must have SUPERUSER pr

Re:pg_stat_statements and "IN" conditions

2023-02-07 Thread Sergei Kornilov
Hello! Unfortunately, rebase is needed again due to recent changes in queryjumblefuncs ( 9ba37b2cb6a174b37fc51d0649ef73e56eae27fc ) It seems a little strange to me that with const_merge_threshold = 1, such a test case gives the same result as with const_merge_threshold = 2 select pg_stat_state

Re: A bug in make_outerjoininfo

2023-02-07 Thread Tom Lane
Richard Guo writes: > In cases where we have any clauses between two outer joins, these > clauses should be treated as degenerate clauses in the upper OJ, and > they may prevent us from re-ordering the two outer joins. Previously we > have the flag 'delay_upper_joins' to help avoid the re-orderin

Re: pglz compression performance, take two

2023-02-07 Thread Andres Freund
Hi, On 2023-02-05 10:36:39 -0800, Andrey Borodin wrote: > On Fri, Jan 6, 2023 at 10:02 PM Andrey Borodin wrote: > > > > Hello! Please find attached v8. > > I got some interesting feedback from some patch users. > There was an oversight that frequently yielded results that are 1,2 or > 3 bytes lon

Re: SLRUs in the main buffer pool - Page Header definitions

2023-02-07 Thread Andres Freund
Hi, On 2023-02-06 19:12:47 +, Bagga, Rishu wrote: > Rebased patch as per latest community changes since last email. This version doesn't actually build. https://cirrus-ci.com/task/4512310190931968 [19:43:20.131] FAILED: src/test/modules/test_slru/test_slru.so.p/test_slru.c.o [19:43:20.131

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

2023-02-07 Thread Andres Freund
Hi, On 2022-11-16 08:58:31 +, wangw.f...@fujitsu.com wrote: > Attach the new patch set. This patch causes several of the tests to fail. See e.g.: https://cirrus-ci.com/task/6587624765259776 Most of the failures appear to be due to the main regression tests failing: https://api.cirrus-ci.com

Re: heapgettup refactoring

2023-02-07 Thread Melanie Plageman
On Tue, Feb 07, 2023 at 05:40:13PM +1300, David Rowley wrote: > On Fri, 3 Feb 2023 at 15:26, David Rowley wrote: > > I've pushed all but the final 2 patches now. > > I just pushed the final patch in the series. Cool! > I held back on moving the setting of rs_inited back into the > heapgettup_in

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-02-07 Thread Kirk Wolak
On Tue, Feb 7, 2023 at 2:49 PM Pavel Stehule wrote: > Hi > > I have a question about the possibility of simply getting the name of the > currently executed function. The reason for this request is simplification > of writing debug messages. > > GET DIAGNOSTICS _oid = PG_ROUTINE_OID; > RAISE NOTIC

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 5:25 AM Andrey Borodin wrote: > On Tue, Feb 7, 2023 at 4:01 AM Rinat Shigapov wrote: > > Thomas, thank you for the details! > > > > Have you kept the branch that you used to generate the patch? Which commit > > should the patch apply to? > > You can try something like > gi

Re: Too coarse predicate locks granularity for B+ tree indexes

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 10:44 AM Thomas Munro wrote: > On Wed, Feb 8, 2023 at 5:25 AM Andrey Borodin wrote: > > On Tue, Feb 7, 2023 at 4:01 AM Rinat Shigapov > > wrote: > > > Thomas, thank you for the details! > > > > > > Have you kept the branch that you used to generate the patch? Which > > >

Re: Non-superuser subscription owners

2023-02-07 Thread Robert Haas
On Wed, Feb 1, 2023 at 4:02 PM Andres Freund wrote: > On 2023-01-30 15:32:34 -0500, Robert Haas wrote: > > I had a long think about what to do with ALTER SUBSCRIPTION ... OWNER > > TO in terms of permissions checks. > > As long as owner and run-as are the same, I think it's strongly > preferrable

Re: daitch_mokotoff module

2023-02-07 Thread Tomas Vondra
On 2/7/23 18:08, Paul Ramsey wrote: > > >> On Feb 7, 2023, at 6:47 AM, Dag Lem wrote: >> >> I just went by to check the status of the patch, and I noticed that >> you've added yourself as reviewer earlier - great! >> >> Please tell me if there is anything I can do to help bring this across >> th

Re: Generating code for query jumbling through gen_node_support.pl

2023-02-07 Thread Tom Lane
Michael Paquier writes: > With all that in mind, I have spent my day polishing that and doing a > close lookup, and the patch has been applied. Thanks a lot! I have just noticed that this patch is generating useless jumbling code for node types such as Path nodes and other planner infrastructure

Re: A bug in make_outerjoininfo

2023-02-07 Thread Tom Lane
I wrote: > Richard Guo writes: >> In b448f1c8 remove_useless_result_rtes will remove useless FromExprs and >> merge its quals up to parent. This makes flag 'delay_upper_joins' not >> necessary any more if the clauses between the two outer joins come from >> FromExprs. However, if the clauses bet

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

2023-02-07 Thread Tatsuo Ishii
>> The patch drops support for "-n" option :-< >> >> Attached is the patch by fixing make_ctags (make_etags is not >> touched). >> >> If Exuberant-type ctags is available, use it (not changed). >> If Exuberant-type ctags is not available, try old ctags (not changed). >> If the old ctags doe

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

2023-02-07 Thread Tatsuo Ishii
>> I am not sure if this is good way to check if ctags supports "-e" or not. >> >> +thenctags --version 2>&1 | grep -- -e >/dev/null >> >> Perhaps, "--help" might be intended rather than "--version" to check >> supported options? > > Yeah, that was my mistake. > >> Even so, ctags woul

Re: RLS makes COPY TO process child tables

2023-02-07 Thread Stephen Frost
Greetings, * Yugo NAGATA (nag...@sraoss.co.jp) wrote: > On Wed, 01 Feb 2023 11:47:23 -0500 > Tom Lane wrote: > > > Yugo NAGATA writes: > > > Antonin Houska wrote: > > >> While working on [1] I noticed that if RLS gets enabled, the COPY TO > > >> command > > >> includes the contents of child t

deadlock-hard flakiness

2023-02-07 Thread Andres Freund
Hi, On cfbot / CI, we've recently seen a lot of spurious test failures due to src/test/isolation/specs/deadlock-hard.spec changing output. Always on freebsd, when running tests against a pre-existing instance. I'm fairly sure I've seen this failure on the buildfarm as well, but I'm too impatient

windows CI failing PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED

2023-02-07 Thread Andres Freund
Hi, A recent cfbot run caused CI on windows to crash - on a patch that could not conceivably cause this issue: https://cirrus-ci.com/task/564602116576 the patch is just: https://github.com/postgresql-cfbot/postgresql/commit/dbd4afa6e7583c036b86abe2e3d27b508d335c2b regression.diffs: http

Re: windows CI failing PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 2:28 PM Andres Freund wrote: > 2023-02-08 00:53:20.257 GMT client backend[4584] pg_regress/rangetypes > STATEMENT: select '-[a,z)'::textrange; > TRAP: failed Assert("PMSignalState->PMChildFlags[slot] == > PM_CHILD_ASSIGNED"), File: "../src/backend/storage/ipc/pmsignal.c",

Re: Add index scan progress to pg_stat_progress_vacuum

2023-02-07 Thread Imseih (AWS), Sami
Hi, Thanks for your reply! I addressed the latest comments in v23. 1/ cleaned up the asserts as discussed. 2/ used pq_putmessage to send the message on index scan completion. Thanks -- Sami Imseih Amazon Web Services (AWS) v23-0001-Add-2-new-columns-to-pg_stat_progress_vacuum.-Th.patch Desc

Re: heapgettup refactoring

2023-02-07 Thread David Rowley
On Wed, 8 Feb 2023 at 09:41, Melanie Plageman wrote: > > On Tue, Feb 07, 2023 at 05:40:13PM +1300, David Rowley wrote: > > I ended up adjusting HeapScanDescData more than what is minimally > > required to remove rs_inited. I wondered if rs_cindex should be closer > > to rs_cblock in the struct so

Re: Missing TAG for FEB (current) Minor Version Release

2023-02-07 Thread Justin Pryzby
On Tue, Feb 07, 2023 at 11:14:48AM +, sujit.rat...@fujitsu.com wrote: > Hi OSS Community, > We just wanted to confirm when the TAG will be created for the current FEB > minor release as we could not find the TAG for none of the minor versions, > below is the screen shot for the some of the min

Re: Exit walsender before confirming remote flush in logical replication

2023-02-07 Thread Kyotaro Horiguchi
I agree to the direction and thanks for the patch. At Tue, 7 Feb 2023 17:08:54 +, "Hayato Kuroda (Fujitsu)" wrote in > > I noticed that previous ones are rejected by cfbot, even if they passed on > > my > > environment... > > PSA fixed version. > > While analyzing more, I found the furthe

Re: Add LZ4 compression in pg_dump

2023-02-07 Thread Justin Pryzby
On Tue, Jan 31, 2023 at 09:00:56AM +, gkokola...@pm.me wrote: > > In my mind, three things here are misleading, because it doesn't use > > gzip headers: > > > > | GzipCompressorState, DeflateCompressorGzip, "gzip compressed". > > > > This comment is about exactly that: > > > > * underlying s

Re: tests against running server occasionally fail, postgres_fdw & tenk1

2023-02-07 Thread Andres Freund
Hi, On 2023-02-06 17:53:00 -0800, Andres Freund wrote: > Another run hit an issue we've been fighting repeatedly on the buildfarm / CI: > https://cirrus-ci.com/task/5527490404286464 > https://api.cirrus-ci.com/v1/artifact/task/5527490404286464/testrun/build/testrun/regress-running/regress/regressi

Difference of ecpg japanese translation in PG15

2023-02-07 Thread Sho Kato (Fujitsu)
Hello In PG15, ecpg japanese translation are different from other branches. Is there a reason for this? If not, I think it would be better to make it the same as the other branch like the attached patch. regards, sho kato update-japanese-translation.patch Description: update-japanese-translati

Re: windows CI failing PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 2:52 PM Thomas Munro wrote: > On Wed, Feb 8, 2023 at 2:28 PM Andres Freund wrote: > > TRAP: failed Assert("PMSignalState->PMChildFlags[slot] == > > PM_CHILD_ASSIGNED"), File: "../src/backend/storage/ipc/pmsignal.c", Line: > > 329, PID: 5948 I was wondering if commit 18a4

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

2023-02-07 Thread wangw.f...@fujitsu.com
On Tue, Feb 7, 2023 15:37 PM Amit Kapila wrote: > On Tue, Feb 7, 2023 at 12:41 PM Masahiko Sawada > wrote: > > > > On Fri, Feb 3, 2023 at 6:44 PM Amit Kapila wrote: > > > > > We need to think of a predictable > > > way to test this path which may not be difficult. But I guess it would > > > be b

Normalization of utility queries in pg_stat_statements

2023-02-07 Thread Michael Paquier
Hi all, (Adding Bertrand in CC.) $subject is a follow-up of the automation of query jumbling for utilities and DDLs, and attached is a set of patches that apply normalization to DDL queries across the board, for all utilities. This relies on tracking the location of A_Const nodes while removing f

Re: windows CI failing PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED

2023-02-07 Thread Thomas Munro
On Wed, Feb 8, 2023 at 4:00 PM Thomas Munro wrote: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2021-08-12%2010:38:56 > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2021-09-28%2016:40:49 These were a bit different though. They also logged "could

Re: Missing TAG for FEB (current) Minor Version Release

2023-02-07 Thread Tom Lane
Justin Pryzby writes: > On Tue, Feb 07, 2023 at 11:14:48AM +, sujit.rat...@fujitsu.com wrote: >> Could you please confirm when we can expect the TAG created for all minor >> versions? > You might be interested to read this earlier question: > https://www.postgresql.org/message-id/flat/2e5676

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

2023-02-07 Thread wangw.f...@fujitsu.com
On Wed, Feb 8, 2023 4:29 AM Andres Freund wrote: > Hi, > > On 2022-11-16 08:58:31 +, wangw.f...@fujitsu.com wrote: > > Attach the new patch set. > > This patch causes several of the tests to fail. See e.g.: > > https://cirrus-ci.com/task/6587624765259776 > > Most of the failures appear to

Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

2023-02-07 Thread Michael Paquier
On Thu, Feb 02, 2023 at 11:14:39AM +0900, Michael Paquier wrote: > Actually, I completely forgot to take into account that there is a > minor release planned for next week: > https://www.postgresql.org/developer/roadmap/ > > So I'll hold on a bit longer here, until the next versions get their > ta

Re: Assertion failure in SnapBuildInitialSnapshot()

2023-02-07 Thread Amit Kapila
On Wed, Feb 8, 2023 at 1:19 AM Andres Freund wrote: > > On 2023-02-01 11:23:57 +0530, Amit Kapila wrote: > > On Tue, Jan 31, 2023 at 6:08 PM Masahiko Sawada > > wrote: > > > > > > Attached updated patches. > > > > > > > Thanks, Andres, others, do you see a better way to fix this problem? I > > h

Re: OpenSSL 3.0.0 vs old branches

2023-02-07 Thread Michael Paquier
On Tue, Feb 07, 2023 at 01:28:26PM -0500, Tom Lane wrote: > I double-checked this on Fedora 37 (openssl 3.0.5). v11 and v12 > do build --with-openssl. There are an annoyingly large number of > -Wdeprecated-declarations warnings, but those are there in v13 too. > I confirm that back-patching f0d2c

  1   2   >