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

2022-02-21 Thread Fujii Masao
On 2022/02/22 15:41, kuroda.hay...@fujitsu.com wrote: Cfbot is still angry because of missing PGDLLIMPORT, so attached. Thanks for updating the patches! The connection check timer is re-scheduled repeatedly even while the backend is in idle state or is running a local transaction that does

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

2022-02-21 Thread kuroda.hay...@fujitsu.com
Cfbot is still angry because of missing PGDLLIMPORT, so attached. Best Regards, Hayato Kuroda FUJITSU LIMITED v12_0001_add_checking_infrastracture.patch Description: v12_0001_add_checking_infrastracture.patch v12_0002_add_health_check.patch Description: v12_0002_add_health_check.patch v12_0

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

2022-02-21 Thread Nitin Jadhav
> > Thank you for sharing the information. 'triggering backend PID' (int) > > - can be stored without any problem. 'checkpoint or restartpoint?' > > (boolean) - can be stored as a integer value like > > PROGRESS_CHECKPOINT_TYPE_CHECKPOINT(0) and > > PROGRESS_CHECKPOINT_TYPE_RESTARTPOINT(1). 'elaps

Re: Patch a potential memory leak in describeOneTableDetails()

2022-02-21 Thread Kyotaro Horiguchi
At Mon, 21 Feb 2022 10:24:23 +0100, Daniel Gustafsson wrote in > I think it's because you've indented your new code differently from the > existing, such that the if (res) clause is indented equally to the previous > pg_free(tableinfo.relam) call, making it look like they are in the same block:

Re: Optionally automatically disable logical replication subscriptions on error

2022-02-21 Thread Peter Smith
On Tue, Feb 22, 2022 at 3:11 PM osumi.takami...@fujitsu.com wrote: > > On Tuesday, February 22, 2022 7:53 AM Peter Smith > wrote: > > On Mon, Feb 21, 2022 at 11:44 PM osumi.takami...@fujitsu.com > > wrote: > > > > > > On Monday, February 21, 2022 2:56 PM Peter Smith > > wrote: > > > > Thanks f

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-21 Thread Masahiko Sawada
On Mon, Feb 21, 2022 at 6:19 PM Amit Kapila wrote: > > On Mon, Feb 21, 2022 at 1:18 PM Andres Freund wrote: > > > > On 2022-02-21 12:39:31 +0530, Amit Kapila wrote: > > > Fair enough. Then, how about the following keeping the following > > > information: > > > > Mostly sounds good. > > > > > > >

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

2022-02-21 Thread kuroda.hay...@fujitsu.com
Dear Fujii-san, > cfbot is reporting that the 0002 patch fails to be applied cleanly. Could you > update > the patch? > http://cfbot.cputube.org/patch_37_3388.log Thanks for reporting and sorry for inconvenience. I repo was not latest version. Attached can be applied to 52e4f0c Best Regards, Ha

Re: logical replication empty transactions

2022-02-21 Thread Peter Smith
FYI - the latest v18 patch no longer applies due to a recent push [1]. -- [1] https://github.com/postgres/postgres/commit/52e4f0cd472d39d07732b99559989ea3b615be78 Kind Regards, Peter Smith. Fujitsu Australia

RE: Optionally automatically disable logical replication subscriptions on error

2022-02-21 Thread osumi.takami...@fujitsu.com
On Tuesday, February 22, 2022 7:53 AM Peter Smith wrote: > On Mon, Feb 21, 2022 at 11:44 PM osumi.takami...@fujitsu.com > wrote: > > > > On Monday, February 21, 2022 2:56 PM Peter Smith > wrote: > > > Thanks for addressing my previous comments. Now I have looked at v19. > > > > > > On Mon, Feb 2

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

2022-02-21 Thread Fujii Masao
On 2022/02/22 11:53, kuroda.hay...@fujitsu.com wrote: How do you think? Thanks for updating the patches! I will read them. cfbot is reporting that the 0002 patch fails to be applied cleanly. Could you update the patch? http://cfbot.cputube.org/patch_37_3388.log Regards, -- Fujii Masao Ad

RE: Logical replication timeout problem

2022-02-21 Thread wangw.f...@fujitsu.com
On Fri, Feb 18, 2022 at 10:51 AM Ajin Cherian wrote: > Some comments: Thanks for your review. > I see you only track skipped Inserts/Updates and Deletes. What about > DDL operations that are skipped, what about truncate. > What about changes made to unpublished tables? I wonder if you could > cr

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-21 Thread Amit Kapila
On Mon, Feb 21, 2022 at 9:37 PM David G. Johnston wrote: > > On Mon, Feb 21, 2022 at 2:19 AM Amit Kapila wrote: >> >> On Mon, Feb 21, 2022 at 1:18 PM Andres Freund wrote: >> >> > > The view name could be pg_stat_subscription_lrep, >> > > pg_stat_logical_replication, or something on those lines.

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

2022-02-21 Thread kuroda.hay...@fujitsu.com
Dear Horiguchi-san, Fujii-san, > > I understood here as removing following mechanism from core: > > > > * disable timeout at end of tx. > > * skip if held off or read commands > > I think we're on the same page. Anyway query cancel interrupt is > ignored while rading input. > > > > - If an exist

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

2022-02-21 Thread kuroda.hay...@fujitsu.com
Dear Fujii-san, > Isn't it a very special case where many FDWs use their own user timeouts? > Could > you tell me the assumption that you're thinking, especially how many FDWs are > working? I came up with the case like star schema, which postgres database connects data store. If each dbms are

Re: pg_stat_get_replication_slot and pg_stat_get_subscription_worker incorrectly marked as proretset

2022-02-21 Thread Michael Paquier
On Mon, Feb 21, 2022 at 05:00:43PM +0530, Amit Kapila wrote: > On Mon, Feb 21, 2022 at 4:56 PM Michael Paquier wrote: >> That's the same thing as what I sent upthread, so that's correct to >> me, except that I have fixed both functions :) > > Sorry, I hadn't looked at your patch. That's fine. T

Re: shared_preload_libraries = 'pg_stat_statements' failing with installcheck (compute_query_id = auto)

2022-02-21 Thread Michael Paquier
On Fri, Feb 18, 2022 at 05:38:56PM +0800, Julien Rouhaud wrote: > On Fri, Feb 18, 2022 at 05:22:36PM +0900, Michael Paquier wrote: >> So, I have been looking at this problem, and I don't see a problem in >> doing something like the attached, where we add a "regress" mode to >> compute_query_id that

RE: Failed transaction statistics to measure the logical replication progress

2022-02-21 Thread osumi.takami...@fujitsu.com
On Tuesday, February 22, 2022 10:15 AM Tang, Haiying/唐 海英 wrote: > On Mon, Feb 21, 2022 11:46 AM osumi.takami...@fujitsu.com > wrote: > > > > On Saturday, February 19, 2022 12:00 AM osumi.takami...@fujitsu.com > > wrote: > > > On Friday, February 18, 2022 3:34 PM Tang, Haiying/唐 海英 > > > wrote

remove more archiving overhead

2022-02-21 Thread Nathan Bossart
Hi hackers, With the addition of archive modules (5ef1eef) and other archiving improvements (e.g., beb4e9b), the amount of archiving overhead has been reduced. I spent some time measuring the remaining overhead, and the following function stood out: /* * pgarch_archiveDone

RE: Failed transaction statistics to measure the logical replication progress

2022-02-21 Thread tanghy.f...@fujitsu.com
On Mon, Feb 21, 2022 11:46 AM osumi.takami...@fujitsu.com wrote: > > On Saturday, February 19, 2022 12:00 AM osumi.takami...@fujitsu.com > wrote: > > On Friday, February 18, 2022 3:34 PM Tang, Haiying/唐 海英 > > wrote: > > > On Wed, Jan 12, 2022 8:35 PM osumi.takami...@fujitsu.com > > > wrote:

Re: Trap errors from streaming child in pg_basebackup to exit early

2022-02-21 Thread Michael Paquier
On Mon, Feb 21, 2022 at 03:11:30PM +0100, Daniel Gustafsson wrote: >On 21 Feb 2022, at 03:03, Michael Paquier wrote: >> +is($node->poll_query_until('postgres', >> + "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE " . >> + "application_name = '010_pg_basebackup.pl' AND wait_event

Re: postgres_fdw: using TABLESAMPLE to collect remote sample

2022-02-21 Thread Fujii Masao
On 2022/02/18 22:28, Tomas Vondra wrote: Hi, here's a slightly updated version of the patch series. Thanks for updating the patches! The 0001 part adds tracking of server_version_num, so that it's possible to enable other features depending on it. Like configure_remote_session() does,

Re: speed up a logical replica setup

2022-02-21 Thread Euler Taveira
On Mon, Feb 21, 2022, at 8:28 PM, Andres Freund wrote: > I think the system identifier should also be changed, otherwise you can way > too easily get into situations trying to apply WAL from different systems to > each other. Not going to end well, obviously. Good point. > > This tool does not tak

Re: speed up a logical replica setup

2022-02-21 Thread Andres Freund
Hi, On 2022-02-21 09:09:12 -0300, Euler Taveira wrote: > Logical replication has been used to migration with minimal downtime. However, > if you are dealing with a big database, the amount of required resources (disk > -- due to WAL retention) increases as the backlog (WAL) increases. Unless you >

Re: row filtering for logical replication

2022-02-21 Thread Euler Taveira
On Thu, Feb 17, 2022, at 3:36 AM, Amit Kapila wrote: > As there is a new version, I would like to wait for a few more days > before committing. I am planning to commit this early next week (by > Tuesday) unless others or I see any more things that can be improved. Amit, I don't have additional comm

TAP output format in pg_regress

2022-02-21 Thread Daniel Gustafsson
Starting a new thread on the TAP patch from the "[RFC] building postgres with meson" thread at 20220221165228.aqnfg45mceym7...@alap3.anarazel.de to have somewhere to discuss this patch. > On 21 Feb 2022, at 17:52, Andres Freund wrote: > On 2021-10-13 13:54:10 +0200, Daniel Gustafsson wrote: >> I

Re: Optionally automatically disable logical replication subscriptions on error

2022-02-21 Thread Peter Smith
On Mon, Feb 21, 2022 at 11:44 PM osumi.takami...@fujitsu.com wrote: > > On Monday, February 21, 2022 2:56 PM Peter Smith > wrote: > > Thanks for addressing my previous comments. Now I have looked at v19. > > > > On Mon, Feb 21, 2022 at 11:25 AM osumi.takami...@fujitsu.com > > wrote: > > > > > >

Re: List of all* PostgreSQL EXTENSIONs in the world

2022-02-21 Thread Joel Jacobson
On Mon, Feb 21, 2022, at 21:16, Joel Jacobson wrote: > As a first attempt, I've added the description from the Github-repos, and two > categories to start the discussion: > > - Uncategorized > - Foreign Data Wrappers Some more categories added: - Access Methods - Aggregate Functions - Data Types

Re: External data files possible?

2022-02-21 Thread Andres Freund
Hi, On 2022-02-21 15:16:31 -0600, Chris Cleveland wrote: > It's turning out to be difficult to store the data for my custom index > access method in the main fork. Breaking up the data into pages with page > headers means a lot of extra work, a big performance hit, and disk space > management head

Re: Emit a warning if the extension's GUC is set incorrectly

2022-02-21 Thread Florin Irion
Il lun 21 feb 2022, 20:12 Tom Lane ha scritto: > I wrote: > > Florin Irion writes: > >> For what it's worth, I agree with throwing an ERROR if the placeholder > is > >> unrecognized. Initially, I didn't want to change too much the liberty of > >> setting any placeholder, but mainly to not go unn

External data files possible?

2022-02-21 Thread Chris Cleveland
It's turning out to be difficult to store the data for my custom index access method in the main fork. Breaking up the data into pages with page headers means a lot of extra work, a big performance hit, and disk space management headaches. It's just not a good fit for my particular file format. It

Re: Documentation about PL transforms

2022-02-21 Thread Chapman Flack
On 02/07/22 15:14, Chapman Flack wrote: > I'll work on some doc patches. It seems a bit of an impedance mismatch that there is a get_func_trftypes producing a C Oid[] (with its length returned separately), while get_transform_fromsql and get_transform_tosql both expect a List. There is only one i

Re: Reducing power consumption on idle servers

2022-02-21 Thread Simon Riggs
On Mon, 21 Feb 2022 at 16:49, Chapman Flack wrote: > Shouldn't the comment be "with work_done=false" ? Good catch, thanks. I've also added docs to say that "promote_trigger_file" is now deprecated. There were no tests for that functionality, so just as well it is being removed. v3 attached.

Re: Time to drop plpython2?

2022-02-21 Thread Tom Lane
Mark Wong writes: > On Sat, Feb 19, 2022 at 08:22:29AM -0800, Andres Freund wrote: >> Unfortunately it looks like it wasn't quite enough. All, or nearly all, your >> animals that ran since still seem to be failing in the same spot... > Oops, made another pass for python3 dev libraries. You might

Re: List of all* PostgreSQL EXTENSIONs in the world

2022-02-21 Thread Joel Jacobson
On Thu, Feb 10, 2022, at 21:35, Robert Haas wrote: > I think a list like this is probably not useful without at least a > brief description of each one, and maybe some attempt at > categorization. +1 As a first attempt, I've added the description from the Github-repos, and two categories to star

Re: Emit a warning if the extension's GUC is set incorrectly

2022-02-21 Thread Tom Lane
I wrote: > Florin Irion writes: >> For what it's worth, I agree with throwing an ERROR if the placeholder is >> unrecognized. Initially, I didn't want to change too much the liberty of >> setting any placeholder, but mainly to not go unnoticed. > I also think that this is probably a good change t

Re: Add index scan progress to pg_stat_progress_vacuum

2022-02-21 Thread Nathan Bossart
On Mon, Feb 21, 2022 at 07:03:39PM +, Imseih (AWS), Sami wrote: > Sending again with patch files renamed to ensure correct apply order. I haven't had a chance to test this too much, but I did look through the patch set and have a couple of small comments. + + + indexes_total

Re: making pg_regress less noisy by removing boilerplate

2022-02-21 Thread Andres Freund
Hi, On 2022-02-21 12:40:18 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-02-21 12:05:42 -0500, Tom Lane wrote: > >> except maybe the "running on port 51696 with PID 1156405" line (and I'm not > >> too wedded to that)? > > > We still have a few issues with ports conflicts on windows.

Re: Time to drop plpython2?

2022-02-21 Thread Andres Freund
Hi, On 2022-02-21 09:49:32 -0800, Mark Wong wrote: > Oops, made another pass for python3 dev libraries. Thanks! > I can't seem to find archived ppc repos OpenSUSE Leap 43.2. I'm > debating whether to disable python or upgrade/rebrand that animal for a > newer SUSE release. I've stopped my cro

Re: Add DBState to pg_control_system function

2022-02-21 Thread Fujii Masao
On 2022/02/01 13:22, Bharath Rupireddy wrote: Hi, I think emitting DBState (staring up, shut down, shut down in recovery, shutting down, in crash recovery, in archive recovery, in production) via the pg_control_system function would help know the database state, especially during PITR/archive

Re: Time to drop plpython2?

2022-02-21 Thread Mark Wong
On Sat, Feb 19, 2022 at 08:22:29AM -0800, Andres Freund wrote: > Hi, > > On 2022-02-19 02:00:28 +, Mark Wong wrote: > > On Fri, Feb 18, 2022 at 02:41:04PM -0800, Andres Freund wrote: > > > There's snapper ("pgbf [ a t ] twiska.com"), and there's Mark Wong's large > > > menagerie. Mark said yes

Re: making pg_regress less noisy by removing boilerplate

2022-02-21 Thread Tom Lane
Andres Freund writes: > On 2022-02-21 12:05:42 -0500, Tom Lane wrote: >> except maybe the "running on port 51696 with PID 1156405" line (and I'm not >> too wedded to that)? > We still have a few issues with ports conflicts on windows. We should really > consider just desupporting all windows vers

Re: RFC: Logging plan of the running query

2022-02-21 Thread Fujii Masao
On 2022/02/09 0:12, torikoshia wrote: BTW, since the above example results in calling ExecutorRun() only once, the output didn't differ even after ActiveQueryDesc is reset to save_ActiveQueryDesc. The below definition of test() worked as expected.  create or replace function test () retur

Re: making pg_regress less noisy by removing boilerplate

2022-02-21 Thread Andres Freund
Hi, On 2022-02-21 12:05:42 -0500, Tom Lane wrote: > Also, those steps typically run a lot faster than they did then > (both software speedups, and most people use better hardware). > We no longer need that output to reassure ourselves that progress > is being made. Indeed. > > It seems we could

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-02-21 Thread Nathan Bossart
I've attached an updated patch. On Fri, Feb 18, 2022 at 10:48:10PM +0530, Ashutosh Sharma wrote: > +* runningBackups is a counter indicating the number of backups currently > in > +* progress. forcePageWrites is set to true when either of these is > +* non-zero. lastBackupStart is the

Re: show schema.collate in explain(verbose on)

2022-02-21 Thread Tom Lane
"wangsh.f...@fujitsu.com" writes: > Since the schema name of relation/function name will be outputted in > explain's result when verbose(on) is specified. I plan to output the schema > name of collation as well as relation/function. While that's not unreasonable in principle, it seems like it'

Re: making pg_regress less noisy by removing boilerplate

2022-02-21 Thread Tom Lane
Andres Freund writes: > When running check-world, a good chunk of the output is just pg_regress > boilerplate. It doesn't matter when running tests individually or for tests > with a lot of individual tests like the main regression tests. But for lots of > the rest it is noisy. These days there ar

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-21 Thread Fujii Masao
On 2022/02/14 14:40, Kyotaro Horiguchi wrote: For backbranches, the attached for pg14 does part of the full patch. Thanks for updating the patch! Of the following, I think we should do (a) and (b) to make future backpatchings easier. a) Use RedoRecPtr and PriorRedoPtr after they are assi

Re: [RFC] building postgres with meson

2022-02-21 Thread Andres Freund
Hi, On 2021-10-13 13:54:10 +0200, Daniel Gustafsson wrote: > I added a --tap option for TAP output to pg_regress together with Jinbao Chen > for giggles and killing some time a while back. Sorry for not replying to this earlier. I somehow thought I had, but the archives disagree. I think this wo

Re: Reducing power consumption on idle servers

2022-02-21 Thread Chapman Flack
Hi, On 02/21/22 11:11, Simon Riggs wrote: > This patch seeks to change the situation for the better in PG15, i.e. > soon, so the changes proposed are deliberately light. It also seeks to > provide a framework that writers of background worker processes can > follow, since we can't just fix core, w

making pg_regress less noisy by removing boilerplate

2022-02-21 Thread Andres Freund
Hi, When running check-world, a good chunk of the output is just pg_regress boilerplate. It doesn't matter when running tests individually or for tests with a lot of individual tests like the main regression tests. But for lots of the rest it is noisy. These days there are many more regression tes

Re: pg_upgrade verbosity when redirecting output to log file

2022-02-21 Thread Andres Freund
On 2022-02-21 15:29:09 +0100, Daniel Gustafsson wrote: > > On 21 Feb 2022, at 02:07, Andres Freund wrote: > > > Baring that, anybody against committing this? > > LGTM. The above mentioned comment was the only thing I found as well. Thanks for the review Justin and Daniel. Pushed.

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-21 Thread David G. Johnston
On Sun, Feb 20, 2022 at 10:10 PM Amit Kapila wrote: > On Sat, Feb 19, 2022 at 10:35 PM David G. Johnston > wrote: > > > > On Sat, Feb 19, 2022 at 9:37 AM Andres Freund > wrote: > >> > >> IMO the type of information you'd want for apply failures is > substantially > >> > >> different enough from

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-21 Thread Andres Freund
Hi, On 2022-02-21 14:49:01 +0530, Amit Kapila wrote: > On Mon, Feb 21, 2022 at 1:18 PM Andres Freund wrote: > > > * stats_reset (Time at which these statistics were last reset) > > > > > > The view name could be pg_stat_subscription_lrep, > > > pg_stat_logical_replication, or something on those l

Support logical replication of DDLs

2022-02-21 Thread Zheng Li
Hello, One of the most frequently requested improvements from our customers is to reduce downtime associated with software updates (both major and minor versions). To do this, we have reviewed potential contributions to improving logical replication. I’m working on a patch to support logical repl

Re: Reducing power consumption on idle servers

2022-02-21 Thread Simon Riggs
On Sat, 19 Feb 2022 at 17:03, Andres Freund wrote: > > Hi, > > On 2022-02-19 14:10:39 +, Simon Riggs wrote: > > Some years ago we did a pass through the various worker processes to > > add hibernation as a mechanism to reduce power consumption on an idle > > server. Replication never got the m

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-21 Thread David G. Johnston
On Mon, Feb 21, 2022 at 2:19 AM Amit Kapila wrote: > On Mon, Feb 21, 2022 at 1:18 PM Andres Freund wrote: > > > > The view name could be pg_stat_subscription_lrep, > > > pg_stat_logical_replication, or something on those lines. > > > > pg_stat_subscription_stats :) > > > > Having *stat* two time

Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

2022-02-21 Thread Fujii Masao
On 2022/02/21 14:45, Etsuro Fujita wrote: On Fri, Feb 18, 2022 at 1:46 AM Fujii Masao wrote: I reviewed 0001 patch. It looks good to me except the following minor things. If these are addressed, I think that the 001 patch can be marked as ready for committer. OK +* Also determi

Re: Using Test::More test functions for pg_rewind

2022-02-21 Thread Andrew Dunstan
On 2/21/22 09:10, Daniel Gustafsson wrote: > check_query() in RewindTest.pm currently has this comment before handrolling > tests for return code and stderr: > > # We don't use ok() for the exit code and stderr, because we want this > # check to be just a single test. > > The code came with t

Re: pg_upgrade verbosity when redirecting output to log file

2022-02-21 Thread Daniel Gustafsson
> On 21 Feb 2022, at 02:07, Andres Freund wrote: > Baring that, anybody against committing this? LGTM. The above mentioned comment was the only thing I found as well. -- Daniel Gustafsson https://vmware.com/

Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2022-02-21 Thread Maxim Orlov
I've updated the patch due to recent changes by Daniel Gustafsson (549ec201d6132b7). -- Best regards, Maxim Orlov. v10-0001-Add-option-for-amcheck-and-pg_amcheck-to-check-u.patch Description: Binary data

Re: Trap errors from streaming child in pg_basebackup to exit early

2022-02-21 Thread Daniel Gustafsson
> On 21 Feb 2022, at 03:03, Michael Paquier wrote: > > On Fri, Feb 18, 2022 at 10:00:43PM +0100, Daniel Gustafsson wrote: >> This is good idea, I was going in a different direction earlier with a test >> but >> this is cleaner. The attached 0001 refactors pump_until; 0002 fixes a >> trivial >>

Using Test::More test functions for pg_rewind

2022-02-21 Thread Daniel Gustafsson
check_query() in RewindTest.pm currently has this comment before handrolling tests for return code and stderr: # We don't use ok() for the exit code and stderr, because we want this # check to be just a single test. The code came with the initial import of pg_rewind, and there is no further e

Re: Separate the result of \watch for each query execution (psql)

2022-02-21 Thread Noboru Saito
Thank you for your reply. 2022年2月21日(月) 14:52 Pavel Stehule : > > Hi > > po 21. 2. 2022 v 6:19 odesílatel Noboru Saito napsal: >> >> I need a way to separate the results of \watch for each query execution. >> >> There is only a blank line between the results of \watch. >> However, there is also

Re: initdb / bootstrap design

2022-02-21 Thread Peter Eisentraut
On 20.02.22 01:39, Tom Lane wrote: Hm, wouldn't it be less code to just use printf? Meh --- it'd be different from the way we do it in the rest of initdb, and it would not be "less code". Maybe it'd run a shade faster, but I refuse to believe that that'd be enough to matter. There is a PG_CMD

RE: Optionally automatically disable logical replication subscriptions on error

2022-02-21 Thread osumi.takami...@fujitsu.com
On Monday, February 21, 2022 2:56 PM Peter Smith wrote: > Thanks for addressing my previous comments. Now I have looked at v19. > > On Mon, Feb 21, 2022 at 11:25 AM osumi.takami...@fujitsu.com > wrote: > > > > On Friday, February 18, 2022 3:27 PM Peter Smith > wrote: > > > Hi. Below are my code

speed up a logical replica setup

2022-02-21 Thread Euler Taveira
Hi, Logical replication has been used to migration with minimal downtime. However, if you are dealing with a big database, the amount of required resources (disk -- due to WAL retention) increases as the backlog (WAL) increases. Unless you have a generous amount of resources and can wait for long

Re: set TESTDIR from perl rather than Makefile

2022-02-21 Thread Andrew Dunstan
On 2/19/22 18:53, Justin Pryzby wrote: > On Sat, Feb 19, 2022 at 05:41:49PM -0600, Justin Pryzby wrote: >> I rebased and fixed the check-guc script to work, made it work with vpath >> builds, and cleaned it up some. > I also meant to also attach it. This is going to break a bunch of stuff as wr

Re: pg_stat_get_replication_slot and pg_stat_get_subscription_worker incorrectly marked as proretset

2022-02-21 Thread Amit Kapila
On Mon, Feb 21, 2022 at 4:56 PM Michael Paquier wrote: > > On Mon, Feb 21, 2022 at 04:19:59PM +0530, Amit Kapila wrote: > > On Mon, Feb 21, 2022 at 11:21 AM Masahiko Sawada > > wrote: > >> Agreed. > >> > > > > +1. How about attached? > > That's the same thing as what I sent upthread, so that's c

Re: pg_stat_get_replication_slot and pg_stat_get_subscription_worker incorrectly marked as proretset

2022-02-21 Thread Michael Paquier
On Mon, Feb 21, 2022 at 04:19:59PM +0530, Amit Kapila wrote: > On Mon, Feb 21, 2022 at 11:21 AM Masahiko Sawada > wrote: >> Agreed. >> > > +1. How about attached? That's the same thing as what I sent upthread, so that's correct to me, except that I have fixed both functions :) You are not touc

Re: pg_stat_get_replication_slot and pg_stat_get_subscription_worker incorrectly marked as proretset

2022-02-21 Thread Amit Kapila
On Mon, Feb 21, 2022 at 11:21 AM Masahiko Sawada wrote: > > > > > I am aware about the discussions on the parent view for the first > > case and its design issues, but it does not change the fact that we'd > > better address the second case on HEAD IMO. > > > > Thoughts? > > Agreed. > +1. How abo

Re: pgcrypto: Remove internal padding implementation

2022-02-21 Thread Peter Eisentraut
On 15.02.22 00:07, Jacob Champion wrote: After this patch, bad padding is no longer ignored during decryption, and encryption without padding now requires the input size to be a multiple of the block size. To see the difference you can try the following queries with and without the patch: s

show schema.collate in explain(verbose on)

2022-02-21 Thread wangsh.f...@fujitsu.com
Hi, The comment of get_collation_name wrote: * NOTE: since collation name is not unique, be wary of code that uses this * for anything except preparing error messages. In file explain.c, the function get_collation_name() is called, but the schema name won't be outputted. Since the sche

RE: Failed transaction statistics to measure the logical replication progress

2022-02-21 Thread osumi.takami...@fujitsu.com
On Monday, February 21, 2022 6:06 PM Monday, February 21, 2022 6:06 PM wrote: > On Mon, Feb 21, 2022 11:46 AM Osumi, Takamichi/大墨 昂道 > wrote: > >I've addressed this point in a new v23 patch, since there was no opinion on > this so far. > >Kindly have a look at the attached one. > Thanks for updati

Re: Patch a potential memory leak in describeOneTableDetails()

2022-02-21 Thread Daniel Gustafsson
> On 21 Feb 2022, at 09:30, Kyotaro Horiguchi wrote: > (However, I got a mysterious -Wmisleading-indentation warning with this..) > >> describe.c: In function ‘describeOneTableDetails’: >> describe.c:3420:5: warning: this ‘if’ clause does not guard... >> [-Wmisleading-indentation] >> if (ta

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-21 Thread Amit Kapila
On Mon, Feb 21, 2022 at 1:18 PM Andres Freund wrote: > > On 2022-02-21 12:39:31 +0530, Amit Kapila wrote: > > Fair enough. Then, how about the following keeping the following > > information: > > Mostly sounds good. > > > > * subid (subscription id) > > * subname (subscription name) > > Coming fr

Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.

2022-02-21 Thread Yura Sokolov
В Сб, 12/02/2022 в 16:56 +0530, Bharath Rupireddy пишет: > On Fri, Feb 11, 2022 at 7:56 PM Yura Sokolov wrote: > > В Сб, 16/10/2021 в 16:37 +0530, Bharath Rupireddy пишет: > > > On Thu, Oct 14, 2021 at 10:56 AM Fujii Masao > > > wrote: > > > > On 2021/10/12 15:46, Bharath Rupireddy wrote: > > > >

RE: Failed transaction statistics to measure the logical replication progress

2022-02-21 Thread wangw.f...@fujitsu.com
On Mon, Feb 21, 2022 11:46 AM Osumi, Takamichi/大墨 昂道 wrote: >I've addressed this point in a new v23 patch, since there was no opinion on >this so far. >Kindly have a look at the attached one. Thanks for updating the patch. Here is a comment: In function apply_handle_stream_abort: @@ -1217,6 +12

Re: Patch a potential memory leak in describeOneTableDetails()

2022-02-21 Thread Kyotaro Horiguchi
At Fri, 18 Feb 2022 16:12:34 +0800 (GMT+08:00), wli...@stu.xidian.edu.cn wrote in > I find a potential memory leak in PostgresSQL 14.1, which is in the function > describeOneTableDetails (./src/bin/psql/describe.c). The bug has been > confirmed by an auditor of . > > Specifically, at line 1603

Re: BufferAlloc: don't take two simultaneous locks

2022-02-21 Thread Yura Sokolov
Good day, Kyotaro Horiguchi and hackers. В Чт, 17/02/2022 в 14:16 +0900, Kyotaro Horiguchi пишет: > At Wed, 16 Feb 2022 10:40:56 +0300, Yura Sokolov > wrote in > > Hello, all. > > > > I thought about patch simplification, and tested version > > without BufTable and dynahash api change at all.

Re: Assert in pageinspect with NULL pages

2022-02-21 Thread Michael Paquier
On Mon, Feb 21, 2022 at 10:00:00AM +0300, Alexander Lakhin wrote: > Could you please confirm before committing the patchset that it fixes > the bug #16527 [1]? Or maybe I could check it? > (Original patch proposed by Daria doesn't cover that case, but if the > patch going to be improved, probably i