Re: A recent message added to pg_upgade

2023-10-31 Thread Kyotaro Horiguchi
le > growth during pg_upgrade may be huge (transiently) unless the > pg_resetwal step of pg_upgrade removes it at the end. While I doubt anyone wishes to set the variable to a specific value during upgrade, think there are individuals who might be reluctant to edit the config file due to uncle

Re: Add new option 'all' to pg_stat_reset_shared()

2023-10-30 Thread Kyotaro Horiguchi
bout that:p > > Isn't calling pg_stat_reset_shared() for all stats types helping you > out? Is there any problem with it? Can you be more specific about the > use-case? Oh. Sorry, it's my bad. pg_stat_reset_shared() is sufficient. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add new option 'all' to pg_stat_reset_shared()

2023-10-30 Thread Kyotaro Horiguchi
t;, > "wal" > > How about adding a new option 'all' to delete all targets above? > > I imagine there are cases where people want to initialize all of them > at the same time in addition to initializing one at a time. FWIW, I fairly often wanted it, but forgot about that:p regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: A recent message added to pg_upgade

2023-10-30 Thread Kyotaro Horiguchi
e translation. In another thread, we are discussing the reduction of translatable messages. Therefore, I suggest using elog() for the condition at the very least. Whether it should be elog() or Assert() remains open for discussion, as I don't have a firm stance on it. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: A recent message added to pg_upgade

2023-10-30 Thread Kyotaro Horiguchi
the value to a big enough value which > doesn't cause invalidation. The behavior doesn't look bad to me but just > mention it > for reference. Indeed. pg_upgrade anyway sets the variable to -1 irrespective of the slot's existence, and I see no justification for allowing users to forcibly

Re: A recent message added to pg_upgade

2023-10-30 Thread Kyotaro Horiguchi
he feature). 3. Altered the ereport() into Assert() in InvalidatePossiblyObsoleteSlot(). I considered removing the !SlotIsLogical() condition since pg_upgrade always sets max_slot_wal_keep_size to -1, but I left it unchanged. regards. -- Kyotaro Horiguchi NTT Open Source Software Ce

Re: COPY TO (FREEZE)?

2023-10-30 Thread Kyotaro Horiguchi
nly be used with COPY FROM". In short, for translation convenience, I would prefer if "force not null" were "FORCE_NOT_NULL". regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: A recent message added to pg_upgade

2023-10-29 Thread Kyotaro Horiguchi
At Fri, 27 Oct 2023 14:57:10 +0530, Amit Kapila wrote in > On Fri, Oct 27, 2023 at 2:02 PM Alvaro Herrera > wrote: > > > > On 2023-Oct-27, Kyotaro Horiguchi wrote: > > > > > @@ -1433,8 +1433,8 @@ > > > InvalidatePossiblyObsoleteS

Re: pg_upgrade's object listing

2023-10-27 Thread Kyotaro Horiguchi
At Fri, 27 Oct 2023 05:56:31 +, "Zhijie Hou (Fujitsu)" wrote in > On Friday, October 27, 2023 1:21 PM Kyotaro Horiguchi > wrote: > > > > Hello. > > > > I found the following message recently introduced in pg_upgrade: > > > > >

Re: A recent message added to pg_upgade

2023-10-26 Thread Kyotaro Horiguchi
jecting the parameter setting? With that modification, this message can be changed to elog one. I believe it's somewhat inconsiderate to point out what shouldn't have been done only after a problem has occurred. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

pg_upgrade's object listing

2023-10-26 Thread Kyotaro Horiguchi
>plugin, > slot_info->two_phase ? "true" : "false"); If the labels correspond to the struct member names, the first label ought to be "slotname". If not, all labels of this type, including those adjucent, should have a more natural spell

A recent message added to pg_upgade

2023-10-26 Thread Kyotaro Horiguchi
uot;replication slot is invalidated during upgrade"), + errhint("Set \"max_slot_wal_keep_size\" to -1 to avoid invalidation.")); The second attached does this. What do you think about those? regards. -- Kyotaro Horiguchi NTT Open Source Software Center diff -

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-10-24 Thread Kyotaro Horiguchi
was lazy about the messages because I didn't regard this to be at that stage yet. In the attached, fixed the existing two messages, and adjusted one message to display an error code, all in the consistent format. Thanks! -- Kyotaro Horiguchi NTT Open Source Software Center >From 65013b5ccebd10

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-10-24 Thread Kyotaro Horiguchi
en in such a case, the server continue working without any problems. I contemplated accomodating this case but the effort required seemed disproportionate to the possibility. regards. -- Kyotaro Horiguchi NTT Open Source Software Center >From 530dc21be72e4e7f5ea199a9fceee00bbb88cf75 Mon Sep 17 00:

A trouble about meson on Windows

2023-10-17 Thread Kyotaro Horiguchi
'src/backend/postgres.exe', missing and no known rule to make it regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: The danger of deleting backup_label

2023-10-17 Thread Kyotaro Horiguchi
emoves the backup_label from a backup, the initial concerns could still surface. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Rename backup_label to recovery_control

2023-10-15 Thread Kyotaro Horiguchi
At Mon, 16 Oct 2023 13:16:42 +0900 (JST), Kyotaro Horiguchi wrote in > Just an idea in a slightly different direction, but I'm wondering if > we can simply merge the content of backup_label into control file. > The file is 8192 bytes long, yet only 256 bytes are used. As a res

Re: Rename backup_label to recovery_control

2023-10-15 Thread Kyotaro Horiguchi
56 bytes are used. As a result, we anticipate no overhead. Sucha configuration would forcibly prevent uses from from removing the backup information. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-10-09 Thread Kyotaro Horiguchi
ree with your suggestion. Ultimately, if there's a possibility for this to be committed, the message will be consolidated to "could not start server". regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Included xid in restoring reorder buffer changes from disk log message

2023-10-09 Thread Kyotaro Horiguchi
ssage. > elog(DEBUG2, "spill %u changes in XID %u to disk", >(uint32) txn->nentries_mem, txn->xid); It might be preferable for those two messages to have a corresponding appearance. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

initdb's -c option behaves wrong way?

2023-09-28 Thread Kyotaro Horiguchi
names? regards. -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 0c6f5ceb0a..04419840f4 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -470,20 +470,14 @@ replace_guc_value(char **lines, const char

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-09-27 Thread Kyotaro Horiguchi
Sorry, it seems that I posted at the wrong position.. At Thu, 28 Sep 2023 12:58:51 +0900 (JST), Kyotaro Horiguchi wrote in > At Fri, 10 Mar 2023 15:59:04 +0900, Michael Paquier > wrote in > > My apologies for the long message, but this deserves some attention, > > IMHO

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-09-27 Thread Kyotaro Horiguchi
P_END record. The attached is a quick mock-up, but providing an approximation of my thoughts. (For example, end_of_backup_reached could potentially be extended to the ArchiveRecoveryRequested case and we could simplify the condition..) regards. -- Kyotaro Horiguchi NTT Open Source Software Center diff

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-09-22 Thread Kyotaro Horiguchi
At Wed, 20 Sep 2023 14:18:41 +0900 (JST), Kyotaro Horiguchi wrote in > I was able to see the trouble in the CI environment, but not > locally. I'll delve deeper into this. Thanks you for bringing it to my > attention. I found two instances with multiple child processes. # child-pid

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-09-19 Thread Kyotaro Horiguchi
suppresses warnings, whereas test would fail... > You can use it if acceptable. I was able to see the trouble in the CI environment, but not locally. I'll delve deeper into this. Thanks you for bringing it to my attention. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Bug fix for psql's meta-command \ev

2023-09-15 Thread Kyotaro Horiguchi
ver, this approach seems like overly cumbersome. So I'm +1 to this approach. A comment might be necessary to clarify that we need to wipe out the query buffer because it could be overwritten with an incomplete query string due to certain failures. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: bug fix and documentation improvement about vacuumdb

2023-09-14 Thread Kyotaro Horiguchi
t; tables not in the specified schema. > > > > Maybe, but the point of vacuumdb is to analyze a database so I'm not sure > > who > > would expect anything else than vacuuming everything but the excluded schema > > when specifying -N. What else could "vacuumdb -N foo" be interpreted to do > > that can be confusing? > > I agree with Daniel on this one. +1. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Fixup the variable name to indicate the WAL record reservation status.

2023-09-14 Thread Kyotaro Horiguchi
uot;, and promptly thereafter, the variable indicates that the record "has been inserted". Given this, "inserted" seems to be a better fit than "reserved". In short, I would keep the variable name as it is. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-09-13 Thread Kyotaro Horiguchi
_SNAPPROCESS. I changed the comparison operator for pid_t from > to !=, ensuring correct behavior even with negative values. regards. -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 807d7023a9..68ab83779c 100644 --- a/

Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)

2023-09-12 Thread Kyotaro Horiguchi
R: unsupported collprovider in pg_strcoll(): i regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-09-07 Thread Kyotaro Horiguchi
At Fri, 08 Sep 2023 14:17:16 +0900 (JST), Kyotaro Horiguchi wrote in > Ditching cmd.exe seems like a big hassle. So, on the flip side, I > tried to identify the postmaster PID using the shell's PID, and it > seem to work. The APIs used are avaiable from XP/2003 onwards. Cleaned it

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-09-07 Thread Kyotaro Horiguchi
* that's fine for this purpose. > ``` Ditching cmd.exe seems like a big hassle. So, on the flip side, I tried to identify the postmaster PID using the shell's PID, and it seem to work. The APIs used are avaiable from XP/2003 onwards. regards. -- Kyotaro Horiguchi NTT Open Source Software Ce

Re: psql help message contains excessive indentations

2023-09-07 Thread Kyotaro Horiguchi
t; + " stop if less than MIN rows are > > returned\n"); > > Yeah, this looks right to me -- the whole help entry as a single > translatable unit, instead of three separately translatable lines. +1 regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: psql help message contains excessive indentations

2023-09-07 Thread Kyotaro Horiguchi
At Thu, 7 Sep 2023 16:08:10 +0900, Yugo NAGATA wrote in > On Thu, 07 Sep 2023 15:36:10 +0900 (JST) > Kyotaro Horiguchi wrote: > > > At Thu, 7 Sep 2023 15:02:49 +0900, Yugo NAGATA wrote > > in > > > I wonder this better to fix this in similar way to other plac

Re: psql help message contains excessive indentations

2023-09-07 Thread Kyotaro Horiguchi
At Thu, 7 Sep 2023 15:02:49 +0900, Yugo NAGATA wrote in > On Thu, 07 Sep 2023 14:29:56 +0900 (JST) > Kyotaro Horiguchi wrote: > > > \q quit psql > > > \watch [[i=]SEC] [c=N] [m=MIN] > > !> execute query

psql help message contains excessive indentations

2023-09-06 Thread Kyotaro Horiguchi
stop if less than MIN rows are returned The last two lines definitely have some extra indentation. I've attached a patch that fixes this. [1] https://www.postgresql.org/message-id/20230830.103356.1909699532104167477.horikyota@gmail.com regards. -- Kyotaro Horiguchi NTT Open Source So

Re: In-placre persistance change of a relation

2023-09-04 Thread Kyotaro Horiguchi
At Thu, 24 Aug 2023 11:22:32 +0900 (JST), Kyotaro Horiguchi wrote in > I could turn this into something like undo longs in a simple form, but > I'd rather not craft a general-purpose undo log system for this unelss > it's absolutely necessary. This is a patch for a basic

A propose to revise \watch help message

2023-08-29 Thread Kyotaro Horiguchi
ook like it's about interval or counts, but it actually refers to the row number, which is not spelled out in the line. Would it make sense to change it to MINROWS? There's enough room in the line for that change and the doc already uses min_rows. regards. -- Kyotaro Horiguchi NTT Open Source Softwar

Re: A propose to revise \watch help message

2023-08-29 Thread Kyotaro Horiguchi
At Wed, 30 Aug 2023 10:21:26 +0900 (JST), Kyotaro Horiguchi wrote in > Recently \watch got the following help message. > > > \watch [[i=]SEC] [c=N] [m=MIN] > > execute query every SEC seconds, up to N times > > st

Re: Strange presentaion related to inheritance in \d+

2023-08-29 Thread Kyotaro Horiguchi
At Tue, 29 Aug 2023 19:28:28 +0200, Alvaro Herrera wrote in > On 2023-Aug-29, Kyotaro Horiguchi wrote: > > > Attached is the initial version of the patch. It prevents "CREATE > > TABLE" from executing if there is an inconsisntent not-null > > constraint. Also

Re: Standardize spelling of "power of two"

2023-08-29 Thread Kyotaro Horiguchi
s that are 100% for > > initdb.po, and they have two weeks to make the change from "2" to "two". > > I don't think this is a problem. > > Fair enough, backpatched to v16. Thank you for committing this. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Standardize spelling of "power of two"

2023-08-29 Thread Kyotaro Horiguchi
cy. See the attached. regards. -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index c66467eb95..905b979947 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -3350,7 +3350,7 @@ main(int argc, char *argv[])

Re: Strange presentaion related to inheritance in \d+

2023-08-28 Thread Kyotaro Horiguchi
At Mon, 28 Aug 2023 13:36:00 +0200, Alvaro Herrera wrote in > On 2023-Aug-28, Kyotaro Horiguchi wrote: > > > But with these tables: > > > > create table p (a int, b int not null default 0); > > create table c1 (a int, b int not null NO INHERIT default 1

Strange presentaion related to inheritance in \d+

2023-08-28 Thread Kyotaro Horiguchi
t_null" NOT NULL "b": local inherited uninheritable In 0001, I did wonder about hiding "local" when it's not inherited, but this behavior rfollows existing code. In 0002, I'm not completely satisfied with the location, but standard regression test suite seems more suitable for th

Re: Should the archiver process always make sure that the timeline history files exist in the archive?

2023-08-24 Thread Kyotaro Horiguchi
ry file seems to work, but it feels a tad aggressive to me.) C. If those steps aren't valid, we might want to add a note stating that -X none basebackups do need the timeline history file for the initial TLI. And don't forget to enable archive mode before the latest timeline switch if any.

Re: In-placre persistance change of a relation

2023-08-23 Thread Kyotaro Horiguchi
orm, but I'd rather not craft a general-purpose undo log system for this unelss it's absolutely necessary. > [0] https://postgr.es/m/9827ebd3-de2e-fd52-4091-a568387b1fc2%40iki.fi regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_rewind WAL segments deletion pitfall

2023-08-23 Thread Kyotaro Horiguchi
findLastCheckpoint()? > > I think the first version of the patch more or less did that. Not > necessarily a list, but a hash table of WAL file names that we want to > keep. But Kyotaro Horiguchi didn't like it and suggested creating entries > in the filemap.c hash table instead. > But,

Re: Fix pg_stat_reset_single_table_counters function

2023-08-20 Thread Kyotaro Horiguchi
"current_database" for the variable. I would just use "database" or "db" instead. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-08-09 Thread Kyotaro Horiguchi
At Thu, 10 Aug 2023 13:33:48 +0900, Michael Paquier wrote in > On Thu, Aug 10, 2023 at 10:15:40AM +0900, Kyotaro Horiguchi wrote: > > At Thu, 10 Aug 2023 10:00:17 +0900 (JST), Kyotaro Horiguchi > > wrote in > >> We have treated every kind of broken data

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-08-09 Thread Kyotaro Horiguchi
At Thu, 10 Aug 2023 10:00:17 +0900 (JST), Kyotaro Horiguchi wrote in > At Wed, 9 Aug 2023 17:44:49 +0900, Michael Paquier > wrote in > > > While it's a kind of bug in total, we encountered a case where an > > > excessively large xl_tot_len actually came from a co

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-08-09 Thread Kyotaro Horiguchi
ave the option to terminate recovery and then switch to normal operation. What if we introduced an option to increase the timeline whenever recovery hits data error? If that option is disabled, the server stops when recovery detects an incorrect data, except in the case of an OOM. OOM cause record retry. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-08-09 Thread Kyotaro Horiguchi
> previously, there are more code paths to consider, but that's a start > to fix the data loss problems. (The file name "xlogreader_oom" is a bit trickeier to type than "hoge" or "foo"X( ) > Comments are welcome. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-08-08 Thread Kyotaro Horiguchi
At Tue, 8 Aug 2023 16:29:49 +0900, Michael Paquier wrote in > On Wed, Aug 02, 2023 at 01:16:02PM +0900, Kyotaro Horiguchi wrote: > > I believe this approach is sufficient to determine whether the error > > is OOM or not. If total_len is currupted and has an excessively large

Re: WIP: new system catalog pg_wait_event

2023-08-07 Thread Kyotaro Horiguchi
I'm adding a new CF entry for it. As I mentioned in another thread, I'm uncertain about our stance on the class id of the wait event. If a class acts as a namespace, we should include it in the view. Otherwise, if the class id is just an attribute of the wait event, we should make the event name uniq

Re: "duplicated" wait events

2023-08-06 Thread Kyotaro Horiguchi
without messing up the source tree. This causes meson to refuse a build.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-08-01 Thread Kyotaro Horiguchi
At Tue, 01 Aug 2023 15:28:54 +0900 (JST), Kyotaro Horiguchi wrote in > I thoght that the failure on a stanby results in continuing to retry > reading the next record. However, I found that there's a case where > start process stops in response to OOM [1]. I've examined

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-08-01 Thread Kyotaro Horiguchi
At Tue, 01 Aug 2023 15:28:54 +0900 (JST), Kyotaro Horiguchi wrote in > While we will not agree, we could establish a defalut behavior where > an OOM during recovery immediately triggers an ERROR. Then, we could > introduce a *GUC* that causes recovery to regard OOM as an > end-of-re

Re: Fix compilation warnings when CFLAGS -Og is specified

2023-08-01 Thread Kyotaro Horiguchi
> [1]: > https://wiki.postgresql.org/wiki/Developer_FAQ#:~:text=or%20MSVC%20tracepoints.-,What%20debugging%20features%20are%20available%3F,-Compile%2Dtime I think we don't want "fix" those as far as modern compilers don't emit the false positives. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-08-01 Thread Kyotaro Horiguchi
At Tue, 1 Aug 2023 14:03:36 +0900, Michael Paquier wrote in > On Tue, Aug 01, 2023 at 01:51:13PM +0900, Kyotaro Horiguchi wrote: > > I believe a database server is not supposed to be executed under such > > a memory-constrained environment. > > I don't really follow this a

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-07-31 Thread Kyotaro Horiguchi
lement a fallback mechanism for example that loads the record into an already-allocated buffer (which is smaller than the specified length) just to verify if it's corrupted. However, I question whether it's worth the additional complexity. And I'm not sure what if the first allocation failed. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Support to define custom wait events for extensions

2023-07-31 Thread Kyotaro Horiguchi
extension. + */ +static const char * +GetWaitEventExtensionIdentifier(uint16 eventId) This looks inconsistent. Shouldn't it be GetWaitEventExtentionName()? regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_usleep for multisecond delays

2023-07-26 Thread Kyotaro Horiguchi
for it. So, we have at least one sensible use case for the parameter, which seems to be sufficient reason. I'm not sure if others will agree, but I'm leaning towards providing a dedicated WaitEventSet for the new sleep function. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Buildfarm failures on chipmunk

2023-07-20 Thread Kyotaro Horiguchi
>'force_parallel_mode = > regress' > ] > }, The BF config needs a fix for HEAD. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

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

2023-07-19 Thread Kyotaro Horiguchi
At Mon, 17 Jul 2023 15:20:30 +0300, Aleksander Alekseev wrote in > Thanks for working on this, it bugged me for a while. I noticed that > cfbot is not happy with the patch so I rebased it. > postgresql:pg_waldump test suite didn't pass after the rebase. I fixed > it too. Other than that the

Do we want to enable foreign key constraints on subscriber?

2023-07-19 Thread Kyotaro Horiguchi
Hello. There's an issue brought up in the -bugs list [1]. Since triggers are deactivated on a subscriber by default, foreign key constraints don't fire for replicated changes. The docs state this is done to prevent repetitive data propagation between tables on subscribers. But foreign key

Re: add non-option reordering to in-tree getopt_long

2023-07-13 Thread Kyotaro Horiguchi
ts the first non-option "initdb". This is somewhat different from the last time what I saw the patch and looks strange at a glance.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: add non-option reordering to in-tree getopt_long

2023-07-11 Thread Kyotaro Horiguchi
ake of speed here. Plus, this version looks the most simple to me. That being said, it might be better if the last term is positioned in the second place. This is mainly because a lone hyphen is less common than words that starts with characters other than a pyphen. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: add non-option reordering to in-tree getopt_long

2023-07-10 Thread Kyotaro Horiguchi
m fine with the following structure here. > if (!force_nonopt ... ) > { > if (place[1] == '-' && place[2] == 0) > { > optind+; > force_nonopt = true; > continue; > } > break; > } (To be honest, I see the goto looked clear than for(;;)..) regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Standardize type of variable when extending Buffers

2023-07-10 Thread Kyotaro Horiguchi
GTM, too. I don't think it will actually come to play, since I believe we won't be expanding a relation by 16TB all at once. Nevertheless, I believe keeping things tidy is a good habit to stick to. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add hint message for check_log_destination()

2023-07-09 Thread Kyotaro Horiguchi
ector is off. Although this is documented, we don't give any warnings at startup. This seems like a bigger issue than the unusable keywords. (I don't mean to suggest to fix this, as usual.) In short, I think a simple message like '"xxx" cannot be used in this build' should suffice for keywords defined but unusable, and we should stick with "unknown" for the undefined ones. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Is a pg_stat_force_next_flush() call sufficient for regression tests?

2023-07-03 Thread Kyotaro Horiguchi
begin-commit block, the assertion fired off immediately as a matter of course. Is there any chance concurrent backends or some other things can actually hinder the backend from reusing buffers? regards. -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/backend/utils/activity/pgst

Re: Optionally using a better backtrace library?

2023-07-02 Thread Kyotaro Horiguchi
At Sun, 2 Jul 2023 11:31:56 -0700, Andres Freund wrote in > The state I currently have is very hacky, but if there's interest in > upstreaming something like this, I could clean it up. I can't help voting +1. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: ProcessStartupPacket(): database_name and user_name truncation

2023-07-02 Thread Kyotaro Horiguchi
At Mon, 03 Jul 2023 10:50:45 +0900 (JST), Kyotaro Horiguchi wrote in > For the record, if I understand Nathan correctly, it is what I > suggested in my initial post. If this is correct, +1 for the suggestion. > > me> I think we might want to consider outright rejecting the >

Re: ProcessStartupPacket(): database_name and user_name truncation

2023-07-02 Thread Kyotaro Horiguchi
gt; > Yeah agree, thanks Nathan for the idea. > I'll work on a new patch version proposal. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: vacuumdb/clusterdb/reindexdb: allow specifying objects to process in all databases

2023-06-29 Thread Kyotaro Horiguchi
At Thu, 29 Jun 2023 13:56:38 -0700, Nathan Bossart wrote in > Thanks for taking a look. > > On Thu, Jun 29, 2023 at 02:16:26PM +0900, Kyotaro Horiguchi wrote: > > At Wed, 28 Jun 2023 16:24:02 -0700, Nathan Bossart > > wrote in > >> I debated also allowing us

Re: vacuumdb/clusterdb/reindexdb: allow specifying objects to process in all databases

2023-06-28 Thread Kyotaro Horiguchi
ht want to add such complexity to these "script" tools. So.. an alternative path might be to introduce a new option like --syscatalog to specify system catalogs as the only option that can be combined with --all. In doing so, we can leave the --table and --schema options untouched. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_rewind WAL segments deletion pitfall

2023-06-28 Thread Kyotaro Horiguchi
that determines how each file should be handled, but it is currently making wrong dicisions for WAL files. The goal here is to rectify this behavior and ensure that pg_rewind makes the right decisions. > Attached modified reproduction script for reference. > > [1]https://www.postgresql.org

Re: Add TLI number to name of files generated by pg_waldump --save-fullpage

2023-06-27 Thread Kyotaro Horiguchi
At Tue, 27 Jun 2023 18:58:39 -0500, David Christensen wrote in > > Adjusted as per the v2 attached. > > +1 +1 regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add TLI number to name of files generated by pg_waldump --save-fullpage

2023-06-27 Thread Kyotaro Horiguchi
Of course, it's wrong. At Tue, 27 Jun 2023 16:39:52 +0900 (JST), Kyotaro Horiguchi wrote in > I meant that the name is structured as - TLIh-TLIl._, which + LSNh-LSNl._, which > appears to be inconsistent with the comment. (And I'm not sure what > "TLOID"

Re: Add TLI number to name of files generated by pg_waldump --save-fullpage

2023-06-27 Thread Kyotaro Horiguchi
At Tue, 27 Jun 2023 15:58:38 +0900, Michael Paquier wrote in > On Tue, Jun 27, 2023 at 03:44:04PM +0900, Kyotaro Horiguchi wrote: > > The file name was "LSNh-LSNl.spcOid.dbOid.relNumber.blk_forkname", but > > the comment in the TAP script read

Re: Add TLI number to name of files generated by pg_waldump --save-fullpage

2023-06-27 Thread Kyotaro Horiguchi
he TAP script read as: -# -.DBOID.TLOID.NODEOID.dd_fork with the components being: which looks wrong. I'm not sure it is a business of this patch, though.. # Documentation looks coorect. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Allow pg_archivecleanup to remove backup history files

2023-06-22 Thread Kyotaro Horiguchi
wing changes are sufficient and easier to read (at least for me). > open my $file, '>', "$tempdir/$fn->{name}"; > foreach my $fn (map {$_->{name}} @walfiles_with_gz) regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: bgwriter doesn't flush WAL stats

2023-06-21 Thread Kyotaro Horiguchi
[1] https://www.postgresql.org/message-id/CAAKRu_bM55pj3pPRW0nd_-paWHLRkOU69r816AeztBBa-N1HLA%40mail.gmail.com regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: ProcessStartupPacket(): database_name and user_name truncation

2023-06-21 Thread Kyotaro Horiguchi
et, since the database with the exact given name cannot be found. While it is somewhat off-topic, I cannot establish a connection if the console encoding differs from the template database even if I provide the identical database name. (I don't mean I want that behavior to be "fix"ed.)

Re: Allow pg_archivecleanup to remove backup history files

2023-06-20 Thread Kyotaro Horiguchi
m to refactor and decrease the nesting level even further, considering that 0003 already does this to some extent, when I suggested it. In that sense, moving the nest-reduction part of 0003 into 0002 makes us possible to focus on the point of this patch. What do you think about the attached version? regard

Re: add non-option reordering to in-tree getopt_long

2023-06-19 Thread Kyotaro Horiguchi
At Fri, 16 Jun 2023 11:28:47 -0700, Nathan Bossart wrote in > On Fri, Jun 16, 2023 at 04:51:38PM +0900, Kyotaro Horiguchi wrote: > > (Honestly, the rearrangement code looks somewhat tricky to grasp..) > > Yeah, I think there's still some room for improvement here. The ar

Re: [BUG] recovery of prepared transactions during promotion can fail

2023-06-18 Thread Kyotaro Horiguchi
gt; > and PG 13. It's debatable whether the fix needs to be brought back > > to 12 and older also, as those do not exhibit this issue, but the > > order of renaming is still wrong. > > Yeah, I'd rather wait for somebody to complain about that. And v11 is > not worth taking risks with at this time of the year, IMHO. I don't have a complaint as the whole. > With your fix included, the patch for REL_14_STABLE would be like the > attached. Is that OK for you? regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: [BUG] recovery of prepared transactions during promotion can fail

2023-06-18 Thread Kyotaro Horiguchi
those > versions as well. There's no immediate need to change the versions. However, I would prefer to backpatch them to the older versions for the following reasons. 1. Applying this eases future backpatching in this area, if any. 2. I have reservations about renaming possibly-open WAL segments. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: add non-option reordering to in-tree getopt_long

2023-06-16 Thread Kyotaro Horiguchi
'--'. For your information, the glibc version yields the following result for the same options. psql -t -T hoho -a -- [hoge] -1 hage hige huge regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add a perl function in Cluster.pm to generate WAL

2023-06-15 Thread Kyotaro Horiguchi
esn't seem to matter, but it seems intended to let checkpoint trigger the removal of the last segment. However, I'm unsure how the insert would influence this that way. If my understanding is correct, then I'd support its removal. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Allow pg_archivecleanup to remove backup history files

2023-06-15 Thread Kyotaro Horiguchi
At Fri, 16 Jun 2023 11:22:31 +0900 (JST), Kyotaro Horiguchi wrote in > ASAICS the main section of the "pg_rewind --help" fits within 80 > columns. However, "initdb --help" does output a few lines exceeding > the 80-column limit. Judging by the surrounding lines, I

Re: Allow pg_archivecleanup to remove backup history files

2023-06-15 Thread Kyotaro Horiguchi
At Thu, 15 Jun 2023 21:38:28 +0900, torikoshia wrote in > On 2023-06-15 15:20, Kyotaro Horiguchi wrote: > Thanks for your review! > > + printf(_(" -x, --strip-extension=EXT strip this extention before > > identifying files fo clean up\n")); > > + printf(_(&quo

Re: Consistent coding for the naming of LR workers

2023-06-15 Thread Kyotaro Horiguchi
es; instead, it makes grepping difficult. Addition to that, I'm inclined to concur with Alvaro regarding the gramattical aspect. Consequently, I'd prefer to leave these alone. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Allow pg_archivecleanup to remove backup history files

2023-06-15 Thread Kyotaro Horiguchi
to this patch, but a help line a few lines further down also exceeds the width. We could shorten it by removing the "/mnt/server" portion, but I'm not sure if it's worth doing. > Or for use as a standalone archive cleaner: > e.g. > pg_archivecleanup /mnt/server/archiverdir &g

Re: add non-option reordering to in-tree getopt_long

2023-06-14 Thread Kyotaro Horiguchi
cted to a different memory location. If that's the case, we can prpbably rearrange the array, even if there's a small window where ps might display a confusing command line, right? regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add a perl function in Cluster.pm to generate WAL

2023-06-14 Thread Kyotaro Horiguchi
Mmm. It seems like the email I thought I'd sent failed to go out. At Sun, 11 Jun 2023 07:14:54 +0530, Bharath Rupireddy wrote in > On Wed, Aug 24, 2022 at 6:42 AM Kyotaro Horiguchi > wrote: > > > > At Tue, 16 Aug 2022 18:40:49 +0200, Alvaro Herrera > > wrote in >

Re: Shouldn't cost_append() also scale the partial path's cost?

2023-06-14 Thread Kyotaro Horiguchi
trange that rows are adjusted but cost is not, so we might want to add an explanation in this aspect. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Let's make PostgreSQL multi-threaded

2023-06-14 Thread Kyotaro Horiguchi
remember of a relatively old thread about that. https://www.postgresql.org/message-id/4E72940DA2BF16479384A86D54D0988A567B9245%40G01JPEXMBKW04 regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Document that server will start even if it's unable to open some TCP/IP ports

2023-06-13 Thread Kyotaro Horiguchi
s fine iff I use '*' for listen_addresses. IMHO, for "reliable" auto-adaption, we might want '[+-]?xxx.xxx.xxx.xxx/nn' (and the same for v6), or '[+-]?interface-name' notation to require, allow, or disallow to use specific networks. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add wait event for log emission?

2023-06-13 Thread Kyotaro Horiguchi
s somewhat of a misuse of wait events, but might be useful nonetheless? We are already doing something similar for archive_command. Given that the execution time of this hook is unpredictable, it seems resonable to me to do that there. Essentially, we are "waiting" for the hook-function to return. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

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