Re: ARRNELEMS Out-of-bounds possible errors

2022-12-23 Thread Kyotaro Horiguchi
ms() calls that function with a NULL escontext and the NULL turns ereturn() into ereport(). That doesn't seem to be changed by the commit. Of course teaching Coverity not to issue the false warnings would be another actual issue that we should do, maybe. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Force streaming every change in logical decoding

2022-12-22 Thread Kyotaro Horiguchi
parameters set by > CREATE SUBSCRIPTION) is enabled, otherwise, serialize each change. Looks fine. Thanks! regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Exit walsender before confirming remote flush in logical replication

2022-12-22 Thread Kyotaro Horiguchi
worker sending a kind of crafted feedback, which reports commit_data.end_lsn as flushpos? A little tweak is needed in send_feedback() but seems to work.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Force streaming every change in logical decoding

2022-12-22 Thread Kyotaro Horiguchi
27;normal' as Kuroda-san proposed, as the default value. Oh. I missed this, and agree to have the explicit default option. I slightly prefer "buffered" but "normal" also works fine for me. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-22 Thread Kyotaro Horiguchi
hardly be associated by appearance by readers, I think. (Yeah, we can identify that since the another parameter is identifiable alone.) Why don't we spell out the parameter simply as "segment number"? regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Force streaming every change in logical decoding

2022-12-21 Thread Kyotaro Horiguchi
mpty string, which is the default, +decoding will stream or serialize changes when +logical_decoding_work_mem is reached. With (really) fresh eyes, I took a bit long time to understand what the "streaming" option is. Couldn't we augment the description by a bit? regards

Re: Inconsistency in reporting checkpointer stats

2022-12-21 Thread Kyotaro Horiguchi
gt; > the main buffer pool. It sounds reasonable to exclude SRLU write from buffer writes. But I'm not sure its useful to count SLRU writes separately since it is under the noise level of buffer writes in reglular cases and the value doesn't lead to tuning. However I'm not strongly opposed to adding it either. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Inconsistency in reporting checkpointer stats

2022-12-21 Thread Kyotaro Horiguchi
At Mon, 19 Dec 2022 18:05:38 +0530, Bharath Rupireddy wrote in > On Fri, Dec 16, 2022 at 2:14 PM Kyotaro Horiguchi > wrote: > > > > In the first place I don't like that we count the same things twice. > > Couldn't we count the number only by any

Re: (non) translatable string splicing

2022-12-20 Thread Kyotaro Horiguchi
> > clúster antiguo. > > I can't see how that could be mejor. :-) It was quite annoying but not untranslatable. But the "the" before "residen" looks like badly misplaced:p It should be a part of the inner text ("residen los.."). regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: (non) translatable string splicing

2022-12-20 Thread Kyotaro Horiguchi
is blah" in that context. > Ugh. Perhaps we could just simplify the wordings as of "index on > blah", "index on OID %u", "TOAST table for blah" and "TOAST table for > OID %u" with newlines after each item? I'm fine with just removing " which ". but I don't understand about the extra newlines. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Inconsistency in reporting checkpointer stats

2022-12-16 Thread Kyotaro Horiguchi
race info in BufferSync will work fine. Assuming single process checkpointing there must be no problem to do that. (Anyway the current shared stats update for checkpointer is assuming single-process). Otherwise, in exchange with giving up the realtime nature, we can count the number only by Che

Re: plpgsq_plugin's stmt_end() is not called when an error is caught

2022-12-15 Thread Kyotaro Horiguchi
havior by myself, though. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: plpgsq_plugin's stmt_end() is not called when an error is caught

2022-12-14 Thread Kyotaro Horiguchi
uld be simpler than calling end callback at every nest level. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

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

2022-12-14 Thread Kyotaro Horiguchi
At Thu, 15 Dec 2022 10:29:17 +0530, Amit Kapila wrote in > On Thu, Dec 15, 2022 at 10:11 AM Kyotaro Horiguchi > wrote: > > > > At Thu, 15 Dec 2022 09:18:55 +0530, Amit Kapila > > wrote in > > > On Thu, Dec 15, 2022 at 7:22 AM Kyotaro Horiguchi > > >

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

2022-12-14 Thread Kyotaro Horiguchi
At Thu, 15 Dec 2022 09:18:55 +0530, Amit Kapila wrote in > On Thu, Dec 15, 2022 at 7:22 AM Kyotaro Horiguchi > wrote: > > > > At Wed, 14 Dec 2022 16:30:28 +0530, Amit Kapila > > wrote in > > > On Wed, Dec 14, 2022 at 4:16 PM Hayato Kuroda (Fujitsu) > &

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

2022-12-14 Thread Kyotaro Horiguchi
At Thu, 15 Dec 2022 09:23:12 +0530, Amit Kapila wrote in > On Thu, Dec 15, 2022 at 7:16 AM Kyotaro Horiguchi > wrote: > > Allowing walsender to finish ignoring replication status > > wouldn't be great. > > > > Yes, that would be ideal. But do you know why th

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

2022-12-14 Thread Kyotaro Horiguchi
his will resolve many known issues including walsender's un-terminatability, possible buffer-full and status packet exchanging. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

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

2022-12-14 Thread Kyotaro Horiguchi
flushed > position > cannot be modified. I didn't look closer but the cause I guess is walsender doesn't die until all WAL has been sent, while logical delay chokes replication stream. Allowing walsender to finish ignoring replication status wouldn't be great. One idea is to let logical workers send delaying status. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_upgrade: Make testing different transfer modes easier

2022-12-14 Thread Kyotaro Horiguchi
wnode->port > + '-p', $oldnode->port, '-P', $newnode->port, > + $mode, > ], > > Minor nitpick, but while in there should we take the opportunity to add a > trailing comma on the other two array declarations which now ends with > --check? > It's good Perl practice and will make the code consistent. Otherwise look god to me. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Shortening the Scope of Critical Section in Creation of New MultiXacts

2022-12-13 Thread Kyotaro Horiguchi
Addition to the above, we cannot simply move the END_CRIT_SECTION() to there since RecordNewMultiXact() has another caller that doesn't start a critical section. By the way, I didn't tested this for myself but.. > This passes regression tests Maybe if you did the same with an assertion-bui

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

2022-12-13 Thread Kyotaro Horiguchi
At Tue, 13 Dec 2022 17:05:35 +0530, Amit Kapila wrote in > On Tue, Dec 13, 2022 at 7:35 AM Kyotaro Horiguchi > wrote: > > > > At Mon, 12 Dec 2022 18:10:00 +0530, Amit Kapila > > wrote in > Yeah, I think ideally it will timeout but if we have a solution like >

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

2022-12-12 Thread Kyotaro Horiguchi
At Tue, 13 Dec 2022 02:28:49 +, "Takamichi Osumi (Fujitsu)" wrote in > On Wednesday, December 7, 2022 12:00 PM Kyotaro Horiguchi > wrote: > > We couldn't reproduce this failure and > find the same type of failure on the cfbot from the past failures. >

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

2022-12-12 Thread Kyotaro Horiguchi
ceives the next data. But we might need to adjust the wait_time in LogicalRepApplyLoop(). But, I'm not sure what will happen when walsender is blocked by buffer-full for a long time. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

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

2022-12-12 Thread Kyotaro Horiguchi
Hello. At Mon, 12 Dec 2022 07:42:30 +, "Takamichi Osumi (Fujitsu)" wrote in > On Monday, December 12, 2022 2:54 PM Kyotaro Horiguchi > wrote: > > I asked about unexpected walsender termination caused by this feature but I > > think I didn't received an

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

2022-12-11 Thread Kyotaro Horiguchi
ue". subscriber: > 2022-12-12 14:17:18.139 JST LOG: terminating walsender process due to > replication timeout > 2022-12-12 14:18:11.076 JST LOG: starting logical decoding for slot "s1" ... regards. -- Kyotaro Horiguchi NTT Open Source Software Center

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

2022-12-11 Thread Kyotaro Horiguchi
Sorry for the confusion. At Mon, 12 Dec 2022 12:06:36 +0900 (JST), Kyotaro Horiguchi wrote in > At Mon, 12 Dec 2022 11:57:17 +0900 (JST), Kyotaro Horiguchi > wrote in > > This patch copies the bleeding edge WAL page without recording the > > (next) insertion point nor ch

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

2022-12-11 Thread Kyotaro Horiguchi
At Mon, 12 Dec 2022 11:57:17 +0900 (JST), Kyotaro Horiguchi wrote in > This patch copies the bleeding edge WAL page without recording the > (next) insertion point nor checking whether all in-progress insertion > behind the target LSN have finished. Thus the copied page may have >

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

2022-12-11 Thread Kyotaro Horiguchi
records. So perhaps we should manage how far the buffer is filled with valid content (or how far we can presend) in this feature. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Question regarding "Make archiver process an auxiliary process. commit"

2022-12-06 Thread Kyotaro Horiguchi
ch is wrongly set. It is telling about the first iteration of archive process, not periodical wakeups. So I think it is doable by considering how to handle incomplete archiving iterations. > The proposed idea is a behaviour change while this thread intends to clean > up some code that's > a result of the mentioned commit. So probably the proposed idea can be > discussed as a separate thread. Agreed. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Question regarding "Make archiver process an auxiliary process. commit"

2022-12-06 Thread Kyotaro Horiguchi
ur data, so she > * wakes up occasionally to allow herself to be proactive. > */ So I think this is still valid. If we want to eliminate useless wakeups, archiver needs to remember whether the last iteration was fully done or not. But it seems to be a race condition is involved. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

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

2022-12-06 Thread Kyotaro Horiguchi
. It fails for me on 64bit Linux.. (Rocky 8.7) > t/032_apply_delay.pl ... Dubious, test returned 29 (wstat 7424, > 0x1d00) > No subtests run .. > t/032_apply_delay.pl (Wstat: 7424 Tests: 0 Failed: 0) > Non-zero exit status: 29 > Parse errors: No plan f

Re: Transaction timeout

2022-12-06 Thread Kyotaro Horiguchi
27;s definitely also worth optimizing the timeout enabled paths. And > you're right, it looks like there's a fair bit of optimization > potential. Thanks. I'll work on that. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Question regarding "Make archiver process an auxiliary process. commit"

2022-12-06 Thread Kyotaro Horiguchi
e the copying behavior of the function. I think we should simplify the loop by removing last_copy_time and curtime in the "if (!time_to_stop)" block. Then we can remove the variable "timeout" and the "if (timeout > 0)" branch. Are you willing to work on this? regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures

2022-12-05 Thread Kyotaro Horiguchi
(If we assume that the file names are typed in letter-by-letter, I rather prefer to allow lower-case letters:p) > > That said, let's also hear from others. > > Sure. Perhaps my set of suggestions will not get the majority, > though.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Transaction timeout

2022-12-05 Thread Kyotaro Horiguchi
n over the all timeouts instead of the a few first ones, but that's overhead is not a matter when a timeout fires. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Failed Assert while pgstat_unlink_relation

2022-12-04 Thread Kyotaro Horiguchi
hen the relcache entry for t1 is refreshed to a table relation again then the transaction rolls back, crash will happen for the same reason. I'm not sure if there is such a case actually. When I tried to check that behavior further, I found that that CREATE ROLE is no longer allowed.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_upgrade: Make testing different transfer modes easier

2022-12-01 Thread Kyotaro Horiguchi
t came to my mind was the --mode= option. IMHO, if I was going to add an option to choose the copy behavior, I would add --mode option instead, like pg_ctl does, as it implicitly signals that the suboptions are mutually exclusive. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Make mesage at end-of-recovery less scary.

2022-11-29 Thread Kyotaro Horiguchi
At Tue, 22 Nov 2022 16:04:56 -0600, Justin Pryzby wrote in > On Fri, Nov 18, 2022 at 05:25:37PM +0900, Kyotaro Horiguchi wrote: > > + while (*p == 0 && p < pe) > > + p++; > > The bug reported by Andres/cfbot/ubsan is here

Re: Failed Assert while pgstat_unlink_relation

2022-11-28 Thread Kyotaro Horiguchi
AtEOXact_Files(false); AtEOXact_ComboCid(); AtEOXact_HashTables(false); - AtEOXact_PgStat(false, is_parallel_worker); AtEOXact_ApplyLauncher(false); pgstat_report_xact_timestamp(0); } -- Kyotaro Horiguchi NTT Open Source Software Center

FOR UPDATE may leave spurious locks

2022-11-21 Thread Kyotaro Horiguchi
t FOR_UPDATE queries. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Unable to reset stats using pg_stat_reset_replication_slot

2022-11-20 Thread Kyotaro Horiguchi
XECUTE to run the function. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: when the startup process doesn't (logging startup delays)

2022-11-20 Thread Kyotaro Horiguchi
27;t seem to be needed in this case. XLogShutdownWalRcv() looks like a similar case to me and honestly I don't like it in the sense of robustness but it is simpler than checking walreceiver status at every site that refers to the flag. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Make mesage at end-of-recovery less scary.

2022-11-18 Thread Kyotaro Horiguchi
Just rebased. regards. -- Kyotaro Horiguchi NTT Open Source Software Center >From 1efe0601596807c25769370f38884c7027a00839 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Tue, 15 Nov 2022 13:41:46 +0900 Subject: [PATCH v22] Make End-Of-Recovery error less scary When recovery in

Re: In-placre persistance change of a relation

2022-11-18 Thread Kyotaro Horiguchi
At Tue, 08 Nov 2022 11:33:53 +0900 (JST), Kyotaro Horiguchi wrote in > Indeed, thanks! I'll do that in a few days. Got too late, but rebased.. The contents of the two patches in the last version was a bit shuffled but they are fixed. regards. -- Kyotaro Horiguchi NTT Open Source

Re: Printing backtrace of postgres processes

2022-11-10 Thread Kyotaro Horiguchi
ers, for example), you need to make > sure libgcc is loaded beforehand. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Reviving lost replication slots

2022-11-09 Thread Kyotaro Horiguchi
elpful for the logical slots. However, supposing that WalSndSegmentOpen() fetches segments from archive as the fallback and that succeeds, the slot can survive missing WAL in pg_wal in the first place. So this patch doesn't seem to be needed for the purpose. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: logical replication restrictions

2022-11-08 Thread Kyotaro Horiguchi
he message-receiving path so that a not-so-long delay can cause a replication timeout to fire. I think we should process walsender pings even while delaying. Needing to make replication timeout longer than apply delay is not great, I think. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Improve logging when using Huge Pages

2022-11-08 Thread Kyotaro Horiguchi
h an alternative idea that add a new huge_pages value try_report or try_verbose, which tell postgresql to *always* report the result of huge_pages = try. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: In-placre persistance change of a relation

2022-11-07 Thread Kyotaro Horiguchi
At Fri, 4 Nov 2022 09:32:52 +0900, Ian Lawrence Barwick wrote in > cfbot reports the patch no longer applies. As CommitFest 2022-11 is > currently underway, this would be an excellent time to update the patch. Indeed, thanks! I'll do that in a few days. regards. -- Kyotaro Ho

Re: heavily contended lwlocks with long wait queues scale badly

2022-10-30 Thread Kyotaro Horiguchi
akage, thus it might be ok to backpatch. Since this "bug" has the nature of positive-feedback so reducing the coefficient is benetifical than the direct cause of the change. > I've attached my quick-and-dirty patch. Obviously it'd need a few defines etc, > but I wanted to get this out to discuss before spending further time. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: resowner "cold start" overhead

2022-10-30 Thread Kyotaro Horiguchi
ng unused elements while in transaction but I'm not sure we need to be so keen to reclaim space during a transaction. > Greetings, > > Andres Freund > > https://www.postgresql.org/message-id/20221029025420.eplyow6k7tgu6he3%40awork3.anarazel.de regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Crash after a call to pg_backup_start()

2022-10-23 Thread Kyotaro Horiguchi
tly superfluous but "strictness" and "illusion" share the exactly the same pronounciation in Japanese "Ghen-Ka-Ku". -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Standby recovers records from wrong timeline

2022-10-21 Thread Kyotaro Horiguchi
At Fri, 21 Oct 2022 17:44:40 +0900 (JST), Kyotaro Horiguchi wrote in > At Fri, 21 Oct 2022 17:12:45 +0900 (JST), Kyotaro Horiguchi > wrote in > > latest works. It dones't consider the case of explict target timlines > > so it's just a PoC. (So this doesn't

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-10-21 Thread Kyotaro Horiguchi
At Fri, 21 Oct 2022 11:58:15 +1100, Peter Smith wrote in > Hi, I was hoping to use this patch in my other thread [1], but your > latest attachment is reported broken in cfbot [2]. Please rebase it. Ouch. I haven't reach here. I'll do that next Monday. regards. -- Kyotaro Ho

Re: Standby recovers records from wrong timeline

2022-10-21 Thread Kyotaro Horiguchi
At Fri, 21 Oct 2022 17:12:45 +0900 (JST), Kyotaro Horiguchi wrote in > latest works. It dones't consider the case of explict target timlines > so it's just a PoC. (So this doesn't work if recovery_target_timeline > is set to 2 for the "standby" in the repro

Re: Standby recovers records from wrong timeline

2022-10-21 Thread Kyotaro Horiguchi
At Fri, 21 Oct 2022 16:45:59 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 20 Oct 2022 14:44:40 +0300, Ants Aasma wrote in > > My understanding is that backup archives are supposed to remain valid > > even after PITR or equivalently a lagging standby promoting. >

Re: Standby recovers records from wrong timeline

2022-10-21 Thread Kyotaro Horiguchi
he new timeline before proceeding on the same timeline. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Crash after a call to pg_backup_start()

2022-10-21 Thread Kyotaro Horiguchi
the condition is a thinko. This is introduced by df3737a651 so it is master only. Please find the attached fix. regards. -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index dea978a962..888f5b1bff 100644 ---

Re: Avoid memory leaks during base backups

2022-10-20 Thread Kyotaro Horiguchi
re only session-lifetime values. It is, if left alone, reset at the next call to blow away orphan memory blocks from the previous failed call. While this is not smart, it helps to keep things simple." regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: thinko in basic_archive.c

2022-10-20 Thread Kyotaro Horiguchi
Sorry, the previous mail are sent inadvertently.. At Fri, 21 Oct 2022 14:13:46 +0900 (JST), Kyotaro Horiguchi wrote in > + expectation that a value will soon be provided. Care must be taken when > + multiple servers are archiving to the same > + basic_archive.archiv

Re: thinko in basic_archive.c

2022-10-20 Thread Kyotaro Horiguchi
s unconditionally. I think this is not great, in that we offer a tool betrays to our own wrtten suggestion... The following is out-of-the-scope discussions. == At Thu, 20 Oct 2022 13:29:12 +0530, Bharath Rupireddy wrote in > On Thu, Oct 20, 2022 at 6:57 AM Kyotaro Horiguchi

Re: pg_recvlogical prints bogus error when interrupted

2022-10-20 Thread Kyotaro Horiguchi
I'm also not a fan of doing fsync at error. > > I also then noticed that we don't fsync the output file in cases of errors - > > that seems wrong to me? Looks to me like that block should be moved till > > after > > the error:? > > How about s

Re: shared memory stats ideas

2022-10-20 Thread Kyotaro Horiguchi
rends, especially if you're a non-expert. Agreed. It seem like a kind of easy (low-hanging) one. I'll give it a try. There should be some other numbers that timeseries stats are useful. > I would also expect a similar focus on the picture over time to be > useful with the indexing stuff, for roughly the same underlying > reasons. > > [1] > https://postgr.es/m/CAA8Fd-pB=mr42YQuoaLPO_o2=xo9yjnjq23cyjdfwc8sxgm...@mail.gmail.com regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Standby recovers records from wrong timeline

2022-10-20 Thread Kyotaro Horiguchi
Forgot a caveat. At Thu, 20 Oct 2022 17:34:13 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 19 Oct 2022 18:50:09 +0300, Ants Aasma wrote in > > When standby is recovering to a timeline that doesn't have any segments > > archived yet it will just blindly blow past

Re: Standby recovers records from wrong timeline

2022-10-20 Thread Kyotaro Horiguchi
Sorry, a correction needed.. At Thu, 20 Oct 2022 17:29:57 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 19 Oct 2022 18:50:09 +0300, Ants Aasma wrote in > > When standby is recovering to a timeline that doesn't have any segments > > archived yet it will just blindly bl

Re: Standby recovers records from wrong timeline

2022-10-20 Thread Kyotaro Horiguchi
in this case. Also you must remove replica/pg_wal/ before starting the replica. That file causes recovery run beyond the divergence point before fetching from archive or stream. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Fix GetWALAvailability function code comments for WALAVAIL_REMOVED return value

2022-10-19 Thread Kyotaro Horiguchi
a process is > * still alive, then "unreserved" seems more appropriate. > * > * If we do change it, save the state for safe_wal_size below. > */ > if (!XLogRecPtrIsInvalid(slot_contents.data.restart_lsn)) > { regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: thinko in basic_archive.c

2022-10-19 Thread Kyotaro Horiguchi
At Wed, 19 Oct 2022 10:21:12 +0530, Bharath Rupireddy wrote in > On Wed, Oct 19, 2022 at 8:58 AM Kyotaro Horiguchi > wrote: > > An archive module could clean up them at startup or at the first call > > but that might be dangerous (since archive directory is I think >

Re: thinko in basic_archive.c

2022-10-19 Thread Kyotaro Horiguchi
At Wed, 19 Oct 2022 10:48:03 -0400, Robert Haas wrote in > On Tue, Oct 18, 2022 at 11:28 PM Kyotaro Horiguchi > wrote: > > > > Yeah, leaving a potentially unbounded number of files around after > > > > system crashes seems pretty unfriendly. I'm not su

Re: thinko in basic_archive.c

2022-10-18 Thread Kyotaro Horiguchi
tes the left-alone files at the next call for that file. # The patch seems forgetting to clear the tmepfilepath *after* a # successful renaming. And I don't see how the callback is called. > [1] ubuntu:~/postgres/contrib/basic_archive/archive_directory$ ls > 000100000001 > a

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

2022-10-17 Thread Kyotaro Horiguchi
ibpq-fe.h" as Önder mentioned, if I understand what he said correctly. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Suppressing useless wakeups in walreceiver

2022-10-16 Thread Kyotaro Horiguchi
he nap to an integer. Or we can just assert out for the nap time longer than INT_MAX (but this would require another int64 variable. I belive we won't need such a long nap, (or that is no longer a nap?) regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: fix archive module shutdown callback

2022-10-16 Thread Kyotaro Horiguchi
iately on the normal path. > Is the shutdown callback meant to be called only after the archive > library is loaded? The documentation [1] says that it just gets called > before the archiver process exits. If this is true, can we just place > before_shmem_exit(call_archive_module_shutdown_callback, 0); in > PgArchiverMain() after on_shmem_exit(pgarch_die, 0);? +1 for using before_shmem_exit. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: fix archive module shutdown callback

2022-10-16 Thread Kyotaro Horiguchi
e CF entry to reduce > > reviewers/committers' efforts and seek more thoughts about all of the > > fixes. > > I don't mind discussing each point separately as the first thread > dealing with archive modules is already very long, so the current way > of doing things makes sure to attract the correct type of attention > for each problem, IMO. I tend to agree to this. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: archive modules

2022-10-16 Thread Kyotaro Horiguchi
out after the resatart and keep restarting with complaining for the wrong setting. I think we don't need the first message. The ERROR always turns into FATAL, so FATAL would less confusing here, maybe. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-16 Thread Kyotaro Horiguchi
eports like that, then we can probably use Michael's > > idea of displaying additional information with a separate flag. > > Agreed. Agreed, but maybe we need to recheck what should be hidden (or abbreviated) in the concise (or terse?) mode. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Startup process on a hot standby crashes with an error "invalid memory alloc request size 1073741824" while replaying "Standby/LOCK" records

2022-10-10 Thread Kyotaro Horiguchi
> So the performance loss is minor and isolated to the users of such > locks, so I see no problems with it. At Wed, 5 Oct 2022 12:00:55 -0700, Nathan Bossart wrote in > +1. It can always be back-patched in the future if there are additional > reports. The third +1 from me. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Remove an unnecessary LSN calculation while validating WAL page header

2022-10-10 Thread Kyotaro Horiguchi
nstead of calculating from static variables for file, segment and in-segment offset. > Here's a tiny patch removing the unnecessary XLogSegNoOffsetToRecPtr() > and using the passed in 'recptr'. Looks good to me. # Mysteriously, I didn't find a code to change readId in the p

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-06 Thread Kyotaro Horiguchi
. > If we don't need the name in stats entry, pgstat_acquire_replslot() is > no longer necessary? I think so. The entry will be created at the first report. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_statsinfo - PG15 support?

2022-10-05 Thread Kyotaro Horiguchi
the year following the release of the corresponding version of PostgreSQL and the source files are published at the same time. Thus pg_statsinfo for PG15 will be released in March, 2023. Thank you for your interest. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-05 Thread Kyotaro Horiguchi
ng these stats, of course. +1. FWIW, the atttached is an example of what it looks like if we avoid file format change. regards. -- Kyotaro Horiguchi NTT Open Source Software Center >From 4effe9279d6535191d7f5478bb76490dc8762d33 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Thu, 6 O

Re: Startup process on a hot standby crashes with an error "invalid memory alloc request size 1073741824" while replaying "Standby/LOCK" records

2022-10-04 Thread Kyotaro Horiguchi
e issue that was fixed with 6301c3a, so I'm inclined to believe this > usage pattern is actually somewhat common. So releasing locks becomes somewhat slower? But it seems to still be far faster than massively repetitive head-removal in a list. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Assorted fixes related to WAL files (was: Use XLogFromFileName() in pg_resetwal to parse position from WAL file)

2022-10-04 Thread Kyotaro Horiguchi
At Tue, 4 Oct 2022 13:20:54 +0530, Bharath Rupireddy wrote in > On Tue, Oct 4, 2022 at 12:11 PM Kyotaro Horiguchi > wrote: > > > > > > > > > static uint32 minXlogTli = 0; > > > > I have found other three instances of this in xlog.c a

Re: Use XLogFromFileName() in pg_resetwal to parse position from WAL file

2022-10-03 Thread Kyotaro Horiguchi
At Tue, 04 Oct 2022 15:23:48 +0900 (JST), Kyotaro Horiguchi wrote in > This is not directly related to this patch, pg_resetwal.c has the > following line.. > > > static uint32 minXlogTli = 0; I have found other three instances of this in xlog.c and pg_receivewal.c. Do th

Re: Use XLogFromFileName() in pg_resetwal to parse position from WAL file

2022-10-03 Thread Kyotaro Horiguchi
At Tue, 04 Oct 2022 15:17:06 +0900 (JST), Kyotaro Horiguchi wrote in > Other than that, it looks good to me. Sorry I have another comment. > - unsigned int tli, > - log, > -

Re: Use XLogFromFileName() in pg_resetwal to parse position from WAL file

2022-10-03 Thread Kyotaro Horiguchi
log_seg_size); > newXlogSegNo = ControlFile.checkPointCopy.redo / > ControlFile.xlog_seg_size; Couldn't we use XLByteToSeg() here? Other than that, it looks good to me. > [1] > https://github.com/postgres/postgres/blob/REL_10_STABLE/src/include/access/xlog_internal.h regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: more descriptive message for process termination due to max_slot_wal_keep_size

2022-09-29 Thread Kyotaro Horiguchi
At Thu, 29 Sep 2022 22:49:00 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > By the way, I didn't notice at that time (and forgot about the > > policy), but the HINT message has variations differing only by the > > variable name. > > > What do you

Re: more descriptive message for process termination due to max_slot_wal_keep_size

2022-09-29 Thread Kyotaro Horiguchi
At Thu, 29 Sep 2022 13:31:00 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > At Wed, 28 Sep 2022 16:30:37 -0400, Tom Lane wrote in > > LOG: invalidating *replication* slot \"%s\" > > DETAILS: (ditto) > > HINTS: (ditto) > > I thoug

Re: more descriptive message for process termination due to max_slot_wal_keep_size

2022-09-28 Thread Kyotaro Horiguchi
At Wed, 28 Sep 2022 16:30:37 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > Okay. the points you brought up above are sufficient grounds for not > > doing so. Now they are in the following format. > > > LOG: terminating process 16034 to release replication

Re: Make ON_ERROR_STOP stop on shell script failure

2022-09-28 Thread Kyotaro Horiguchi
At Thu, 29 Sep 2022 12:35:04 +0900 (JST), Kyotaro Horiguchi wrote in > > Thank you for the feedback! > > I agree that the messages should be more clear. > > \\!: command was not executed > > \\!: command failed > > Would these two messages be enough to describe the

Re: Make ON_ERROR_STOP stop on shell script failure

2022-09-28 Thread Kyotaro Horiguchi
h > > "\\!" since both message concerns with \!. > > How do you think? > > Thank you for the feedback! > I agree that the messages should be more clear. > \\!: command was not executed > \\!: command failed > Would these two messages be enough to describe th

Re: A doubt about a newly added errdetail

2022-09-28 Thread Kyotaro Horiguchi
At Wed, 28 Sep 2022 10:46:41 +0200, Alvaro Herrera wrote in > On 2022-Sep-28, Amit Kapila wrote: > > > On Wed, Sep 28, 2022 at 11:30 AM Kyotaro Horiguchi > > wrote: > > > > It looks tome that the errmsg and errordetail are reversed. Isn'

Re: A doubt about a newly added errdetail

2022-09-28 Thread Kyotaro Horiguchi
At Wed, 28 Sep 2022 13:47:25 +0530, Amit Kapila wrote in > On Wed, Sep 28, 2022 at 11:30 AM Kyotaro Horiguchi > wrote: > > I'm fine with that. By the way, related to the area, I found the > > following error messages. > > > > >errmsg("publ

Re: pg_rewind WAL segments deletion pitfall

2022-09-28 Thread Kyotaro Horiguchi
At Wed, 28 Sep 2022 10:09:05 +0200, Polina Bungina wrote in > On Tue, Sep 27, 2022 at 9:50 AM Kyotaro Horiguchi > wrote: > > > Regarding the the patch, pg_rewind starts reading segments from the > > divergence point back to the nearest checkpoint, then moves foward >

Re: In-placre persistance change of a relation

2022-09-28 Thread Kyotaro Horiguchi
Just rebased. regards. -- Kyotaro Horiguchi NTT Open Source Software Center >From 8c0d5bd7b519149059d1b2b86a93ffe509e09b9b Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Tue, 19 Jul 2022 13:23:01 +0900 Subject: [PATCH v24 1/2] In-place table persistence change Even though ALTER TA

Re: Avoid memory leaks during base backups

2022-09-27 Thread Kyotaro Horiguchi
At Wed, 28 Sep 2022 13:16:36 +0900, Michael Paquier wrote in > On Tue, Sep 27, 2022 at 05:32:26PM +0900, Kyotaro Horiguchi wrote: > > At Tue, 27 Sep 2022 11:33:56 +0530, Bharath Rupireddy > > wrote in > > > On Mon, Sep 26, 2022 at 7:34 PM Tom Lane wrote: >

Re: A doubt about a newly added errdetail

2022-09-27 Thread Kyotaro Horiguchi
t; NameStr(pubform->pubname)), >errdetail("The publication is defined as FOR ALL TABLES."))); regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Fix some newly modified tab-complete changes

2022-09-27 Thread Kyotaro Horiguchi
RANT" ?? Yeah, for the mement I thought that might a kind of admin option but there's no such a privilege. REVOKE gets the same suggestion. > 2b. > grant "TEMPORARY" but not "TEMP" ?? TEMP is an alternative spelling so that's fine. I found the following suggestion. CREATE PUBLICATION p FOR TABLES -> ["IN SCHEMA", "WITH ("] I believe "WITH (" doesn't come there. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)

2022-09-27 Thread Kyotaro Horiguchi
At Wed, 28 Sep 2022 10:09:39 +0900, Michael Paquier wrote in > On Tue, Sep 27, 2022 at 03:11:54PM +0530, Bharath Rupireddy wrote: > > On Tue, Sep 27, 2022 at 2:20 PM Kyotaro Horiguchi > > wrote: > >> If this is still unacceptable, I propose to change the comment

Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)

2022-09-27 Thread Kyotaro Horiguchi
At Tue, 27 Sep 2022 14:03:24 +0530, Bharath Rupireddy wrote in > On Tue, Sep 27, 2022 at 1:54 PM Kyotaro Horiguchi > wrote: > > What do you think about this? > > -1 from me. We have the function context and the structure name there > to represent that the parameter nam

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