Re: Inherited UPDATE/DELETE vs async execution

2021-05-12 Thread Amit Langote
On Wed, May 12, 2021 at 6:45 PM Etsuro Fujita wrote: > On Tue, May 11, 2021 at 9:53 PM Amit Langote wrote: > > Okay, so I take it that making these ForeignScan nodes (that only > > fetch the data) asynchronous doesn't interfere with update/delete > > subsequently being performed over presumably t

Re: parallel vacuum - few questions on docs, comments and code

2021-05-12 Thread Amit Kapila
On Wed, May 12, 2021 at 6:30 PM Bharath Rupireddy wrote: > > On Wed, May 12, 2021 at 9:48 AM Amit Kapila wrote: > > > > On Tue, May 11, 2021 at 6:31 PM Justin Pryzby wrote: > > > > > > On Tue, May 11, 2021 at 05:37:50PM +0530, Bharath Rupireddy wrote: > > > > 3) Should the Assert(nindexes > 0);

Re: parallel vacuum - few questions on docs, comments and code

2021-05-12 Thread Amit Kapila
On Wed, May 12, 2021 at 6:37 PM Bharath Rupireddy wrote: > > On Wed, May 12, 2021 at 11:10 AM Amit Kapila wrote: > > > > On Tue, May 11, 2021 at 5:38 PM Bharath Rupireddy > > wrote: > > > > > > I was going through the parallel vacuum docs and code. I found below > > > things, please someone clar

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-12 Thread Dilip Kumar
On Thu, May 13, 2021 at 2:26 AM Robert Haas wrote: > > On Wed, May 12, 2021 at 1:39 AM Dilip Kumar wrote: > > Your idea makes sense, but IMHO, if we are first writing > > XLogAcceptWrites() and then pushing out the barrier, then I don't > > understand the meaning of having state #4. I mean whene

Re: Replication slot stats misgivings

2021-05-12 Thread vignesh C
On Thu, May 13, 2021 at 11:21 AM Amit Kapila wrote: > > On Wed, May 12, 2021 at 4:02 PM Masahiko Sawada wrote: > > > > On Wed, May 12, 2021 at 1:19 PM vignesh C wrote: > > > > > > > I think the part of the test that tests the stats after resetting it > > > > might give different results. This ca

Re: Replication slot stats misgivings

2021-05-12 Thread Amit Kapila
On Wed, May 12, 2021 at 4:02 PM Masahiko Sawada wrote: > > On Wed, May 12, 2021 at 1:19 PM vignesh C wrote: > > > > > I think the part of the test that tests the stats after resetting it > > > might give different results. This can happen because in the previous > > > test we spill multiple times

Re: PG 14 release notes, first draft

2021-05-12 Thread Amit Langote
On Thu, May 13, 2021 at 2:39 AM Bruce Momjian wrote: > On Tue, May 11, 2021 at 11:57:10AM +0900, Amit Langote wrote: > > On Mon, May 10, 2021 at 11:40 PM Justin Pryzby wrote: > > > 86dc90056d Rework planning and execution of UPDATE and DELETE. > > > a1115fa078 Postpone some more stuff out of Exec

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Wed, May 12, 2021 at 10:31:01PM -0700, Maciek Sakrejda wrote: > On Wed, May 12, 2021 at 9:58 PM Julien Rouhaud wrote: > > Le jeu. 13 mai 2021 à 12:52, Maciek Sakrejda a écrit > > : > >> > >> For what it's worth, I don't think the actual changing of an extra > >> setting is that big a burden:

RE: Forget close an open relation in ReorderBufferProcessTXN()

2021-05-12 Thread osumi.takami...@fujitsu.com
On Thursday, April 29, 2021 2:31 PM Amit Kapila wrote: > I am not so sure about it because I think we don't have any example of > user_catalog_tables in the core code. This is the reason I was kind of looking > towards Andres to clarify this. Right now, if the user performs TRUNCATE on > user_cata

Re: alter subscription drop publication fixes

2021-05-12 Thread Dilip Kumar
On Thu, May 13, 2021 at 9:36 AM Bharath Rupireddy wrote: > > On Thu, May 13, 2021 at 8:45 AM Japin Li wrote: > > >> Dropping all the publications present in the subscription using alter > > >> subscription drop publication would throw "subscription must contain > > >> at least one publication". T

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Maciek Sakrejda
On Wed, May 12, 2021 at 9:58 PM Julien Rouhaud wrote: > Le jeu. 13 mai 2021 à 12:52, Maciek Sakrejda a écrit : >> >> For what it's worth, I don't think the actual changing of an extra >> setting is that big a burden: it's the figuring out that you need to >> change it, and how you should configur

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
Le jeu. 13 mai 2021 à 12:52, Maciek Sakrejda a écrit : > > For what it's worth, I don't think the actual changing of an extra > setting is that big a burden: it's the figuring out that you need to > change it, and how you should configure it, that is the problem. > Especially since all major sear

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Maciek Sakrejda
On Wed, May 12, 2021 at 9:03 PM Julien Rouhaud wrote: > > On Wed, May 12, 2021 at 11:33:32PM -0400, Bruce Momjian wrote: > > How do they know to set shared_preload_libraries then? We change the > > user API all the time, especially in GUCs, and even rename them, but for > > some reason we don't t

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
Le jeu. 13 mai 2021 à 12:26, Kyotaro Horiguchi a écrit : > At Thu, 13 May 2021 12:11:12 +0900 (JST), Kyotaro Horiguchi < > horikyota@gmail.com> wrote in > > As the result, even if we take the DLL approach, still not need to > > split out the query-id provider part. By the following config: >

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Thu, 13 May 2021 13:26:37 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 13 May 2021 12:11:12 +0900 (JST), Kyotaro Horiguchi > wrote in > > As the result, even if we take the DLL approach, still not need to > > split out the query-id provider part. By the following config: > > > > > qu

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Thu, 13 May 2021 12:11:12 +0900 (JST), Kyotaro Horiguchi wrote in > As the result, even if we take the DLL approach, still not need to > split out the query-id provider part. By the following config: > > > query_id_provider = 'pg_stat_statements' > > the core can obtain the entrypoint of, s

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
Le jeu. 13 mai 2021 à 12:18, Fujii Masao a écrit : > > I like leaving compute_query_id=auto instead of overwriting it to "on", > even when queryIsWanted() is called, as I told upthread. Then we can decide > that query id computation is necessary when compute_query_id=auto and > the special flag i

Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY

2021-05-12 Thread Amit Langote
On Fri, May 7, 2021 at 2:13 AM Álvaro Herrera wrote: > On 2021-Apr-30, Amit Langote wrote: > > > The case I was looking at is when a partition detach appears as > > in-progress to a serializable transaction. > > Yeah, I was exceedingly sloppy on my reasoning about this, and you're > right that tha

Re: Forget close an open relation in ReorderBufferProcessTXN()

2021-05-12 Thread Amit Langote
Takamichi-san, On Tue, Apr 27, 2021 at 9:37 PM osumi.takami...@fujitsu.com wrote: > On Tuesday, April 20, 2021 12:07 PM Amit Langote > wrote: > > On Sat, Apr 17, 2021 at 1:30 PM Amit Kapila > > wrote: > > > On Fri, Apr 16, 2021 at 11:24 PM Andres Freund > > > wrote:> > This made me take a bri

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Fujii Masao
On 2021/05/13 13:03, Julien Rouhaud wrote: On Wed, May 12, 2021 at 11:33:32PM -0400, Bruce Momjian wrote: On Thu, May 13, 2021 at 11:16:13AM +0800, Julien Rouhaud wrote: On Wed, May 12, 2021 at 11:06:52PM -0400, Bruce Momjian wrote: On Thu, May 13, 2021 at 09:57:00AM +0800, Julien Rouhaud w

Support for VACUUMing Foreign Tables

2021-05-12 Thread Bharath Rupireddy
Hi, I think it will be useful to allow foreign tables to be VACUUMed if the underlying FDW supports, currently VACUUM doesn't support foreign tables, see [1]. In case of postgres_fdw, if foreign tables are specified in the local VACUUM command, a per-server remote VACUUM command can be prepared wi

Re: alter subscription drop publication fixes

2021-05-12 Thread Bharath Rupireddy
On Thu, May 13, 2021 at 8:45 AM Japin Li wrote: > >> Dropping all the publications present in the subscription using alter > >> subscription drop publication would throw "subscription must contain > >> at least one publication". This message was slightly confusing to me. > >> As even though some p

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Wed, May 12, 2021 at 11:33:32PM -0400, Bruce Momjian wrote: > On Thu, May 13, 2021 at 11:16:13AM +0800, Julien Rouhaud wrote: > > On Wed, May 12, 2021 at 11:06:52PM -0400, Bruce Momjian wrote: > > > On Thu, May 13, 2021 at 09:57:00AM +0800, Julien Rouhaud wrote: > > > > > > > source? What if y

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Bruce Momjian
On Thu, May 13, 2021 at 11:16:13AM +0800, Julien Rouhaud wrote: > On Wed, May 12, 2021 at 11:06:52PM -0400, Bruce Momjian wrote: > > On Thu, May 13, 2021 at 09:57:00AM +0800, Julien Rouhaud wrote: > > > > > source? What if you have for instance pg_stat_statements, pg_stat_kcache, > > > pg_store_p

Re: PG 14 release notes, first draft

2021-05-12 Thread Bruce Momjian
On Wed, May 12, 2021 at 06:19:28PM -0400, Álvaro Herrera wrote: > > I am hesitant to merge them since they are different changes. > > Different? The commit IDs look pretty similar to me, not to say exactly > identical. > > Reading these, it's pretty unclear what password_encryption *is* in the >

Re: PG 14 release notes, first draft

2021-05-12 Thread Bruce Momjian
On Wed, May 12, 2021 at 06:06:31PM -0400, Álvaro Herrera wrote: > On 2021-May-12, Bruce Momjian wrote: > > > OK, I added it into the existing entry: > > > > > > > > > > > > Allow subscripting of jsonb (Dmitry Dolgov) > > > > > > > > Subscripting can be u

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Thu, May 13, 2021 at 12:11:12PM +0900, Kyotaro Horiguchi wrote: > At Thu, 13 May 2021 10:43:03 +0800, Julien Rouhaud wrote > in > > On Thu, May 13, 2021 at 11:26:29AM +0900, Kyotaro Horiguchi wrote: > > > > > > I believe any "real" > > > alternative query-id provider is supposed to be hooked

Re: alter subscription drop publication fixes

2021-05-12 Thread Japin Li
On Thu, 13 May 2021 at 00:45, Bharath Rupireddy wrote: > On Wed, May 12, 2021 at 9:55 PM vignesh C wrote: >> While I was reviewing one of the logical decoding features, I found a >> few issues in alter subscription drop publication. > > Thanks! > >> Alter subscription drop publication does not

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Wed, May 12, 2021 at 11:06:52PM -0400, Bruce Momjian wrote: > On Thu, May 13, 2021 at 09:57:00AM +0800, Julien Rouhaud wrote: > > > source? What if you have for instance pg_stat_statements, pg_stat_kcache, > > pg_store_plans and pg_wait_sampling installed? All those extensions need a > > quer

Re: PG 14 release notes, first draft

2021-05-12 Thread Bruce Momjian
On Mon, May 10, 2021 at 02:42:08PM -0400, John Naylor wrote: > Hi Bruce, > > Thanks for doing this work again! > > > Add date_bin function (John Naylor) > > > > WHAT DOES THIS DO? > > Hard to describe in a one-liner, but it lines up timestamps into regular > intervals as specified by the user. I

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Thu, 13 May 2021 10:43:03 +0800, Julien Rouhaud wrote in > On Thu, May 13, 2021 at 11:26:29AM +0900, Kyotaro Horiguchi wrote: > > > > I believe any "real" > > alternative query-id provider is supposed to be hooked "before" > > pg_stat_statements. (It is a kind of magic to control the order o

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Bruce Momjian
On Thu, May 13, 2021 at 09:57:00AM +0800, Julien Rouhaud wrote: > On Wed, May 12, 2021 at 09:13:25PM -0400, Bruce Momjian wrote: > > On Thu, May 13, 2021 at 08:52:36AM +0800, Julien Rouhaud wrote: > > > > > > Well, as implemented you can get the value of compute_query_id, and if > > > it's > > >

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Thu, May 13, 2021 at 11:49:34AM +0900, Kyotaro Horiguchi wrote: > At Thu, 13 May 2021 10:39:20 +0800, Julien Rouhaud wrote > in > > On Thu, May 13, 2021 at 11:30:56AM +0900, Kyotaro Horiguchi wrote: > > > At Thu, 13 May 2021 11:26:29 +0900 (JST), Kyotaro Horiguchi > > > wrote in > > > > At

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Thu, 13 May 2021 10:39:20 +0800, Julien Rouhaud wrote in > On Thu, May 13, 2021 at 11:30:56AM +0900, Kyotaro Horiguchi wrote: > > At Thu, 13 May 2021 11:26:29 +0900 (JST), Kyotaro Horiguchi > > wrote in > > > At Thu, 13 May 2021 10:02:45 +0800, Julien Rouhaud > > > wrote in > > > Yes, I

Re: Performance degradation of REFRESH MATERIALIZED VIEW

2021-05-12 Thread Peter Geoghegan
On Tue, May 11, 2021 at 11:46 AM Andrew Dunstan wrote: > > Yes, reverting has its place. Moreover, threats of reversion have their > > place. People should definitely be working towards finding solutions to > > the problems in their commits lest they be reverted. However, freezing > > *people*

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Thu, May 13, 2021 at 11:26:29AM +0900, Kyotaro Horiguchi wrote: > > I believe any "real" > alternative query-id provider is supposed to be hooked "before" > pg_stat_statements. (It is a kind of magic to control the order of > plugins, though.. Indeed, you have to configure shared_preload_libra

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Thu, May 13, 2021 at 11:30:56AM +0900, Kyotaro Horiguchi wrote: > At Thu, 13 May 2021 11:26:29 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Thu, 13 May 2021 10:02:45 +0800, Julien Rouhaud > > wrote in > > > On Thu, May 13, 2021 at 10:51:52AM +0900, Kyotaro Horiguchi wrote: > > > > At T

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Thu, 13 May 2021 11:26:29 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 13 May 2021 10:02:45 +0800, Julien Rouhaud wrote > in > > On Thu, May 13, 2021 at 10:51:52AM +0900, Kyotaro Horiguchi wrote: > > > At Thu, 13 May 2021 09:59:43 +0900 (JST), Kyotaro Horiguchi > > > wrote in > > >

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Thu, 13 May 2021 10:02:45 +0800, Julien Rouhaud wrote in > On Thu, May 13, 2021 at 10:51:52AM +0900, Kyotaro Horiguchi wrote: > > At Thu, 13 May 2021 09:59:43 +0900 (JST), Kyotaro Horiguchi > > wrote in > > > How about adding a GUC_INTERNAL "current_query_provider" or such? > > > > On the

Re: Performance degradation of REFRESH MATERIALIZED VIEW

2021-05-12 Thread Andres Freund
Hi, On 2021-05-13 11:12:43 +0900, Michael Paquier wrote: > If that's the consensus reached, that's fine by me as long as we don't > keep a 25% performance regression. Now, looking at the patch > proposed, I have to admit that this looks like some redesign of an > existing feature, so that stresse

Re: Always bump PG_CONTROL_VERSION?

2021-05-12 Thread Julien Rouhaud
On Thu, May 13, 2021 at 11:04:54AM +0900, Michael Paquier wrote: > On Wed, May 12, 2021 at 01:30:27PM -0700, Andres Freund wrote: > > That said, I don't think it's a good practice to use the control file > > version as an identifier for the major version. Who knows, it might be > > necessary to add

Re: Performance degradation of REFRESH MATERIALIZED VIEW

2021-05-12 Thread Michael Paquier
On Tue, May 11, 2021 at 02:46:35PM -0400, Andrew Dunstan wrote: > On 5/11/21 2:23 PM, Alvaro Herrera wrote: >> Yes, reverting has its place. Moreover, threats of reversion have their >> place. People should definitely be working towards finding solutions to >> the problems in their commits lest t

Re: Always bump PG_CONTROL_VERSION?

2021-05-12 Thread Michael Paquier
On Wed, May 12, 2021 at 01:30:27PM -0700, Andres Freund wrote: > That said, I don't think it's a good practice to use the control file > version as an identifier for the major version. Who knows, it might be > necessary to add an optional new format in a minor version at some point > or such crazyn

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Thu, May 13, 2021 at 10:51:52AM +0900, Kyotaro Horiguchi wrote: > At Thu, 13 May 2021 09:59:43 +0900 (JST), Kyotaro Horiguchi > wrote in > > How about adding a GUC_INTERNAL "current_query_provider" or such? > > On the second thought, I wonder why we don't just call JumbleQuery in > pgss_post

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-12 Thread Michael Paquier
On Tue, May 11, 2021 at 10:48:16AM +, tanghy.f...@fujitsu.com wrote: > Thanks for your kindly explanation. That's really nice of you. > Understand now. Thanks for the updated patch. Applied as of 1906cc0. -- Michael signature.asc Description: PGP signature

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Wed, May 12, 2021 at 09:13:25PM -0400, Bruce Momjian wrote: > On Thu, May 13, 2021 at 08:52:36AM +0800, Julien Rouhaud wrote: > > > > Well, as implemented you can get the value of compute_query_id, and if it's > > still "auto" then it's not enabled as calling queryIdWanted() would turn it > >

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Thu, 13 May 2021 09:59:43 +0900 (JST), Kyotaro Horiguchi wrote in > How about adding a GUC_INTERNAL "current_query_provider" or such? On the second thought, I wonder why we don't just call JumbleQuery in pgss_post_parse_analyze when compute_query_id is "off". We can think this behavior as t

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Thu, May 13, 2021 at 09:59:43AM +0900, Kyotaro Horiguchi wrote: > > The query_id of its own is provided because pg_stat_statements did not > expose query_id. And it has been preserved only for the case the > plugin is used without pg_stat_statements activated. Now that the > in-core query_id i

RE: Parallel scan with SubTransGetTopmostTransaction assert coredump

2021-05-12 Thread Pengchengliu
Hi Andres, Thanks for you replay. And If you still cannot reproduce it in 2 minitus. Could you run pgbench longer time, such as 30 or 60 minutes. This coredump, It should be from parallel scan only. For normal scan(without parallel), SubTransGetTopmostTransaction assert(HeapTuple

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Bruce Momjian
On Thu, May 13, 2021 at 08:52:36AM +0800, Julien Rouhaud wrote: > On Wed, May 12, 2021 at 08:36:18PM -0400, Bruce Momjian wrote: > > The problem with compute_query_id=auto is that there is no way to know > > if the query id is actually enabled, unless you guess from the installed > > extensions, or

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Wed, 12 May 2021 20:36:18 -0400, Bruce Momjian wrote in > On Wed, May 12, 2021 at 05:51:49PM +0800, Julien Rouhaud wrote: > > On Wed, May 12, 2021 at 11:42:12AM +0200, Pavel Stehule wrote: > > > this check just can check if there is "any" query-id provider. In this > > > context is not importa

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Kyotaro Horiguchi
At Wed, 12 May 2021 18:09:30 +0800, Julien Rouhaud wrote in > On Wed, May 12, 2021 at 06:37:24PM +0900, Kyotaro Horiguchi wrote: > > At Wed, 12 May 2021 14:05:16 +0800, Julien Rouhaud > > wrote in > > > > > > And if I'm not mistaken, pg_store_plans also wants a different queryid > > > implem

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Wed, May 12, 2021 at 08:36:18PM -0400, Bruce Momjian wrote: > On Wed, May 12, 2021 at 05:51:49PM +0800, Julien Rouhaud wrote: > > On Wed, May 12, 2021 at 11:42:12AM +0200, Pavel Stehule wrote: > > > this check just can check if there is "any" query-id provider. In this > > > context is not impor

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Bruce Momjian
On Wed, May 12, 2021 at 05:51:49PM +0800, Julien Rouhaud wrote: > On Wed, May 12, 2021 at 11:42:12AM +0200, Pavel Stehule wrote: > > this check just can check if there is "any" query-id provider. In this > > context is not important if it is buildin or external > > Yes, the idea is that if you exe

Re: Corrected documentation of data type for the logical replication message formats.

2021-05-12 Thread Peter Smith
On Wed, May 12, 2021 at 11:09 PM vignesh C wrote: ... > > Thanks for the comments. Attached v4 patch has the fix for the same. > I have not tried this patch so I cannot confirm whether it applies or renders OK, but just going by the v4 content this now LGTM. Kind Regards, Peter Smith. F

Re: compute_query_id and pg_stat_statements

2021-05-12 Thread Julien Rouhaud
On Wed, May 12, 2021 at 05:30:26PM +0800, Julien Rouhaud wrote: > On Wed, May 12, 2021 at 10:57:25AM +0200, Pavel Stehule wrote: > > > > My second proposal can work for your example too. pg_stat_statements have > > to require any active queryid computing. And when it is not available, then > > the

Re: wal stats questions

2021-05-12 Thread Masahiro Ikeda
On 2021/05/12 19:19, Fujii Masao wrote: > > > On 2021/05/11 18:46, Masahiro Ikeda wrote: >> >> >> On 2021/05/11 16:44, Fujii Masao wrote: >>> >>> >>> On 2021/04/28 9:10, Masahiro Ikeda wrote: On 2021/04/27 21:56, Fujii Masao wrote: > > > On 2021/04/26 10:11, Masahiro

Re: Enhanced error message to include hint messages for redundant options error

2021-05-12 Thread Alvaro Herrera
You can avoid duplicating the ereport like this: + ereport(ERROR, + (errcode(ERRCODE_SYNTAX_ERROR), +errmsg("option \"%s\" specified more than once", defel->defname), +parser ? parser_errpo

Re: AlterSubscription_refresh "wrconn" wrong variable?

2021-05-12 Thread Alvaro Herrera
On 2021-May-10, Peter Smith wrote: > PSA v5 of the patch. It is the same as v4 but with the v4-0001 part > omitted because that was already pushed. Thanks, I have pushed this. -- Álvaro Herrera39°49'30"S 73°17'W

Re: Replacing pg_depend PIN entries with a fixed range check

2021-05-12 Thread Tom Lane
I wrote: > In view of the discussion at [1], there's more pressure on the OID supply > above 10K than I'd realized. While I don't have any good ideas about > eliminating the problem altogether, I did have a thought that would remove > the extra buffer zone created by my first-draft patch in this t

Re: PG 14 release notes, first draft

2021-05-12 Thread Alvaro Herrera
On 2021-May-10, Bruce Momjian wrote: > I reworeded it to: > > > > > > Limit the ways password_encryption can enable md5 hashing (Peter > Eisentraut) > > > > Previously on/true/yes/1 values enabled md5. Now, only the string md5 > does

Re: PG 14 release notes, first draft

2021-05-12 Thread Alvaro Herrera
On 2021-May-12, Bruce Momjian wrote: > OK, I added it into the existing entry: > > > > > > Allow subscripting of jsonb (Dmitry Dolgov) > > > > Subscripting can be used to extract from and assign to jsonb documents. > Subscripting

Re: Do we need to rethink how to parallelize regression tests to speedup CLOBBER_CACHE_ALWAYS?

2021-05-12 Thread David Rowley
On Thu, 13 May 2021 at 01:50, Tom Lane wrote: > There are a whole lot of cases where test Y depends on an earlier test X. > Some of those dependencies are annotated in parallel_schedule, but I fear > most are not. > > If we had a full list of such dependencies then we could imagine building > a jo

Re: SearchCatCacheList()/SearchSysCacheList() is O(n)

2021-05-12 Thread Tom Lane
Andres Freund writes: > It's not an individual "result" list that's the issue. In my example > they're all exactly one element long. The problem is that CatCache->list > has one element for each cached SearchCatCacheList() result, and that > for every SearchCatCacheList() we linearly search throug

Re: SearchCatCacheList()/SearchSysCacheList() is O(n)

2021-05-12 Thread Andres Freund
Hi, On 2021-05-12 17:26:28 -0400, Tom Lane wrote: > Andres Freund writes: > > The problem is that SearchCatCacheList() is not actually a hash table - > > there are no buckets, in contrast to SearchCatCacheList(). > > Uh, what did you mean to compare to there? Oops, copy-and-paste failure. I was

Re: SearchCatCacheList()/SearchSysCacheList() is O(n)

2021-05-12 Thread Tom Lane
Andres Freund writes: > The problem is that SearchCatCacheList() is not actually a hash table - > there are no buckets, in contrast to SearchCatCacheList(). Uh, what did you mean to compare to there? > Tom, any chance you remember if this was an oversight, or whether you > just considered this t

SearchCatCacheList()/SearchSysCacheList() is O(n)

2021-05-12 Thread Andres Freund
Hi, When working on the shared memory stats patch I needed to manufacture having a lot of stats entries. It seemed cheaper to create functions than relations, for fairly obvious reasons. That required calling the functions too get those entries. My first attempt ran into the following issue: --

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-12 Thread Robert Haas
On Wed, May 12, 2021 at 1:39 AM Dilip Kumar wrote: > Your idea makes sense, but IMHO, if we are first writing > XLogAcceptWrites() and then pushing out the barrier, then I don't > understand the meaning of having state #4. I mean whenever any > backend receives the barrier the system will always

Re: Always bump PG_CONTROL_VERSION?

2021-05-12 Thread David Steele
On 5/12/21 4:18 PM, Tom Lane wrote: David Steele writes: On 5/12/21 3:21 PM, Alvaro Herrera wrote: Why don't you use the PG_VERSION file in the datadir? Mostly because there is other data we need in pg_control and it is simpler to read one file than two. I'm disinclined to change the long

Re: Always bump PG_CONTROL_VERSION?

2021-05-12 Thread Andres Freund
Hi, On 2021-05-12 16:18:16 -0400, Tom Lane wrote: > Even if we did change the rule going forward, you'd still need to > do it properly for existing releases, so I don't see that you're > going to save anything. It turns out that the last time a major version didn't have a unique control file vers

Re: Always bump PG_CONTROL_VERSION?

2021-05-12 Thread Tom Lane
David Steele writes: > On 5/12/21 3:21 PM, Alvaro Herrera wrote: >> Why don't you use the PG_VERSION file in the datadir? > Mostly because there is other data we need in pg_control and it is > simpler to read one file than two. I'm disinclined to change the longstanding rule in this area for a

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2021-05-12 Thread Michail Nikolaev
Hello, Antonin. > My review that started in [1] continues here. Thanks a lot for the review. > (Please note that code.patch does not apply to the current master branch.) Rebased. > Especially for the problem discussed in [1] it should be > explained what would happen if kill_prior_tuple_min_lsn

Re: Always bump PG_CONTROL_VERSION?

2021-05-12 Thread David Steele
On 5/12/21 3:21 PM, Alvaro Herrera wrote: On 2021-May-12, David Steele wrote: pgBackRest uses PG_CONTROL_VERSION to identify the version of PostgreSQL when it is not running. If PG_CONTROL_VERSION does not change from a prior version then we also use CATALOG_VERSION_NO to uniquely identify the

Re: Granting control of SUSET gucs to non-superusers

2021-05-12 Thread Robert Haas
On Wed, May 12, 2021 at 11:59 AM Mark Dilger wrote: > I didn't bother updating the docs yet, as I doubt the set of privileges/roles > in this patch will survive contact with this list. They are: > > [ various things ] Interesting classification. I think the trick here is going to be to figure o

Re: PG 14 release notes, first draft

2021-05-12 Thread Bruce Momjian
On Tue, May 11, 2021 at 05:47:27PM -0400, Álvaro Herrera wrote: > On 2021-May-11, Bruce Momjian wrote: > > > > 86dc90056d Rework planning and execution of UPDATE and DELETE. > > > a1115fa078 Postpone some more stuff out of ExecInitModifyTable. > > > c5b7ba4e67 Postpone some stuff out of ExecInitMo

Re: Always bump PG_CONTROL_VERSION?

2021-05-12 Thread Andres Freund
Hi, On 2021-05-12 14:58:11 -0400, David Steele wrote: > pgBackRest uses PG_CONTROL_VERSION to identify the version of PostgreSQL > when it is not running. If PG_CONTROL_VERSION does not change from a prior > version then we also use CATALOG_VERSION_NO to uniquely identify the > version. Why aren'

Re: Always bump PG_CONTROL_VERSION?

2021-05-12 Thread Alvaro Herrera
On 2021-May-12, David Steele wrote: > pgBackRest uses PG_CONTROL_VERSION to identify the version of PostgreSQL > when it is not running. If PG_CONTROL_VERSION does not change from a prior > version then we also use CATALOG_VERSION_NO to uniquely identify the > version. Why don't you use the PG_VE

Always bump PG_CONTROL_VERSION?

2021-05-12 Thread David Steele
Hackers, I would like to propose bumping PG_CONTROL_VERSION with each release even if there are no changes to the ControlFileData struct. Historically PG_CONTROL_VERSION has only been bumped when there were changes to ControlFileData. pgBackRest uses PG_CONTROL_VERSION to identify the versio

Re: seawasp failing, maybe in glibc allocator

2021-05-12 Thread Fabien COELHO
Possibly I have just added "ulimit -c unlimited" in the script, we should see the effect on next round. for def5b065 it ended on on the contrib ltree test: 2021-05-12 20:12:52.528 CEST [3042602:410] pg_regress/ltree LOG: disconnection: session time: 0:00:13.426 user=buildfarm database=co

Re: Some other CLOBBER_CACHE_ALWAYS culprits

2021-05-12 Thread Andres Freund
Hi, On 2021-05-11 19:02:00 -0700, Andres Freund wrote: > I don't think we'd loose a lot of practical coverage if we avoided > rebuilding non-accessed relcache entries eagerly during cache > lookups. What coverage do we e.g. gain by having a single > SearchCatCacheMiss() triggering rebuilding the r

Re: PG 14 release notes, first draft

2021-05-12 Thread Bruce Momjian
On Tue, May 11, 2021 at 11:57:10AM +0900, Amit Langote wrote: > On Mon, May 10, 2021 at 11:40 PM Justin Pryzby wrote: > > 86dc90056d Rework planning and execution of UPDATE and DELETE. > > a1115fa078 Postpone some more stuff out of ExecInitModifyTable. > > c5b7ba4e67 Postpone some stuff out of Exe

Re: PG 14 release notes, first draft

2021-05-12 Thread Bruce Momjian
On Wed, May 12, 2021 at 10:06:05AM -0500, Justin Pryzby wrote: > On Tue, May 11, 2021 at 10:45:04PM -0400, Bruce Momjian wrote: > > OK, so this is where I am confused. I searched for distinguished name > > (DN) and came up with DN being a concatentation of all the fields > > provided to the certif

naming of async_mode parameter

2021-05-12 Thread Zhihong Yu
Hi, Etsuro-san: I was looking at Fix EXPLAIN ANALYZE for async-capable nodes. which adds the following parameter / field: + boolasync_mode; /* true if node is in async mode */ async_mode implies an enum: {sync, async} Since there are only two values, the data type is bool. I thin

Re: PG 14 release notes, first draft

2021-05-12 Thread Bruce Momjian
On Wed, May 12, 2021 at 09:18:27AM +0530, Amit Kapila wrote: > On Wed, May 12, 2021 at 2:36 AM Bruce Momjian wrote: > > > > > > OK, I added this: > > > > > > > > > > > > Allow logical decoding to more efficently process cache > > invalidation messages > >

Re: PG 14 release notes, first draft

2021-05-12 Thread Bruce Momjian
On Wed, May 12, 2021 at 09:15:55AM +0530, Amit Kapila wrote: > On Tue, May 11, 2021 at 6:43 PM Jonathan S. Katz wrote: > > I was going to post a question about the above bullet point(s), so this > > clarification helps -- thanks! > > > > Two comments on the above: > > > > 1. I do believe ther eis

Re: alter subscription drop publication fixes

2021-05-12 Thread Bharath Rupireddy
On Wed, May 12, 2021 at 9:55 PM vignesh C wrote: > While I was reviewing one of the logical decoding features, I found a > few issues in alter subscription drop publication. Thanks! > Alter subscription drop publication does not support copy_data option, > that needs to be removed from tab compl

Re: Transactions involving multiple postgres foreign servers, take 2

2021-05-12 Thread Zhihong Yu
On Mon, May 10, 2021 at 9:38 PM Masahiko Sawada wrote: > On Mon, May 3, 2021 at 11:11 PM Zhihong Yu wrote: > > > > > > > > On Mon, May 3, 2021 at 5:25 AM Masahiko Sawada > wrote: > >> > >> On Sun, May 2, 2021 at 1:23 AM Zhihong Yu wrote: > >> > > >> > > >> > > >> > On Fri, Apr 30, 2021 at 9:09

alter subscription drop publication fixes

2021-05-12 Thread vignesh C
Hi, While I was reviewing one of the logical decoding features, I found a few issues in alter subscription drop publication. Alter subscription drop publication does not support copy_data option, that needs to be removed from tab completion. Dropping all the publications present in the subscript

Re: RFC: Logging plan of the running query

2021-05-12 Thread Laurenz Albe
On Wed, 2021-05-12 at 18:03 +0530, Bharath Rupireddy wrote: > On Wed, May 12, 2021 at 4:54 PM torikoshia wrote: > > During the discussion about memory contexts dumping[1], there > > was a comment that exposing not only memory contexts but also > > query plans and untruncated query string would be

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2021-05-12 Thread Tom Lane
Dmitry Astapov writes: > I am trying to understand the behaviour of the query planner regarding the > push-down of the conditions "through" the join. I think your mental model is wrong. What's actually happening here is that the planner uses equivalence classes to deduce implied conditions. That

Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2021-05-12 Thread Dmitry Astapov
Hi! I am trying to understand the behaviour of the query planner regarding the push-down of the conditions "through" the join. Lets say that I have tables a(adate date, aval text) and b(bdate date, bval text), and I create a view: create view v as select a.adate, a.aval, b.bval from a join b o

Re: Extending amcheck to check toast size and compression

2021-05-12 Thread Aleksander Alekseev
Hi hackers, > make installcheck-world: tested, failed > Implements feature: tested, failed > Spec compliant: tested, failed > Documentation:tested, failed Very sorry about these "failed" checkboxes. Didn't use the commitfest webapp for a while. The patch is fine. > T

Re: Extending amcheck to check toast size and compression

2021-05-12 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, failed Spec compliant: tested, failed Documentation:tested, failed This patch looks good to me. Considering a positive response

Re: Query regarding RANGE Partitioning

2021-05-12 Thread Nitin Jadhav
Hi Amit, > Thanks Jeevan, that's right. > Another way to look at this: the partition key (100, 0) would be > insertable into r3, because the key satisfies its proposed exclusive > upper bound (< (100, 200)). The same key is also insertable into r1, > because it satisfies the latter's inclusive u

Re: PG 14 release notes, first draft

2021-05-12 Thread Justin Pryzby
On Tue, May 11, 2021 at 10:45:04PM -0400, Bruce Momjian wrote: > On Tue, May 11, 2021 at 05:13:21PM -0500, Justin Pryzby wrote: > > On Tue, May 11, 2021 at 10:35:23AM -0400, Bruce Momjian wrote: > > > > | Allow more than the common name (CN) to be matched for client > > > > certificate authenticat

Re: OOM in spgist insert

2021-05-12 Thread Dilip Kumar
On Wed, May 12, 2021 at 5:35 PM Pavel Borisov wrote: >> >> INCLUDEd -> why you have used a mixed case here? > > It is current practice to call INCLUDE columns in capital, you can find many > places in the current code. But case mixture can be avoided indeed )) > PFA v4 Okay, that makes sense.

Re: RFC: Logging plan of the running query

2021-05-12 Thread Julien Rouhaud
On Wed, May 12, 2021 at 08:24:04PM +0900, torikoshia wrote: > Hi, > > During the discussion about memory contexts dumping[1], there > was a comment that exposing not only memory contexts but also > query plans and untruncated query string would be useful. > > I also feel that it would be nice whe

Re: Do we need to rethink how to parallelize regression tests to speedup CLOBBER_CACHE_ALWAYS?

2021-05-12 Thread Tom Lane
David Rowley writes: > Right now we start 1 backend for each test in a parallel group then > wait for the final backend to complete before running the next group. > Is a particular reason for it to work that way? There are a whole lot of cases where test Y depends on an earlier test X. Some of t

Re: Feedback on table expansion hook (including patch)

2021-05-12 Thread Amit Langote
(Sorry about being very late to this thread.) On Sun, Mar 7, 2021 at 3:09 AM Tom Lane wrote: > Peter Eisentraut writes: > > On 07.05.20 10:11, Erik Nordström wrote: > >> I am looking for feedback on the possibility of adding a table expansion > >> hook to PostgreSQL (see attached patch). > > > U

Re: Corrected documentation of data type for the logical replication message formats.

2021-05-12 Thread vignesh C
On Wed, May 12, 2021 at 3:36 AM Peter Smith wrote: > > On Wed, May 12, 2021 at 1:02 AM vignesh C wrote: > > > > Thanks for the comments, Attached v3 patch has the changes as suggested. > > This v3 mostly looks good to me now except for some minor comments > about the flags. > > ~~~ > > 1. Commit

  1   2   >