Re: make MaxBackends available in _PG_init

2022-04-11 Thread Julien Rouhaud
Hi, On Mon, Apr 11, 2022 at 02:14:35PM -0700, Nathan Bossart wrote: > On Mon, Apr 11, 2022 at 01:44:42PM -0700, Nathan Bossart wrote: > > On Mon, Apr 11, 2022 at 04:36:36PM -0400, Robert Haas wrote: > >> If we throw an error while defining_custom_guc is true, how will it > >> ever again become

Re: make MaxBackends available in _PG_init

2022-04-11 Thread Julien Rouhaud
Hi, On Mon, Apr 11, 2022 at 10:47:17AM -0400, Robert Haas wrote: > On Sat, Apr 9, 2022 at 9:24 AM Julien Rouhaud wrote: > > > On the bright side, I see that citus is using SetConfigOption() to increase > > max_prepared_transactions [1]. That's the only extension mentioned

Re: Schema variables - new implementation for Postgres 15+1

2022-04-11 Thread Julien Rouhaud
Hi, On Sun, Apr 10, 2022 at 03:43:33PM -0500, Justin Pryzby wrote: > On Sun, Apr 10, 2022 at 08:30:39PM +0200, Pavel Stehule wrote: > > I am sending fresh rebased patch + separation to more patches. This split > > is initial, and can be changed later > > The 0001 patch requires this, but it's

Re: Outdated copyright year in parse_jsontable.c

2022-04-11 Thread Julien Rouhaud
On Mon, Apr 11, 2022 at 03:58:01PM +0900, Michael Paquier wrote: > On Mon, Apr 11, 2022 at 02:08:38PM +0800, Julien Rouhaud wrote: > > I just noticed that parse_jsontable.c was added with a wrong copyright year, > > trivial patch attached. > > Thanks, I'll go fix that in

Outdated copyright year in parse_jsontable.c

2022-04-11 Thread Julien Rouhaud
rom ffd6809ee725f186784fd141473c833b22a89a32 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Mon, 11 Apr 2022 14:01:59 +0800 Subject: [PATCH] Fix copyright year in parse_jsontable.c Oversight in 4e34747c88a. --- src/backend/parser/parse_jsontable.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

Re: Add parameter jit_warn_above_fraction

2022-04-09 Thread Julien Rouhaud
On Sat, Apr 09, 2022 at 12:31:23PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > On Sat, Apr 09, 2022 at 10:42:12AM -0400, Tom Lane wrote: > >> Also, good luck with "looking in the logs", because by default > >> WARNING-level messages don't go to the pos

Re: How about a psql backslash command to show GUCs?

2022-04-09 Thread Julien Rouhaud
On Sat, Apr 09, 2022 at 10:31:17AM -0400, Tom Lane wrote: > Christoph Berg writes: > > > I would think that if \dconfig showed the non-default settings only, > > it would be much more useful; the full list would still be available > > with "\dconfig *". This is in line with \dt only showing

Re: Add parameter jit_warn_above_fraction

2022-04-09 Thread Julien Rouhaud
On Sat, Apr 09, 2022 at 10:42:12AM -0400, Tom Lane wrote: > > Also, good luck with "looking in the logs", because by default > WARNING-level messages don't go to the postmaster log. If that's > the intended use-case then the message ought to appear at LOG > level (which'd also change the

Re: make MaxBackends available in _PG_init

2022-04-09 Thread Julien Rouhaud
On Wed, Mar 30, 2022 at 09:30:51AM -0700, Nathan Bossart wrote: > On Tue, Mar 29, 2022 at 12:22:21PM -0400, Robert Haas wrote: > > It's not, though, because the original proposal was to change things > > around so that the value of MaxBackends would have been reliable in > > _PG_init(). If we'd

Re: How to simulate sync/async standbys being closer/farther (network distance) to primary in core postgres?

2022-04-09 Thread Julien Rouhaud
On Sat, Apr 09, 2022 at 02:38:50PM +0530, Bharath Rupireddy wrote: > On Fri, Apr 8, 2022 at 10:22 PM SATYANARAYANA NARLAPURAM > wrote: > > > >> > wrote: > >> > > > >> > > Hi, > >> > > > >> > > I'm thinking if there's a way in core postgres to achieve $subject. In > >> > > reality, the sync/async

Re: Add parameter jit_warn_above_fraction

2022-04-08 Thread Julien Rouhaud
Hi, On Fri, Apr 08, 2022 at 09:39:18AM -0400, Stephen Frost wrote: > > * Magnus Hagander (mag...@hagander.net) wrote: > > The addition to pg_stat_statements I pushed a short while ago would help > > with that. But I think having a warning like this would also be useful. As > > a stop-gap measure,

Re: Expose JIT counters/timing in pg_stat_statements

2022-04-08 Thread Julien Rouhaud
Hi, On Sat, Apr 09, 2022 at 01:51:21AM +, Shinoda, Noriyoshi (PN Japan FSIP) wrote: > Hi, > thank you for the great features. > > The attached small patch changes the data type in the document. > The following columns are actually double precision but bigint in the docs. >

Re: Commitfest Closed

2022-04-08 Thread Julien Rouhaud
On Fri, Apr 08, 2022 at 08:09:16AM -0700, Peter Geoghegan wrote: > On Fri, Apr 8, 2022 at 5:58 AM Alvaro Herrera wrote: > > Thanks for herding through the CF! > > +1 +1!

Re: Mark all GUC variable as PGDLLIMPORT

2022-04-08 Thread Julien Rouhaud
On Fri, Apr 08, 2022 at 03:04:18PM +0200, Magnus Hagander wrote: > On Fri, Apr 8, 2022 at 2:42 PM Robert Haas wrote: > > > On Wed, Apr 6, 2022 at 7:56 PM Michael Paquier > > wrote: > > > On Wed, Apr 06, 2022 at 12:57:29AM +0700, John Naylor wrote: > > > > For these two patches, I'd say a day or

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-07 Thread Julien Rouhaud
On Thu, Apr 07, 2022 at 04:24:54PM +0900, Michael Paquier wrote: > On Thu, Apr 07, 2022 at 03:14:01PM +0800, Julien Rouhaud wrote: > > Sure, but gettimeofday() has been implemented in vDSO for quite some time on > > most platforms, so it shouldn't hurt that much on mains

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-07 Thread Julien Rouhaud
On Thu, Apr 07, 2022 at 03:58:46PM +0900, Michael Paquier wrote: > On Tue, Apr 05, 2022 at 11:57:14AM +0800, Julien Rouhaud wrote: > > This is a minor detail and the rest of the patch looks good to me, so I'm > > marking the patch as Ready for Committer! > &g

Re: Last day of commitfest

2022-04-06 Thread Julien Rouhaud
If you're an author of these and you're still looking > for feedback then I would suggest sending an email describing the > feedback you're looking for and moving it forward to the next CF > yourself before I mark them Returned with Feedback tomorrow. > > * Single item cache for Subtran

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-04 Thread Julien Rouhaud
On Tue, Apr 05, 2022 at 10:40:04AM +0900, Masahiko Sawada wrote: > On Tue, Apr 5, 2022 at 1:31 AM Julien Rouhaud wrote: > > > > Yes. In normal circumstances it shouldn't need a lot of time to do that, > > but > > I'm not so sure with e.g. network filesystems.

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-04 Thread Julien Rouhaud
On Tue, Apr 05, 2022 at 12:51:12AM +0900, Masahiko Sawada wrote: > On Mon, Apr 4, 2022 at 1:30 PM Julien Rouhaud wrote: > > > > Hmm, but AFAICS the json format would be stable as the counters are always > > shown even if zero. So just doing the json format first and the

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-04 Thread Julien Rouhaud
Hi, On Mon, Apr 04, 2022 at 09:59:04AM +0300, Andrei Zubkov wrote: > > Minor rephrasing: > > > > s/evicted and returned back/evicted and stored again/? > > s/with except of all/with the exception of all/ > > s/is now returns/now returns/ > > Agreed, commit message updated. > > > - code: > > > >

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2022-04-03 Thread Julien Rouhaud
Hi, On Tue, Mar 01, 2022 at 11:35:32AM +0900, Masahiko Sawada wrote: > On Wed, Jan 19, 2022 at 5:52 PM Julien Rouhaud wrote: > > > > It seems that the regression tests aren't entirely stable, per cfbot: > > https://cirrus-ci.com/github/postgresql-cfbot/postgres

Re: WIP: WAL prefetch (another approach)

2022-04-03 Thread Julien Rouhaud
On Thu, Mar 31, 2022 at 10:49:32PM +1300, Thomas Munro wrote: > On Mon, Mar 21, 2022 at 9:29 PM Julien Rouhaud wrote: > > So I finally finished looking at this patch. Here again, AFAICS the > > feature is > > working as expected and I didn't find any problem. I

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-03 Thread Julien Rouhaud
Hi, On Sun, Apr 03, 2022 at 01:24:40PM +0300, Andrei Zubkov wrote: > > On Sun, 2022-04-03 at 17:56 +0800, Julien Rouhaud wrote: > > Just another minor nitpicking after a quick look: > > > > + This field will be zero if ... > > [...] > > + this field wi

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-03 Thread Julien Rouhaud
Hi, On Sun, Apr 03, 2022 at 12:29:43PM +0300, Andrei Zubkov wrote: > I've attached v12 of a patch. The only unsolved issue now is the > following: > > On Sun, 2022-04-03 at 15:07 +0800, Julien Rouhaud wrote: > > +ALTER EXTENSION pg_stat_statements UPDATE TO '1.9'; > >

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-03 Thread Julien Rouhaud
On Sun, Apr 03, 2022 at 07:32:47AM +0300, Andrei Zubkov wrote: > v11 attached + /* When requested reset only min/max statistics of an entry */ \ + entry_counters = >counters; \ + for (int kind = 0; kind < PGSS_NUMKIND; kind++) \ + { \ +

Re: [PATCH] Add extra statistics to explain for Nested Loop

2022-04-02 Thread Julien Rouhaud
Hi, On Fri, Apr 01, 2022 at 11:46:47PM +0300, Ekaterina Sokolova wrote: > > > Most of the comments I have are easy to fix. But I think that the real > > problem > > is the significant overhead shown by Ekaterina that for now would apply > > even if > > you don't consume the new stats, for

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-02 Thread Julien Rouhaud
hat-great code, but there are other places relying on macros when a plain function call isn't that convenient (like here returning 0 or 1 as a hack for incrementing num_remove), for instance in hba.c. > On Sat, 2022-04-02 at 15:21 +0800, Julien Rouhaud wrote: > > I'm not sure about returnin

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-02 Thread Julien Rouhaud
On Fri, Apr 01, 2022 at 01:01:53PM -0700, Andres Freund wrote: > Hi, > > On 2022-04-01 22:47:02 +0300, Andrei Zubkov wrote: > > + entry = (pgssEntry *) hash_search(pgss_hash, , HASH_FIND, > > NULL); > > + > > + if (entry) { > > + /* Found */ > > +

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-02 Thread Julien Rouhaud
ay be used uninitialized in this function > > [-Werror=maybe-uninitialized] > > [13:19:51.544] 2598 | entry->minmax_stats_since = minmax_stats_reset; > > [13:19:51.544] | ~~^~~~ > > > > I was afraid of such warning can appear.. &g

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-02 Thread Julien Rouhaud
On Thu, Mar 31, 2022 at 01:06:10PM +0300, Andrei Zubkov wrote: > > On Wed, 2022-03-30 at 17:31 +0800, Julien Rouhaud wrote: > > Feature wise, I'm happy with the patch.  I just have a few comments. > > > > Tests: > > > > - it's missing some test i

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-04-01 Thread Julien Rouhaud
Hi, On Fri, Apr 01, 2022 at 11:38:52AM -0400, Greg Stark wrote: > FYI this has a compiler warning showing up on the cfbot: > > [13:19:51.544] pg_stat_statements.c: In function ‘entry_reset’: > [13:19:51.544] pg_stat_statements.c:2598:32: error: > ‘minmax_stats_reset’ may be used uninitialized in

Re: Possible fails in pg_stat_statements test

2022-03-31 Thread Julien Rouhaud
Hi, On Thu, Mar 31, 2022 at 06:08:01PM +0300, Anton A. Melnikov wrote: > Hello! > > On 30.03.2022 22:36, Robert Haas wrote: > > I don't think that the idea of "extra" WAL records is very principled. > > It's pretty vague what "extra" means, and your definition seems to be > > basically "whatever

Re: Commitfest Update

2022-03-30 Thread Julien Rouhaud
On Wed, Mar 30, 2022 at 02:41:26PM -0400, Greg Stark wrote: > > Patches that are Waiting on Author and haven't had activity in months > -- traditionally they were set to Returned with Feedback. It seems the > feeling these days is to not lose state on them and just move them to > the next CF. I'm

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2022-03-30 Thread Julien Rouhaud
Hi, On Fri, Mar 25, 2022 at 01:25:23PM +0300, Andrei Zubkov wrote: > Greg, thank you for your attention and for your thought. > > I've just completed the 6th version of a patch implementing idea > proposed by Julien Rouhaud, i.e. without auxiliary statistics. 6th > version will re

Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?

2022-03-29 Thread Julien Rouhaud
Hi, On Sun, Mar 27, 2022 at 09:07:12AM +0530, Bharath Rupireddy wrote: > On Fri, Mar 25, 2022 at 10:20 AM Greg Stark wrote: > > > > This doesn't seem to be getting any further attention. It sounds like > > Julien didn't agree with the scope of the text. Bharath do you think > > Julien's comments

Re: Assert in pageinspect with NULL pages

2022-03-29 Thread Julien Rouhaud
Hi, On Mon, Mar 28, 2022 at 08:29:29PM +0300, Maxim Orlov wrote: > I've suddenly found that the test in this patch is based on a fact that > heap pages don't have PageSpecial or it is of different size with btree > pages Special area: > > CREATE TABLE test1 (a int8, b int4range); > > SELECT

Re: Jumble Query with COERCE_SQL_SYNTAX

2022-03-29 Thread Julien Rouhaud
Hi, On Tue, Mar 29, 2022 at 03:52:57PM +0300, Yura Sokolov wrote: > > v14 introduced the way to get original text for some kind of expressions > using new 'funcformat' - COERCE_SQL_SYNTAX: > - EXTRACT(part from timestamp) > - (text IS [form] NORMALIZED) > and others. > > Mentioned EXTRACT and

Re: remove reset_shared()

2022-03-29 Thread Julien Rouhaud
Hi, On Tue, Mar 29, 2022 at 03:17:02PM -0700, Nathan Bossart wrote: > Hi hackers, > > Is there any reason to keep reset_shared() around anymore? It is now just > a wrapper function for CreateSharedMemoryAndSemaphores(), and AFAICT the > information in the comments is already covered by comments

Re: Add parameter jit_warn_above_fraction

2022-03-29 Thread Julien Rouhaud
Hi, On Mon, Mar 28, 2022 at 10:11:16PM +0200, Magnus Hagander wrote: > On Tue, Mar 22, 2022 at 12:50 AM Andres Freund wrote: > > > > This fails on cfbot, due to compiler warnings: > > https://cirrus-ci.com/task/5127667648299008?logs=mingw_cross_warning#L390 > > > Huh. That's annoying. I forgot

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-29 Thread Julien Rouhaud
Hi, On Tue, Mar 29, 2022 at 10:21:36AM +0900, Michael Paquier wrote: > On Mon, Mar 28, 2022 at 04:33:30PM +0800, Julien Rouhaud wrote: > > Ok, v5 attached without the TAP tests and updated sysviews tests. > > The update of the query related to pg_hba_file_rules in the reg

Re: [PATCH] Add extra statistics to explain for Nested Loop

2022-03-28 Thread Julien Rouhaud
Hi, On Mon, Mar 28, 2022 at 03:09:12PM -0400, Greg Stark wrote: > This patch got some very positive feedback and some significant amount > of work earlier in the release cycle. The feedback from Julien earlier > this month seemed pretty minor. > > Ekaterina, is there any chance you'll be able to

Re: Add a pg_get_query_def function (was Re: Deparsing rewritten query)

2022-03-28 Thread Julien Rouhaud
On Mon, Mar 28, 2022 at 11:20:42AM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > I'm attaching a v5 with hopefully a better comment for the function, and > > only > > the "pretty" parameter. > > Pushed with some minor cosmetic adjustments. Thanks

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-28 Thread Julien Rouhaud
On Mon, Mar 28, 2022 at 05:02:14PM +0900, Michael Paquier wrote: > On Mon, Mar 28, 2022 at 03:43:41PM +0800, Julien Rouhaud wrote: > > > > Ok. We could still keep the tests for the valid lines part though? > > With the SQLs modified as below, this part is less interesting.

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-28 Thread Julien Rouhaud
Hi, On Mon, Mar 28, 2022 at 04:20:07PM +0900, Michael Paquier wrote: > > > Note that those tests fail on Windows (and I'm assuming on EXEC_BACKEND > > builds), as they're testing invalid files which by definition prevent any > > further connection attempt. I'm not sure what would be best to do

Re: Invalid comment in ParallelQueryMain

2022-03-27 Thread Julien Rouhaud
Hi, On Sun, Mar 27, 2022 at 04:13:00PM +0900, Michael Paquier wrote: > On Sat, Mar 26, 2022 at 05:12:05PM +0100, Matthias van de Meent wrote: > > On Sat, 26 Mar 2022 at 17:01, Julien Rouhaud wrote: > >> While reading code around I just noticed that I failed to adapt a com

Re: Add a pg_get_query_def function (was Re: Deparsing rewritten query)

2022-03-27 Thread Julien Rouhaud
On Sun, Mar 27, 2022 at 11:53:58AM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > [ v4-0001-Add-a-pg_get_query_def-wrapper-around-get_query_d.patch ] > > This seems about ready to go to me, except for > > (1) as an exported API, pg_get_querydef needs a full API spec in

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-27 Thread Julien Rouhaud
To(oldcxt); > + MemoryContextDelete(identcxt); > Incorrect comment, this should be parse_ident_line. Indeed. I actually fixed it before but lost the change when rebasing after the 2nd hbafuncs.c refactoring. I also fixed an incorrect comment about pg_hba_file_mappings. >From ab685e1db3

Add a pg_get_query_def function (was Re: Deparsing rewritten query)

2022-03-26 Thread Julien Rouhaud
On Fri, Mar 25, 2022 at 05:49:04PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > I'm attaching the correct patch this time, sorry about that. > > While I'm okay with this in principle, as it stands it fails > headerscheck/cpluspluscheck: > > $ src/tools/pginclude

Re: make MaxBackends available in _PG_init

2022-03-26 Thread Julien Rouhaud
On Sat, Mar 26, 2022 at 10:23:16AM -0700, Andres Freund wrote: > > On 2022-03-26 15:22:03 +0800, Julien Rouhaud wrote: > > On Fri, Mar 25, 2022 at 03:23:17PM -0700, Andres Freund wrote: > > > > > > I don't really understand. The issue that started this thread wa

Invalid comment in ParallelQueryMain

2022-03-26 Thread Julien Rouhaud
Hi, While reading code around I just noticed that I failed to adapt a comment a couple of lines above a removed line in 0f61727b75b9. Patch attached. >From 5ba34dd1129cd1e2038ac70992a6b5e77df6121e Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Sat, 26 Mar 2022 23:55:59 +0800 Subj

Re: Remove an unused function GetWalRcvWriteRecPtr

2022-03-26 Thread Julien Rouhaud
On Sat, Mar 26, 2022 at 02:52:29PM +0900, Michael Paquier wrote: > On Sat, Mar 26, 2022 at 10:51:15AM +0530, Bharath Rupireddy wrote: > > The function GetWalRcvWriteRecPtr isn't being used anywhere, however > > pg_atomic_read_u64(>writtenUpto); (reading writtenUpto without > > spinlock) is being

Re: make MaxBackends available in _PG_init

2022-03-26 Thread Julien Rouhaud
Hi, On Fri, Mar 25, 2022 at 03:23:17PM -0700, Andres Freund wrote: > > I don't really understand. The issue that started this thread was bugs in > extensions due to accessing MaxBackends before it is initialized - which the > patch prevents. Well, the patch prevents accessing a 0-valued

Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-03-25 Thread Julien Rouhaud
On Fri, Mar 25, 2022 at 05:04:53PM +0800, Julien Rouhaud wrote: > I think the idea is interesting, however there are a few problems in the > patch. > > First, I think that it should only be done in the VERBOSE OFF mode. If you > ask > for a VERBOSE output you don't nee

Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-03-25 Thread Julien Rouhaud
Hi, On Thu, Mar 24, 2022 at 07:50:11AM +, Jian Guo wrote: > For a simple demo, with this explain statement: > > -- Test sort stats summary > set force_parallel_mode=on; > select explain_filter('explain (analyze, summary off, timing off, costs off, > format json) select * from tenk1 order by

Re: make MaxBackends available in _PG_init

2022-03-25 Thread Julien Rouhaud
On Fri, Mar 25, 2022 at 02:08:09PM +0900, Michael Paquier wrote: > On Fri, Mar 25, 2022 at 11:11:46AM +0800, Julien Rouhaud wrote: > > As an example, here's a POC for a new shmem_request_hook hook after > > _PG_init(). > > With it I could easily fix pg_wait_sampling shmem al

Re: Schema variables - new implementation for Postgres 15

2022-03-24 Thread Julien Rouhaud
Hi, On Wed, Mar 23, 2022 at 09:58:59PM +0100, Pavel Stehule wrote: > > A bit more work seems to be needed for deparsing session variables: > > > > # create variable myvar text; > > CREATE VARIABLE > > > > # create view myview as select myvar; > > CREATE VIEW > > > > # \d+ myview > >

Re: make MaxBackends available in _PG_init

2022-03-24 Thread Julien Rouhaud
On Fri, Mar 25, 2022 at 10:39:51AM +0800, Julien Rouhaud wrote: > On Thu, Mar 24, 2022 at 04:27:36PM -0400, Robert Haas wrote: > > On Thu, Mar 24, 2022 at 4:20 PM Nathan Bossart > > wrote: > > > Another possibility could be to add a hook that is called _before_ > >

Re: Assert in pageinspect with NULL pages

2022-03-24 Thread Julien Rouhaud
On Fri, Mar 25, 2022 at 11:44:26AM +0900, Michael Paquier wrote: > I have reviewed what you have sent, bumping on a couple of issues: Thanks! I'm happy with all the changes, except: + if (P_ISLEAF(opaque) && opaque->btpo_level != 0) + ereport(ERROR, +

Re: make MaxBackends available in _PG_init

2022-03-24 Thread Julien Rouhaud
On Thu, Mar 24, 2022 at 04:27:36PM -0400, Robert Haas wrote: > On Thu, Mar 24, 2022 at 4:20 PM Nathan Bossart > wrote: > > Another possibility could be to add a hook that is called _before_ > > _PG_init() where libraries are permitted to adjust GUCs. After the library > > is loaded, we first

Re: Assert in pageinspect with NULL pages

2022-03-24 Thread Julien Rouhaud
f pages and so on), and tried to cover everything with tests. I'm a bit worried about the btree tests stability. I avoid emitting the level found to help with that, but it still depends on what other AM will put in their special page. From fa2841b83a57daf8de95e8b154afc2bf5dd60dda Mon Sep 17 0

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-24 Thread Julien Rouhaud
On Thu, Mar 24, 2022 at 04:50:31PM +0900, Michael Paquier wrote: > On Wed, Mar 23, 2022 at 01:14:02PM +0900, Michael Paquier wrote: > > On Wed, Mar 23, 2022 at 10:16:34AM +0800, Julien Rouhaud wrote: > >> Yeah, I thought about it but didn't rename it given your concerns abou

Re: make MaxBackends available in _PG_init

2022-03-23 Thread Julien Rouhaud
On Wed, Mar 23, 2022 at 08:32:39AM -0400, Robert Haas wrote: > On Wed, Mar 23, 2022 at 12:53 AM Julien Rouhaud wrote: > > Unless I'm missing something, the new situation is that the system is > > supposed > > to prevent access to MaxBackends during s_p_l_pg_init, for reason

Re: make MaxBackends available in _PG_init

2022-03-22 Thread Julien Rouhaud
Hi, Sorry for showing up this late, but I'm a bit confused with the new situation. Unless I'm missing something, the new situation is that the system is supposed to prevent access to MaxBackends during s_p_l_pg_init, for reasons I totally agree with, but without doing anything for extensions

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-22 Thread Julien Rouhaud
Hi, On Wed, Mar 23, 2022 at 11:03:46AM +0900, Michael Paquier wrote: > > Pushing forward with 0001 by the end of the CF is the part that has no > controversy IMO, and I have no objections to it. Now, after looking > at this part, I found a few things, as of: > - HbaToken, the set of elements in

Re: New Object Access Type hooks

2022-03-22 Thread Julien Rouhaud
Hi, On Tue, Mar 22, 2022 at 10:41:05AM -0400, Andrew Dunstan wrote: > > Pushed with slight adjustments - the LOAD was unnecessary as was the > setting of client_min_messages - the latter would have made buildfarm > animals unhappy. For the record this just failed on my buildfarm animal:

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-22 Thread Julien Rouhaud
Hi, On Tue, Mar 22, 2022 at 03:21:20PM +0300, Aleksander Alekseev wrote: > > The v3-0001 patch LGTM. > > Since v3-0002 adds a new view and alters pg_proc.dat shouldn't it also > increase CATALOG_VERSION_NO? Not sure if we generally do this in the > patches or expect the committer to make the

Re: [PATCH] Add native windows on arm64 support

2022-03-22 Thread Julien Rouhaud
Hi, Please don't top-post here. See https://wiki.postgresql.org/wiki/Mailing_Lists#Email_etiquette_mechanics. On Tue, Mar 22, 2022 at 09:37:46AM +, Niyas Sait wrote: > > Yes, we could look into providing a build machine. Do you have any > reference to what the CI system looks like now for

Re: WIP: WAL prefetch (another approach)

2022-03-21 Thread Julien Rouhaud
Hi, On Sun, Mar 20, 2022 at 05:36:38PM +1300, Thomas Munro wrote: > On Fri, Mar 18, 2022 at 9:59 AM Thomas Munro wrote: > > I'll push 0001 today to let the build farm chew on it for a few days > > before moving to 0002. > > Clearly 018_wal_optimize.pl is flapping and causing recoveryCheck to >

Re: Probable CF bot degradation

2022-03-20 Thread Julien Rouhaud
On Sun, Mar 20, 2022 at 01:58:01PM +0100, Matthias van de Meent wrote: > > I noticed that two of my patches (37/3543 and 37/3542) both failed due > to a bad commit on master (076f4d9). The issue was fixed an hour later > with b61e6214; but the pipeline for these patches hasn't run since. > Because

Re: pgsql: Add option to use ICU as global locale provider

2022-03-20 Thread Julien Rouhaud
On Sun, Mar 20, 2022 at 11:03:38AM +0100, Peter Eisentraut wrote: > On 19.03.22 05:14, Julien Rouhaud wrote: > > On Fri, Mar 18, 2022 at 03:09:59PM -0700, Andres Freund wrote: > > > Hi, > > > > > > On 2022-03-18 20:28:58 +0100, Peter Eisentraut wrote: &

Re: Schema variables - new implementation for Postgres 15

2022-03-19 Thread Julien Rouhaud
On Sat, Mar 19, 2022 at 04:46:13PM -0500, Justin Pryzby wrote: > On Thu, Mar 03, 2022 at 03:06:52PM +0800, Julien Rouhaud wrote: > > Hi, > > > > On Wed, Mar 02, 2022 at 06:03:06AM +0100, Pavel Stehule wrote: > > > > > > I lost commit with this change. I am

Re: pgsql: Add option to use ICU as global locale provider

2022-03-18 Thread Julien Rouhaud
can work on that next week if needed. [1] https://www.postgresql.org/message-id/20220318000140.vzri3qw3p4aeb...@alap3.anarazel.de >From f3884b483884a4e39b577dc01b72bab5176964bb Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Fri, 18 Mar 2022 16:20:01 +0800 Subject: [PATCH v2] Fix global icu col

Re: pgsql: Add option to use ICU as global locale provider

2022-03-18 Thread Julien Rouhaud
On Fri, Mar 18, 2022 at 04:04:10PM -0400, Tom Lane wrote: > Peter Eisentraut writes: > > Another option is that we just don't do the check in initdb. As the > > tests show, you will then get an error from the backend call, so it's > > really just a question of when the error is reported. > > +1

Re: Probable CF bot degradation

2022-03-18 Thread Julien Rouhaud
Hi, On Fri, Mar 18, 2022 at 07:43:47PM +0400, Pavel Borisov wrote: > Hi, hackers! > I've noticed that CF bot hasn't been running active branches from yesterday: > https://github.com/postgresql-cfbot/postgresql/branches/active > > Also, there is no new results on the current CF page on cputube. >

Re: pgsql: Add option to use ICU as global locale provider

2022-03-18 Thread Julien Rouhaud
(moving to -hackers) On Fri, Mar 18, 2022 at 03:40:51PM +0800, Julien Rouhaud wrote: > On Fri, Mar 18, 2022 at 02:36:48PM +0800, Julien Rouhaud wrote: > > On Fri, Mar 18, 2022 at 06:15:47PM +1300, Thomas Munro wrote: > > > > > > No idea what's happeni

Re: ICU for global collation

2022-03-18 Thread Julien Rouhaud
On Thu, Mar 17, 2022 at 02:14:52PM +0100, Peter Eisentraut wrote: > On 17.03.22 13:01, Shinoda, Noriyoshi (PN Japan FSIP) wrote: > > Thank you to all the developers. > > I found that the description of the pg_database.daticulocale column was not > > written in the documentation. > > The attached

Re: PROPOSAL: Support global and local disabling of indexes

2022-03-18 Thread Julien Rouhaud
Hi, On Thu, Mar 17, 2022 at 11:16:24PM -0700, Paul Martinez wrote: > > Adding and removing indexes is a regular part of database maintenance, > but in a large database, removing an index can be a very risky operation. > Removing the wrong index could have disastrous consequences for >

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-15 Thread Julien Rouhaud
Hi, The cfbot says that the patch doesn't apply anymore, so here's a v3 with the changes mentioned below. On Tue, Mar 01, 2022 at 05:19:50PM +0800, Julien Rouhaud wrote: > > If you prefer to interleave static and non static function I can change it. Change the split to not reorder fun

Re: Move the "DR_intorel" struct to a more suitable position

2022-03-15 Thread Julien Rouhaud
Hi, On Wed, Mar 16, 2022 at 11:16:58AM +0800, zk.wang wrote: > Generally, we should define struct in the header file(.h). But I found struct > "DR_intorel" in createas.c and it doesn't seem to be properly defined. May be > it should define in createas.h. We put struct declarations in header

Re: Change the csv log to 'key:value' to facilitate the user to understanding and processing of logs

2022-03-15 Thread Julien Rouhaud
Hi, On Tue, Mar 15, 2022 at 09:31:19AM +0800, lupeng wrote: > > When I audit the Postgresql database recently, I found that after configuring > the log type as csv, the output log content is as follows: "database > ""lp_db1"" does not exist","DROP DATABASE lp_db1;",,"dropdb, >

Re: Can we consider "24 Hours" for "next day" in INTERVAL datatype ?

2022-03-15 Thread Julien Rouhaud
Hi, On Tue, Mar 15, 2022 at 12:54:58PM +0530, Prabhat Sahu wrote: > > Kindly check the below scenario with INTERVAL datatype. > > postgres=# select interval '01 20:59:59' + interval '00 05:00:01' as > interval; > interval > > 1 day 26:00:00 > (1 row) > > Any operation with

Re: ICU for global collation

2022-03-15 Thread Julien Rouhaud
On Mon, Mar 14, 2022 at 01:50:50PM +0100, Peter Eisentraut wrote: > On 05.03.22 09:38, Julien Rouhaud wrote: > > I say it works because I did manually check, as far as I can see there isn't > > any test that ensures it. > > > > I'm using this naive scenario: > >

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-14 Thread Julien Rouhaud
On Mon, Mar 14, 2022 at 03:16:50PM +0530, Nitin Jadhav wrote: > > > I am not suggesting > > > removing the existing 'flags' field of pg_stat_progress_checkpoint > > > view and adding a new field 'throttled'. The content of the 'flags' > > > field remains the same. I was suggesting replacing the

Re: WIP: WAL prefetch (another approach)

2022-03-14 Thread Julien Rouhaud
On Mon, Mar 14, 2022 at 06:15:59PM +1300, Thomas Munro wrote: > On Fri, Mar 11, 2022 at 9:27 PM Julien Rouhaud wrote: > > > > Also, is it worth an assert (likely at the top of the function) for > > > > that? > > > > > > How could I assert that En

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-11 Thread Julien Rouhaud
On Fri, Mar 11, 2022 at 04:59:11PM +0530, Nitin Jadhav wrote: > > That "throttled" flag should be the same as having or not a "force" in the > > flags. We should be consistent and report information the same way, so > > either > > a lot of flags (is_throttled, is_force...) or as now a single

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-11 Thread Julien Rouhaud
On Fri, Mar 11, 2022 at 02:41:23PM +0530, Nitin Jadhav wrote: > > Ok. I agree that it is difficult to interpret it correctly. So even if > say that a new checkpoint has been explicitly requested, the user may > not understand that it affects current checkpoint behaviour unless the > user knows the

Re: WIP: WAL prefetch (another approach)

2022-03-11 Thread Julien Rouhaud
On Fri, Mar 11, 2022 at 06:31:13PM +1300, Thomas Munro wrote: > On Wed, Mar 9, 2022 at 7:47 PM Julien Rouhaud wrote: > > > > This could use XLogRecGetBlock? Note that this macro is for now never used. > > xlogreader.c also has some similar forgotten code that could use

Re: ICU for global collation

2022-03-10 Thread Julien Rouhaud
On Thu, Mar 10, 2022 at 10:52:41AM +0100, Peter Eisentraut wrote: > On 05.03.22 09:38, Julien Rouhaud wrote: > > @@ -168,18 +175,6 @@ DefineCollation(ParseState *pstate, List *names, List > > *parameters, bool if_not_e > > errmsg("collation \&

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-09 Thread Julien Rouhaud
On Tue, Mar 08, 2022 at 08:57:23PM +0530, Nitin Jadhav wrote: > > I just wanted to avoid extra calculations just to show the progress in > the view. Since it's a good metric, I have added an additional field > named 'next_flags' to the view which holds all possible flag values of > the next

Re: WIP: WAL prefetch (another approach)

2022-03-08 Thread Julien Rouhaud
Hi, On Tue, Mar 08, 2022 at 06:15:43PM +1300, Thomas Munro wrote: > On Wed, Dec 29, 2021 at 5:29 PM Thomas Munro wrote: > > https://github.com/macdice/postgres/tree/recovery-prefetch-ii > > Here's a rebase. This mostly involved moving hunks over to the new > xlogrecovery.c file. One thing that

Re: Expose JIT counters/timing in pg_stat_statements

2022-03-07 Thread Julien Rouhaud
On Mon, Mar 07, 2022 at 01:40:34PM +0100, Magnus Hagander wrote: > > I wonder if there might be an interesting middle ground, or if that is > making it too much. That is, we could have an > Option 3: > jit_count > total_jit_time - for sum of functions+inlining+optimization+emission time >

Re: refreshing query id for pg_stat_statements based on comment in sql

2022-03-07 Thread Julien Rouhaud
Hi, On Mon, Mar 07, 2022 at 09:42:26AM -0800, Zhihong Yu wrote: > Hi, > Currently the query id for pg_stat_statements gets calculated based on the > parse nodes specifics. > This means that the user cannot add a comment to a SQL query to test > something. (though some other RDBMS allows this

Re: suboverflowed subtransactions concurrency performance optimize

2022-03-07 Thread Julien Rouhaud
On Mon, Mar 07, 2022 at 01:27:40PM +, Simon Riggs wrote: > > +/* > > + * Single-item cache for results of SubTransGetTopmostTransaction. It's > > worth having > > + * such a cache because we frequently find ourselves repeatedly checking > > the > > + * same XID, for example when scanning a

Re: suboverflowed subtransactions concurrency performance optimize

2022-03-07 Thread Julien Rouhaud
Hi, On Mon, Jan 17, 2022 at 01:44:02PM +, Simon Riggs wrote: > > Re-attached, so that the CFapp isn't confused between the multiple > patches on this thread. Thanks a lot for working on this! The patch is simple and overall looks good to me. A few comments though: +/* + * Single-item

Re: pl/pgsql feature request: shorthand for argument and local variable references

2022-03-06 Thread Julien Rouhaud
On Mon, Mar 07, 2022 at 06:35:45AM +0100, Pavel Stehule wrote: > > this patch should be rejected. There is no consensus. Thanks for the confirmation, I will take care of it!

Re: [PATCH] Add extra statistics to explain for Nested Loop

2022-03-06 Thread Julien Rouhaud
Hi, On Thu, Feb 03, 2022 at 12:59:03AM +0300, Ekaterina Sokolova wrote: > > I apply the new version of patch. > > I wanted to measure overheads, but could't choose correct way. Thanks for > idea with auto_explain. > I loaded it and made 10 requests of pgbench (number of clients: 1, of > threads:

Re: timestamp for query in pg_stat_statements

2022-03-06 Thread Julien Rouhaud
On Sun, Mar 06, 2022 at 07:10:49PM -0800, Zhihong Yu wrote: > On Sun, Mar 6, 2022 at 6:23 PM Julien Rouhaud wrote: > > > On Sun, Mar 06, 2022 at 12:37:00PM -0800, Zhihong Yu wrote: > > > > > > Here is one example (same query, q, is concerned). > > >

Re: pl/pgsql feature request: shorthand for argument and local variable references

2022-03-06 Thread Julien Rouhaud
On Mon, Mar 07, 2022 at 11:27:14AM +0900, Michael Paquier wrote: > On Sat, Mar 05, 2022 at 07:31:53PM +0900, Michael Paquier wrote: > > I got a short look at what was proposed in the patch a couple of > > months ago, and still found the implementation confusing with the way > > aliases are

Re: Comment typo in CheckCmdReplicaIdentity

2022-03-06 Thread Julien Rouhaud
On Mon, Mar 07, 2022 at 10:36:24AM +0900, Michael Paquier wrote: > On Mon, Mar 07, 2022 at 09:31:33AM +1100, Peter Smith wrote: > > PSA patch to fix a comment typo. > > > > (The 'OR' should not be uppercase - that keyword is irrelevant here). > > I was looking at the whole routine, and your

Re: timestamp for query in pg_stat_statements

2022-03-06 Thread Julien Rouhaud
On Sun, Mar 06, 2022 at 12:37:00PM -0800, Zhihong Yu wrote: > The current design of pg_stat_statements doesn't have the concept of > observation. > > By observation I mean scenarios where pg_stat_statements is read by people > doing performance tuning. > > Here is one example (same query, q, is

<    1   2   3   4   5   6   7   8   9   10   >