Re: Adding the extension name to EData / log_line_prefix

2024-05-13 Thread Julien Rouhaud
On Mon, May 13, 2024 at 07:11:53PM GMT, Tom Lane wrote: > Andres Freund writes: > > On 2024-05-13 19:25:11 -0300, Fabrízio de Royes Mello wrote: > >> Hmmm, depending on the extension it can extensively call/use postgres code > >> so would be nice if we can differentiate if the code is called from

Re: RFC: Logging plan of the running query

2024-02-26 Thread Julien Rouhaud
On Mon, Feb 26, 2024 at 01:56:44PM +0530, Robert Haas wrote: > On Sun, Feb 25, 2024 at 5:00 PM Julien Rouhaud wrote: > > Yeah, trying to find a generalized solution seems like worth investing some > > time to avoid having a bunch of CHECK_FOR_XXX() calls scattered in the code >

Re: RFC: Logging plan of the running query

2024-02-25 Thread Julien Rouhaud
On Mon, Feb 26, 2024 at 12:19:42PM +0530, Ashutosh Bapat wrote: > On Sun, Feb 25, 2024 at 5:00 PM Julien Rouhaud wrote: > > > > > > On Fri, Feb 23, 2024 at 7:50 PM Julien Rouhaud > > > > wrote: > > > > > > > > > > Bu

Re: RangeTblEntry jumble omissions

2024-02-25 Thread Julien Rouhaud
On Fri, Feb 23, 2024 at 11:00:41PM +0100, Alvaro Herrera wrote: > > Another, similar but not quite: if you do > > SET search_path TO foo; > SELECT * FROM t1; > SET search_path TO bar; > SELECT * FROM t1; > > and you have both foo.t1 and bar.t1, you'll get two identical-looking > queries in

Re: RFC: Logging plan of the running query

2024-02-25 Thread Julien Rouhaud
On Sat, Feb 24, 2024 at 08:56:41AM -0500, James Coleman wrote: > On Fri, Feb 23, 2024 at 10:23 AM Robert Haas wrote: > > > > On Fri, Feb 23, 2024 at 7:50 PM Julien Rouhaud wrote: > > > > > > But it doesn't have to be all or nothing right? I mean each

Re: RangeTblEntry jumble omissions

2024-02-23 Thread Julien Rouhaud
Hi, On Fri, Feb 23, 2024 at 04:26:53PM +0100, Peter Eisentraut wrote: > > - alias > > Currently, two queries like > > SELECT * FROM t1 AS foo > SELECT * FROM t1 AS bar > > are counted together by pg_stat_statements -- that might be ok, but they > both get listed under whichever one is run first,

Re: RFC: Logging plan of the running query

2024-02-23 Thread Julien Rouhaud
Hi, On Fri, Feb 23, 2024 at 10:22:32AM +0530, Robert Haas wrote: > On Thu, Feb 22, 2024 at 6:25 AM James Coleman wrote: > > This is potentially a bit of a wild idea, but I wonder if having some > > kind of argument to CHECK_FOR_INTERRUPTS() signifying we're in > > "normal" as opposed to

Re: Small fix on query_id_enabled

2024-02-13 Thread Julien Rouhaud
On Tue, Feb 13, 2024 at 05:28:32PM +0900, Michael Paquier wrote: > On Tue, Feb 13, 2024 at 01:13:43AM +0900, Yugo NAGATA wrote: > > I attached an updated patch that adds comments noting to use > > IsQueryIdEnabled() > > instead of accessing the variables directly. > > Sounds good to me, thanks.

Re: Small fix on query_id_enabled

2024-02-09 Thread Julien Rouhaud
Hi, On Fri, Feb 09, 2024 at 03:38:23PM +0900, Yugo NAGATA wrote: > > I found the comment on query_id_enabled looks inaccurate because this is > never set to true when compute_query_id is ON. > > /* True when compute_query_id is ON, or AUTO and a module requests them */ > bool

Re: System username in pg_stat_activity

2024-01-19 Thread Julien Rouhaud
Hi, On Thu, Jan 18, 2024 at 11:01 PM Magnus Hagander wrote: > > I did. Here it is, and also including that suggested docs fix as well > as a rebase on current master. +if (MyClientConnectionInfo.authn_id) +strlcpy(lbeentry.st_auth_identity, MyClientConnectionInfo.authn_id,

Re: pg_stat_statements: more test coverage

2023-12-31 Thread Julien Rouhaud
On Sun, Dec 31, 2023 at 2:28 PM Michael Paquier wrote: > > On Sat, Dec 30, 2023 at 08:39:47PM +0100, Peter Eisentraut wrote: > > Ok, I have committed these two patches. > > Please note that the buildfarm has turned red, as in: >

Re: pg_stat_statements: more test coverage

2023-12-28 Thread Julien Rouhaud
On Wed, Dec 27, 2023 at 8:53 PM Peter Eisentraut wrote: > > On 27.12.23 09:08, Julien Rouhaud wrote: > > > > I was a bit surprised by that so I checked locally. It does work as > > expected provided that you set pg_stat_statements.track to all: > > Ok, here is

Re: pg_stat_statements: more test coverage

2023-12-27 Thread Julien Rouhaud
Hi, On Tue, Dec 26, 2023 at 10:03 PM Peter Eisentraut wrote: > > On 24.12.23 03:03, Michael Paquier wrote: > > - Use a DO block of a PL function, say with something like that to > > ensure an amount of N queries? Say with something like that after > > tweaking pg_stat_statements.track: > >

Re: How to get started with contribution

2023-12-17 Thread Julien Rouhaud
Hi, On Sun, Dec 17, 2023 at 03:09:10PM +, Sukhbir Singh wrote: > > I am Sukhbir Singh, a B.Tech undergraduate, and I am in my pre-final year at > Punjab Engineering College (PEC). I am new to open source but know Python, > PostgreSQL, C, Javascript and node.js. I would love to contribute to

Re: btree_gist into core?

2023-12-14 Thread Julien Rouhaud
Hi, On Wed, Jan 19, 2022 at 09:30:11AM +0100, Peter Eisentraut wrote: > > To use exclusion constraints in practice, you often need to install the > btree_gist extension, so that you can combine for example a range type check > and normal scalar key columns into one constraint. > > [...] > > There

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-11-24 Thread Julien Rouhaud
Hi, On Sat, Nov 25, 2023 at 02:45:07AM +0200, Alexander Korotkov wrote: > > I've reviewed this patch. I think this is the feature of high demand. > New columns (stats_since and minmax_stats_since) to the > pg_stat_statements view, enhancing the granularity and precision of > performance

Re: Schema variables - new implementation for Postgres 15

2023-11-21 Thread Julien Rouhaud
Hi, On Tue, Oct 17, 2023 at 08:52:13AM +0200, Pavel Stehule wrote: > > When I thought about global temporary tables, I got one maybe interesting > idea. The one significant problem of global temporary tables is place for > storing info about size or column statistics. > > I think so these data

Re: Fix documentation for pg_stat_statements JIT deform_counter

2023-11-15 Thread Julien Rouhaud
On Wed, Nov 15, 2023 at 01:53:13PM +0100, Daniel Gustafsson wrote: > > On 11 Nov 2023, at 10:26, Julien Rouhaud wrote: > > > I was adding support for the new pg_stat_statements JIT deform_counter in > > PoWA > > when I realized that those were adde

Fix documentation for pg_stat_statements JIT deform_counter

2023-11-11 Thread Julien Rouhaud
let's be consistent. Trivial patch attached. >From 0144620d2de75d321e5273416fdab5df671b92f0 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Sat, 11 Nov 2023 17:11:35 +0800 Subject: [PATCH v1] Fix documentation for pg_stat_statements JIT deform_counter Oversight in 5a3423ad8e. Aut

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-10-24 Thread Julien Rouhaud
On Tue, Oct 24, 2023 at 6:57 PM Peter Eisentraut wrote: > > On 24.10.23 09:58, Andrei Zubkov wrote: > > During last moving to the current commitfest this patch have lost its > > reviewers list. With respect to reviewers contribution in this patch, I > > think reviewers list should be fixed. > > I

Re: Good News Everyone! + feature proposal

2023-10-05 Thread Julien Rouhaud
On Thu, Oct 5, 2023 at 11:11 PM Jon Erdman wrote: > > As a second more general question: could my original idea (i.e. sans > event trigger) be implemented in an extension somehow, or is that not > technically possible (I suspect not)? It should be easy to do using the ProcessUtility_hook hook,

Re: persist logical slots to disk during shutdown checkpoint

2023-08-29 Thread Julien Rouhaud
Hi, On Tue, Aug 29, 2023 at 02:21:15PM +0530, Amit Kapila wrote: > On Tue, Aug 29, 2023 at 10:16 AM vignesh C wrote: > > > > That makes sense. The attached v6 version has the changes for the > > same, apart from this I have also fixed a) pgindent issues b) perltidy > > issues c) one variable

Re: psql --no-connect option

2023-08-24 Thread Julien Rouhaud
Hi, On Thu, Aug 24, 2023 at 12:55:30PM -0700, Gurjeet Singh wrote: > Currently, psql exits if a database connection is not established when > psql is launched. > > Sometimes it may be useful to launch psql without connecting to the > database. For example, a user may choose to start psql and then

Re: persist logical slots to disk during shutdown checkpoint

2023-08-19 Thread Julien Rouhaud
On Sat, 19 Aug 2023, 14:16 Amit Kapila, wrote: > It's entirely possible for a logical slot to have a confirmed_flush > LSN higher than the last value saved on disk while not being marked as > dirty. It's currently not a problem to lose that value during a clean > shutdown / restart cycle but to

Re: Ignore 2PC transaction GIDs in query jumbling

2023-08-13 Thread Julien Rouhaud
On Sun, Aug 13, 2023 at 03:25:33PM +0900, Michael Paquier wrote: > On Tue, Aug 01, 2023 at 10:46:58AM +0800, Julien Rouhaud wrote: > > > > Agreed, it should be as trivial to implement as for the 2pc commands :) > > Perhaps not as much, actually, because I was just remin

Re: Schema variables - new implementation for Postgres 15

2023-08-12 Thread Julien Rouhaud
On Sat, Aug 12, 2023 at 01:20:03PM +0200, Dmitry Dolgov wrote: > > On Sat, Aug 12, 2023 at 09:28:19AM +0800, Julien Rouhaud wrote: > > On Fri, Aug 11, 2023 at 05:55:26PM +0200, Dmitry Dolgov wrote: > > > > > > Another confusing example was this one at t

Re: Schema variables - new implementation for Postgres 15

2023-08-11 Thread Julien Rouhaud
On Fri, Aug 11, 2023 at 05:55:26PM +0200, Dmitry Dolgov wrote: > > Another confusing example was this one at the end of set_session_variable: > > + /* > + * XXX While unlikely, an error here is possible. It wouldn't leak > memory > + * as the allocated chunk has already been

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-08-10 Thread Julien Rouhaud
Hi, On Thu, Aug 10, 2023 at 04:30:40PM +0900, Masahiko Sawada wrote: > On Thu, Aug 10, 2023 at 2:27 PM Amit Kapila wrote: > > > > Sawada-San, Julien, and others, do you have any thoughts on the above point? > > IIUC during the old cluster running in the middle of pg_upgrade it > doesn't accept

Re: Fix last unitialized memory warning

2023-08-09 Thread Julien Rouhaud
On Wed, Aug 09, 2023 at 10:29:56AM -0500, Tristan Partin wrote: > On Wed Aug 9, 2023 at 10:02 AM CDT, Peter Eisentraut wrote: > > > > This patch has apparently upset one buildfarm member with a very old > > compiler: > > https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=lapwing=HEAD > >

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-08-07 Thread Julien Rouhaud
On Mon, Aug 07, 2023 at 12:42:33PM +0530, Amit Kapila wrote: > On Mon, Aug 7, 2023 at 11:29 AM Julien Rouhaud wrote: > > > > Unless I'm missing something I don't see what prevents something to connect > > using the replication protocol and issue any query or even create new

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-08-06 Thread Julien Rouhaud
On Mon, Aug 07, 2023 at 09:24:02AM +0530, Amit Kapila wrote: > > I think autovacuum is not enabled during the upgrade. See comment "Use > -b to disable autovacuum." in start_postmaster(). However, I am not > sure if there can't be any additional WAL from checkpointer or > bgwriter. Checkpointer

Re: How to add a new operator for parser?

2023-08-06 Thread Julien Rouhaud
On Sun, Aug 06, 2023 at 01:37:42PM +0800, jacktby jacktby wrote: > > I need to build a new datatype. It can contains different datatypes, like > ‘(1,’a’,2.0)’,it’s a (interger,string,float) tuple type Is there any reason why you can't simply rely on the record datatype? > and Then I need to >

Re: How to add a new operator for parser?

2023-08-05 Thread Julien Rouhaud
On Sun, 6 Aug 2023, 12:34 jacktby jacktby, wrote: > I’m trying to add a new operator for my pg application like greater_equals > called “<~>", how many files I need to > modify and how to do it? Can you give me an example? > you can look at some contrib for some examples of custom operator (and

Re: How to build a new grammer for pg?

2023-08-01 Thread Julien Rouhaud
Hi, On Tue, Aug 01, 2023 at 07:36:36PM +0800, jacktby wrote: > Hi, I’m trying to > develop a new grammar for pg, can +you give me a code example to reference? It's unclear to me whether you want to entirely replace the flex/bison parser with something else or just add some new bison rule. If

Re: Ignore 2PC transaction GIDs in query jumbling

2023-07-31 Thread Julien Rouhaud
On Tue, Aug 01, 2023 at 11:37:49AM +0900, Michael Paquier wrote: > On Tue, Aug 01, 2023 at 10:22:09AM +0800, Julien Rouhaud wrote: > > Looking at the rest of the ignored patterns, the only remaining one would be > > DEALLOCATE, which AFAICS doesn't have a query_jumble_ign

Re: Ignore 2PC transaction GIDs in query jumbling

2023-07-31 Thread Julien Rouhaud
On Tue, Aug 01, 2023 at 11:00:32AM +0900, Michael Paquier wrote: > On Tue, Aug 01, 2023 at 09:28:08AM +0800, Julien Rouhaud wrote: > > > FTR we had to entirely ignore all those statements in powa years ago to try > > to > > make the tool usable in such case for some u

Re: Ignore 2PC transaction GIDs in query jumbling

2023-07-31 Thread Julien Rouhaud
Hi, On Tue, Aug 01, 2023 at 09:38:14AM +0900, Michael Paquier wrote: > > 31de7e6 has silenced savepoint names in the query jumbling, and > something similar can be done for 2PC transactions once the GID is > ignored in TransactionStmt. This leads to the following grouping in >

Re: Improve join_search_one_level readibilty (one line change)

2023-07-31 Thread Julien Rouhaud
Hi, On Wed, Jun 07, 2023 at 11:02:09AM +0800, 謝東霖 wrote: > Thank you, Julien, for letting me know that cfbot doesn't test txt files. > Much appreciated! Thanks for posting this v2! So unsurprisingly the cfbot is happy with this patch, since it doesn't change the behavior at all. I just have

Re: \di+ cannot show the same name indexes

2023-07-13 Thread Julien Rouhaud
Hi, On Thu, Jul 13, 2023 at 03:17:17PM +0800, フブキダイスキ wrote: > After I create the same name index on the heap table and the temporary > table, I can only get the temporary table's index by \di+. > > create table t1(c1 int); > create temp table t2(c1 int); > > create index idx1 on t1(c1); >

Re: numeric datatype for current release not available

2023-07-12 Thread Julien Rouhaud
On Wed, 12 Jul 2023, 23:15 Ashutosh Bapat, wrote: > Hi All, > https://www.postgresql.org/docs/current/datatype-numeric.html gives me > "bad gateway" error. Attached screen shot. Date/Time datatype > documentation is accessible at > https://www.postgresql.org/docs/current/datatype-datetime.html.

Re: contrib/pg_freespacemap first check input argument, then relation_open.

2023-07-05 Thread Julien Rouhaud
Hi, On Thu, Jul 06, 2023 at 10:14:46AM +0800, jian he wrote: > > In: > https://git.postgresql.org/cgit/postgresql.git/tree/contrib/pg_freespacemap/pg_freespacemap.c > > rel = relation_open(relid, AccessShareLock); > > if (blkno < 0 || blkno > MaxBlockNumber) > ereport(ERROR, >

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2023-07-04 Thread Julien Rouhaud
Hi, On Tue, Jul 04, 2023 at 03:03:01PM +0900, Michael Paquier wrote: > On Tue, Jul 04, 2023 at 07:16:47AM +0900, Michael Paquier wrote: > > The second and third animals to fail are skate and snapper, both using > > Debian 7 Wheezy. As far as I know, it was an LTS supported until > > 2018. The

Re: Outdated description of PG_CACHE_LINE_SIZE

2023-07-03 Thread Julien Rouhaud
On Mon, Jul 03, 2023 at 12:01:55PM +0300, Heikki Linnakangas wrote: > On 01/07/2023 10:49, Julien Rouhaud wrote: > > > > I just noticed that the comment for PG_CACHE_LINE_SIZE still says that "it's > > currently used in xlog.c", which hasn't been true for quite some

Outdated description of PG_CACHE_LINE_SIZE

2023-07-01 Thread Julien Rouhaud
rce code file. Author: Julien Rouhaud Reviewed-by: FIXME Discussion: FIXME --- src/include/pg_config_manual.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index a1a93ad706..01fe2af499 100644 ---

Re: Targetlist lost when CTE join

2023-06-28 Thread Julien Rouhaud
On Wed, Jun 28, 2023 at 05:17:14PM +0800, Julien Rouhaud wrote: > > > > Table t1 and  t2 both has 2 columns: c1, c2, when CTE join select *, the > > result target list seems to lost one’s column c1. > > But it looks good when select cte1.* and t1.* explicit

Re: Targetlist lost when CTE join

2023-06-28 Thread Julien Rouhaud
Hi, On Wed, Jun 28, 2023 at 04:52:34PM +0800, Zhang Mingli wrote: > > Mini repo > > create table t1(c1 int, c2 int); > CREATE TABLE > create table t2(c1 int, c2 int); > CREATE TABLE > explain with cte1 as (insert into t2 values (1, 2) returning *) select * from > cte1 join t1 using(c1); >  QUERY

Re: [PATCH] Slight improvement of worker_spi.c example

2023-06-15 Thread Julien Rouhaud
On Wed, Jun 14, 2023 at 02:08:03PM +0300, Aleksander Alekseev wrote: > > Unfortunately I'm not familiar with the problem in respect of naptime > Julien is referring to. If you know what this problem is and how to > fix it, go for it. I'll review and test the code then. I can write the > part of

Re: [PATCH] Slight improvement of worker_spi.c example

2023-06-13 Thread Julien Rouhaud
On Tue, Jun 13, 2023 at 12:34:09PM +0300, Aleksander Alekseev wrote: > > > I agree that the current code > > could lead folks to think that PushActiveSnapshot must go after > > SPI_connect, but wouldn't the reverse ordering just give folks the opposite > > impression? > > This is the exact reason

Re: Views no longer in rangeTabls?

2023-06-10 Thread Julien Rouhaud
On Sat, Jun 10, 2023 at 08:56:47AM -0400, Tom Lane wrote: > > Well, if we're gonna do it we should do it for v16, rather than > change the data structure twice. It wouldn't be hard exactly: > > /* > * Clear fields that should not be set in a subquery RTE. Note that we > * leave the

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-07 Thread Julien Rouhaud
On Wed, Jun 07, 2023 at 03:42:25PM +0800, jiye wrote: > we will update all commits with latest version certaintly, but we must > confirm that this issue is same with it currently we can not confirm this > issue can be fixed by revert 2aa6e331ead7f3ad080561495ad4bd3bc7cd8913 this > commit, so i

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-07 Thread Julien Rouhaud
On Wed, Jun 07, 2023 at 03:12:44PM +0800, jiye wrote: > actually out test instance include 2aa6e331ead7f3ad080561495ad4bd3bc7cd8913 > this commit, not yet reverted this commit. Are you saying that you're doing tests relying on a version that's missing about 3 years of security and bug fixes?

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-07 Thread Julien Rouhaud
On Tue, Jun 06, 2023 at 03:30:02PM -0400, Robert Haas wrote: > On Mon, Jun 5, 2023 at 1:50 AM jiye wrote: > > > we can not get determinate test case as this issue reproduce only once, > > and currently autovaccum can works as we using vacuum freeze for each > > tables of each database. > > > >

Re: Improve join_search_one_level readibilty (one line change)

2023-06-06 Thread Julien Rouhaud
On Tue, 6 Jun 2023, 16:18 謝東霖, wrote: > Thank you to Julien Rouhaud and Tender Wang for the reviews. > > Julien's detailed guide has proven to be incredibly helpful, and I am > truly grateful for it. > Thank you so much for providing such valuable guidance! > > I have initi

Re: [PATCH] pg_regress.c: Fix "make check" on Mac OS X: Pass DYLD_LIBRARY_PATH

2023-06-06 Thread Julien Rouhaud
On Wed, Jun 7, 2023 at 5:44 AM Evan Jones wrote: > > On Tue, Jun 6, 2023 at 5:23 PM Peter Eisentraut wrote: >> >> This addresses only pg_regress. What about all the other test suites? >> Per the previous discussions, you'd need to patch up other places in a >> similar way, potentially

Re: [PATCH] pg_regress.c: Fix "make check" on Mac OS X: Pass DYLD_LIBRARY_PATH

2023-06-05 Thread Julien Rouhaud
Hi, On Mon, Jun 05, 2023 at 09:47:30AM -0400, Evan Jones wrote: > This makes "make check" work on Mac OS X. Without this patch, on Mac OS X a > default "./configure; make; make check" fails with errors like: > > dyld[65265]: Library not loaded: /usr/local/pgsql/lib/libpq.5.dylib > Referenced

Re: Improve join_search_one_level readibilty (one line change)

2023-06-04 Thread Julien Rouhaud
Hi, On Sat, Jun 03, 2023 at 05:24:43PM +0800, 謝東霖 wrote: > > Attached is my first patch for PostgreSQL, which is a simple one-liner > that I believe can improve the code. Welcome! > In the "join_search_one_level" function, I noticed that the variable > "other_rels_list" always refers to

Re: Should "REGRESS_OPTS = --temp-config" be working for 3rd party extensions?

2023-06-03 Thread Julien Rouhaud
On Sat, Jun 03, 2023 at 02:56:27PM +0300, Aleksander Alekseev wrote: > > I tried to use `REGRESS_OPTS = --temp-config` in order to test a 3rd > party extension with a custom .conf file similarly to how PostgreSQL > does it for src/test/modules/test_slru. It didn't work and "38.18. > Extension

Re: [PATCH] Slight improvement of worker_spi.c example

2023-06-03 Thread Julien Rouhaud
On Sat, Jun 03, 2023 at 02:38:26PM +0300, Aleksander Alekseev wrote: > Hi Julien, > > > I'm pretty sure that this is intentional. The worker can be launched > > dynamically and in that case it still needs a GUC for the naptime. > > The dynamic worker also is going to need worker_spi_database,

Re: [PATCH] Slight improvement of worker_spi.c example

2023-06-03 Thread Julien Rouhaud
On Sat, Jun 03, 2023 at 02:09:26PM +0300, Aleksander Alekseev wrote: > > Additionally I noticed that the check: > > ``` > if (!process_shared_preload_libraries_in_progress) > return; > ``` > > ... was misplaced in _PG_init(). Here is the patch v2 which fixes this too. I'm

Re: cutting down the TODO list thread

2023-05-16 Thread Julien Rouhaud
On Tue, 16 May 2023, 02:05 Matthias van de Meent, > > The result I got when searching for "automatic postgresql index > suggestions" was a combination of hypopg, pg_qualstats and some manual > glue to get suggested indexes in the current database - but none of > these are available in the main

Re: Missing update of all_hasnulls in BRIN opclasses

2023-05-06 Thread Julien Rouhaud
Hi, On Sun, May 07, 2023 at 12:13:07AM +0200, Tomas Vondra wrote: > > c) ignore the issue - AFAICS this would be an issue only for (external) > code accessing BrinMemTuple structs, but I don't think we're aware of > any out-of-core BRIN opclasses or anything like that ... FTR there's at least

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-05-02 Thread Julien Rouhaud
On Tue, 2 May 2023, 19:43 Julien Rouhaud, wrote: > Hi, > > On Tue, May 02, 2023 at 12:55:18PM +0200, Alvaro Herrera wrote: > > On 2023-Apr-07, Julien Rouhaud wrote: > > > > > That being said, I have a hard time believing that we could actually > preserve >

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-05-02 Thread Julien Rouhaud
Hi, On Tue, May 02, 2023 at 12:55:18PM +0200, Alvaro Herrera wrote: > On 2023-Apr-07, Julien Rouhaud wrote: > > > That being said, I have a hard time believing that we could actually > > preserve > > physical replication slots. I don't think that pg_upgrade f

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-04-24 Thread Julien Rouhaud
Hi, On Mon, Apr 24, 2023 at 12:03:05PM +, Hayato Kuroda (Fujitsu) wrote: > > > I think that this test should be different when just checking for the > > prerequirements (live_check / --check) compared to actually doing the > > upgrade, > > as it's almost guaranteed that the slots won't have

Re: pg_upgrade and logical replication

2023-04-24 Thread Julien Rouhaud
ks! v5 attached with all previously mentioned fixes. >From c6755ea3318220dc41bc315cc7acce4954e9b252 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Wed, 22 Feb 2023 09:19:32 +0800 Subject: [PATCH v5] Optionally preserve the full subscription's state during pg_upgrade Previously, only th

Re: pg_upgrade and logical replication

2023-04-24 Thread Julien Rouhaud
Hi, On Fri, Apr 14, 2023 at 04:19:35AM +, Hayato Kuroda (Fujitsu) wrote: > > I have tested, but srsublsn became NULL if copy_data was specified as off. > This is because when copy_data is false, all tuples in pg_subscription_rels > are filled > as state = 'r' and srsublsn = NULL, and

Re: pg_upgrade and logical replication

2023-04-24 Thread Julien Rouhaud
Hi, On Thu, Apr 13, 2023 at 03:26:56PM +1000, Peter Smith wrote: > > 1. > All the comments look alike, so it is hard to know what is going on. > If each of the main test parts could be highlighted then the test code > would be easier to read IMO. > > Something like below: > [...] I added a bit

Re: Mark a transaction uncommittable

2023-04-22 Thread Julien Rouhaud
Hi, On Sat, Apr 22, 2023 at 12:53:23PM -0400, Isaac Morland wrote: > > I have an application for this: creating various dev/test versions of data > from production. > > Start by restoring a copy of production from backup. Then successively > create several altered versions of the data and save

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-04-20 Thread Julien Rouhaud
Hi, On Thu, Apr 20, 2023 at 05:31:16AM +, Hayato Kuroda (Fujitsu) wrote: > Dear Vignesh, > > Thank you for reviewing! PSA new patchset. > > > > Additionally, I added a checking functions in 0003 > > > According to pg_resetwal and other functions, the length of > > CHECKPOINT_SHUTDOWN > > >

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-04-14 Thread Julien Rouhaud
scenario. Now such a change will make shutdown a bit more expensive when using logical replication, even if in 99% of cases you will not need to save the confirmed_flush_lsn value, so I don't know if that's acceptable or not. >From 77c3d2d361893de857627e036d0eaaf01cfe91c1 Mon Sep 17 00:00:00 2001 F

Re: pg_upgrade and logical replication

2023-04-13 Thread Julien Rouhaud
Hi, On Thu, Apr 13, 2023 at 12:42:05PM +1000, Peter Smith wrote: > Here are some review comments for patch v4-0001 (not the test code) Thanks! > > (There are some overlaps here with what Kuroda-san already posted > yesterday because we were looking at the same patch code. Also, a few > of my

Re: pg_upgrade and logical replication

2023-04-13 Thread Julien Rouhaud
On Thu, Apr 13, 2023 at 10:51:10AM +0800, Julien Rouhaud wrote: > > On Wed, Apr 12, 2023 at 09:48:15AM +, Hayato Kuroda (Fujitsu) wrote: > > > > 5. AlterSubscription > > > > ``` > > + supported_opts = SUBOPT_RE

Re: pg_upgrade and logical replication

2023-04-12 Thread Julien Rouhaud
Hi, On Wed, Apr 12, 2023 at 09:48:15AM +, Hayato Kuroda (Fujitsu) wrote: > > Thank you for updating the patch. I checked yours. > Followings are general or non-minor questions: Thanks! > 1. > Feature freeze for PG16 has already come. So I think there is no reason to > rush > making the

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-04-07 Thread Julien Rouhaud
On Fri, Apr 07, 2023 at 12:51:51PM +, Hayato Kuroda (Fujitsu) wrote: > Dear Julien, > > > > Agreed, but then shouldn't the option be named "--logical-slots-only" or > > > something like that, same for all internal function names? > > > > Seems right. Will be fixed in next version. Maybe > >

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-04-07 Thread Julien Rouhaud
On Fri, Apr 07, 2023 at 09:40:14AM +, Hayato Kuroda (Fujitsu) wrote: > > > As I mentioned in my original thread, I'm not very familiar with that code, > > but > > I'm a bit worried about "all the changes generated on publisher must be send > > and applied". Is that a hard requirement for the

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-04-06 Thread Julien Rouhaud
Hi, On Tue, Apr 04, 2023 at 07:00:01AM +, Hayato Kuroda (Fujitsu) wrote: > Dear hackers, > (CC: Amit and Julien) (thanks for the Cc) > This is a fork thread of Julien's thread, which allows to upgrade subscribers > without losing changes [1]. > > I briefly implemented a prototype for

Re: pg_upgrade and logical replication

2023-04-06 Thread Julien Rouhaud
7be5337e7 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Wed, 22 Feb 2023 09:19:32 +0800 Subject: [PATCH v4] Optionally preserve the full subscription's state during pg_upgrade Previously, only the subscription metadata information was preserved. Without the list of relations and t

Re: Schema variables - new implementation for Postgres 15

2023-04-06 Thread Julien Rouhaud
On Thu, Apr 6, 2023 at 1:58 AM Pavel Stehule wrote: > > st 5. 4. 2023 v 19:20 odesílatel Greg Stark napsal: >> >> On Sun, 26 Mar 2023 at 07:34, Julien Rouhaud wrote: >> > >> > This feature can significantly increase log size, so it's disabled by >>

Re: [EXTERNAL] Support load balancing in libpq

2023-03-30 Thread Julien Rouhaud
On Thu, Mar 30, 2023 at 3:03 PM Daniel Gustafsson wrote: > > > On 30 Mar 2023, at 03:48, Hayato Kuroda (Fujitsu) > > wrote: > > > While checking the buildfarm, I found a failure on NetBSD caused by the > > added code[1]: > > Thanks for reporting, I see that lapwing which runs Linux (Debian 7,

Re: [POC] Allow an extension to add data into Query and PlannedStmt nodes

2023-03-30 Thread Julien Rouhaud
Hi, On Wed, Mar 29, 2023 at 12:02:30PM +0500, Andrey Lepikhov wrote: > > Previously, we read int this mailing list some controversial opinions on > queryid generation and Jumbling technique. Here we don't intend to solve > these problems but help an extension at least don't conflict with others

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Julien Rouhaud
On Mon, Mar 27, 2023 at 02:06:34PM +0200, Daniel Gustafsson wrote: > > On 27 Mar 2023, at 14:04, Dagfinn Ilmari Mannsåker > > wrote: > > Daniel Gustafsson writes: > > >> Applied with a tiny but of changes to make it look like the rest of the > >> paragraph more. Thanks! > > > > Doesn't this

Re: pg_upgrade and logical replication

2023-03-27 Thread Julien Rouhaud
Hi, On Thu, Mar 09, 2023 at 04:34:56PM +0800, Julien Rouhaud wrote: > > Yeah I agree. I added support to also preserve the subscription's replication > origin information, a new --preserve-subscription-state (better naming > welcome) > documented option for pg_upgrade to

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Julien Rouhaud
On Mon, Mar 27, 2023 at 10:32:52AM +0200, Daniel Gustafsson wrote: > > On 27 Mar 2023, at 10:24, Julien Rouhaud wrote: > > > > Hi, > > > > On Wed, Feb 08, 2023 at 05:18:13PM -0500, Tom Lane wrote: > >> I pushed the discussed documentation improvements, and c

Re: MacOS: xsltproc fails with "warning: failed to load external entity"

2023-03-27 Thread Julien Rouhaud
how to get it working on such hardware. >From e51f1b13dc70798b37e9d8f4bb34664fe138dd86 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Mon, 27 Mar 2023 16:18:12 +0800 Subject: [PATCH] Fix XML_CATALOG_FILES env var for Apple M1 base machines. Author: Julien Rouhaud Reviewed-by: FIXME Discussion

Re: Schema variables - new implementation for Postgres 15

2023-03-26 Thread Julien Rouhaud
Hi, I just have a few minor wording improvements for the various comments / documentation you quoted. On Sun, Mar 26, 2023 at 08:53:49AM +0200, Pavel Stehule wrote: > út 21. 3. 2023 v 17:18 odesílatel Peter Eisentraut < > peter.eisentr...@enterprisedb.com> napsal: > > > - What is the purpose of

Re: pg_upgrade and logical replication

2023-03-23 Thread Julien Rouhaud
Hi, On Thu, Mar 23, 2023 at 04:27:28PM +0900, Masahiko Sawada wrote: > > I might be missing something but is there any reason why you created a > subscription before pg_upgrade? > > Steps like doing pg_upgrade, then creating missing tables, and then > creating a subscription (with copy_data =

Re: pg_dump versus hash partitioning

2023-03-17 Thread Julien Rouhaud
On Fri, Mar 17, 2023 at 01:44:12PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > On Thu, Mar 16, 2023 at 08:43:56AM -0400, Tom Lane wrote: > >> I think the odds of that yielding a usable dump are nil, so I don't > >> see why we should bother. > > >

Re: pg_dump versus hash partitioning

2023-03-16 Thread Julien Rouhaud
On Thu, Mar 16, 2023 at 08:43:56AM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > On Mon, Mar 13, 2023 at 07:39:12PM -0400, Tom Lane wrote: > >> Yeah, we need to do both. Attached find an updated patch series: > > > I didn't find a CF entry, is it intended? >

Re: pg_dump versus hash partitioning

2023-03-16 Thread Julien Rouhaud
On Mon, Mar 13, 2023 at 07:39:12PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > On Sun, Mar 12, 2023 at 03:46:52PM -0400, Tom Lane wrote: > >> The trick is to detect in pg_restore whether pg_dump chose to do > >> load-via-partition-root. > > > Gi

Re: pg_dump versus hash partitioning

2023-03-13 Thread Julien Rouhaud
On Sun, Mar 12, 2023 at 03:46:52PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > The BEGIN + TRUNCATE is only there to avoid generating WAL records just in > > case > > the wal_level is minimal. I don't remember if that optimization still > > exists, > >

Re: pg_dump versus hash partitioning

2023-03-10 Thread Julien Rouhaud
On Fri, Mar 10, 2023 at 10:10:14PM -0500, Tom Lane wrote: > Julien Rouhaud writes: > > Working on some side project that can cause dump of hash partitions to be > > routed to a different partition, I realized that --load-via-partition-root > > can > > indeed cause de

Re: pg_dump versus hash partitioning

2023-03-10 Thread Julien Rouhaud
On Tue, Feb 14, 2023 at 02:21:33PM -0500, Tom Lane wrote: > Here's a set of draft patches around this issue. > > 0001 does what I last suggested, ie force load-via-partition-root for > leaf tables underneath a partitioned table with a partitioned-by-hash > enum column. It wasn't quite as messy as

Re: Combine pg_walinspect till_end_of_wal functions with others

2023-03-10 Thread Julien Rouhaud
On Fri, 10 Mar 2023, 16:14 Michael Paquier, wrote: > On Fri, Mar 10, 2023 at 04:04:15PM +0800, Julien Rouhaud wrote: > > As long as we provide a sensible default value (so I guess '0/0' to > > mean "no upper bound") and that we therefore don't have to manually > &g

Re: Combine pg_walinspect till_end_of_wal functions with others

2023-03-10 Thread Julien Rouhaud
On Fri, Mar 10, 2023 at 12:24 PM Michael Paquier wrote: > > On Wed, Mar 08, 2023 at 01:40:46PM +0530, Bharath Rupireddy wrote: > > 1. When start_lsn is NULL or invalid ('0/0'), emit an error. There was > > a comment on the functions automatically determining start_lsn to be > > the oldest WAL

Re: pg_upgrade and logical replication

2023-03-09 Thread Julien Rouhaud
Hi, On Thu, Mar 09, 2023 at 12:05:36PM +0530, Amit Kapila wrote: > On Wed, Mar 8, 2023 at 12:26 PM Julien Rouhaud wrote: > > > > Is there something that can be done for pg16? I was thinking that having a > > fix for the normal and easy case could be acceptable: only al

Re: pg_upgrade and logical replication

2023-03-07 Thread Julien Rouhaud
On Sat, 4 Mar 2023, 14:13 Amit Kapila, wrote: > > > For the publisher nodes, that may be something nice to support (I'm > assuming it > > could be useful for more complex replication setups) but I'm not > interested in > > that at the moment as my goal is to reduce downtime for major upgrade of

Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?

2023-03-06 Thread Julien Rouhaud
On Tue, Mar 07, 2023 at 07:14:51PM +1300, Thomas Munro wrote: > On Tue, Mar 7, 2023 at 5:32 PM Michael Paquier wrote: > > On Tue, Mar 07, 2023 at 03:44:46PM +1300, Thomas Munro wrote: > > > Oh, you already pushed a fix. But now I'm wondering if it's useful to > > > have old buggy compilers set

Re: Combine pg_walinspect till_end_of_wal functions with others

2023-03-06 Thread Julien Rouhaud
On Tue, Mar 07, 2023 at 01:56:24PM +0900, Michael Paquier wrote: > On Tue, Mar 07, 2023 at 12:42:20PM +0800, Julien Rouhaud wrote: > > ah right I should have checked. but the same ABI compatibility concern > > still exists for version 1.0 of the extension. > > Yes,

Re: Combine pg_walinspect till_end_of_wal functions with others

2023-03-06 Thread Julien Rouhaud
On Tue, 7 Mar 2023, 12:36 Michael Paquier, wrote: > On Tue, Mar 07, 2023 at 09:13:46AM +0800, Julien Rouhaud wrote: > > It's problematic to install the extension if we rely on upgrade scripts > only. > > We could also provide a pg_walinspect--1.2.sql file and it

Re: proposal: possibility to read dumped table's name from file

2023-03-06 Thread Julien Rouhaud
Hi, On Mon, Mar 06, 2023 at 10:20:32PM +0100, Daniel Gustafsson wrote: > > On 6 Mar 2023, at 21:45, Gregory Stark (as CFM) wrote: > > > > So This patch has been through a lot of commitfests. And it really > > doesn't seem that hard to resolve -- Pavel has seemingly been willing > > to go

  1   2   3   4   5   6   7   8   9   10   >