Re: Add hint message for check_log_destination()

2023-07-09 Thread Kyotaro Horiguchi
quot; as an example, -- it doesn't work as expected if logging_collector 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
t.sql within a 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/util

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
dle it. > > > > 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 users

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

2023-06-28 Thread Kyotaro Horiguchi
on't think we might 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
lready has a feature 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:

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 > "T

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-26 Thread Kyotaro Horiguchi
the 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
ncreases the line count without cutting any lines. The following 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
ate > dimension? [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
artup packet, 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 &quo

Re: Allow pg_archivecleanup to remove backup history files

2023-06-20 Thread Kyotaro Horiguchi
e room 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? r

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. T

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

2023-06-18 Thread Kyotaro Horiguchi
e backpatched to PG 14 > > 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
nd > earlier, so I can produce the patches for 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
logic needs to take into account the '--'. 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
we? The change itself doesn'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
essages; 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-14 Thread Kyotaro Horiguchi
unrelated 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/se

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

2023-06-14 Thread Kyotaro Horiguchi
n that argv[0] can be safely redirected 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
it looks strange 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
). The current auto-adaption is 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
nd emit_log_hook - > it'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

Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)

2023-06-13 Thread Kyotaro Horiguchi
At Wed, 14 Jun 2023 10:01:59 +0900 (JST), Kyotaro Horiguchi wrote in > If we decide to remove it, the preceding blank line seems to be a > separator from the previous function call. So, we might want to Mmm. that is a bit short. Anyway I meant that the blank will become useless after re

Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)

2023-06-13 Thread Kyotaro Horiguchi
licy is to call RelationGetSmgr() each time before using smgr, and this is well documented in the function's comment. If we decide to remove it, the preceding blank line seems to be a separator from the previous function call. So, we might want to consider removing that blank line, too. O

Re: Let's make PostgreSQL multi-threaded

2023-06-13 Thread Kyotaro Horiguchi
At Tue, 13 Jun 2023 11:20:56 +0300, Konstantin Knizhnik wrote in > > > On 13.06.2023 10:55 AM, Kyotaro Horiguchi wrote: > > At Tue, 13 Jun 2023 09:55:36 +0300, Konstantin Knizhnik > > wrote in > >> Postgres backend is "thick" not because of large nu

Re: Let's make PostgreSQL multi-threaded

2023-06-13 Thread Kyotaro Horiguchi
model, we will need an expiration mechanism for those stuff. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)

2023-06-13 Thread Kyotaro Horiguchi
it shouldn't happen) as the entire relation should already be locked. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

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

2023-06-13 Thread Kyotaro Horiguchi
At Mon, 12 Jun 2023 22:13:43 -0700, Nathan Bossart wrote in > On Tue, Jun 13, 2023 at 12:00:01PM +0900, Kyotaro Horiguchi wrote: > > POSIXLY_CORRECT appears to be intended for debugging or feature > > validation. If we know we can always rearrange argv on those > > platfo

Re: pg_stat_io for the startup process

2023-06-12 Thread Kyotaro Horiguchi
ts.). Thanks for the reply! regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_stat_io for the startup process

2023-06-12 Thread Kyotaro Horiguchi
At Fri, 9 Jun 2023 21:28:23 -0700, Andres Freund wrote in > Hi, > > On 2023-05-22 13:36:42 +0900, Kyotaro Horiguchi wrote: > > At Sun, 21 May 2023 15:14:23 -0700, Andres Freund > > wrote in > > > Hi, > > > > > > I don't really f

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

2023-06-12 Thread Kyotaro Horiguchi
want it. > > I briefly looked at getopt() and concluded that we should probably retain > its POSIX-compliant behavior for non-options, as reordering support seems > much less universal than with getopt_long(). AFAICT all client utilities > use getopt_long(), anyway. > > Thoughts? As far as I can see, getopt_long on Rocky9 does *not* rearrange argv until it reaches the end of the array. But it won't matter much. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: 回复:Fix missing initialization of delayChkptEnd

2023-06-05 Thread Kyotaro Horiguchi
n compaing with the corresponding parts of 15, it hit me that ProcArrayClearTransaction() needs an assertion on the variable. Other than that, the patch looks good to me. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Allow pg_archivecleanup to remove backup history files

2023-05-25 Thread Kyotaro Horiguchi
worked similarly, and I believe it results in a more standard structure. if ((xldir = opendir(archiveLocation)) != NULL) { ... } else pg_fatal("could not open archive location.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: could not extend file "base/5/3501" with FileFallocate(): Interrupted system call

2023-05-23 Thread Kyotaro Horiguchi
At Tue, 23 May 2023 19:28:45 -0700, Andres Freund wrote in > Hi, > > On 2023-05-24 10:56:28 +0900, Kyotaro Horiguchi wrote: > > At Wed, 26 Apr 2023 11:37:55 +1200, Thomas Munro > > wrote in > > > On Tue, Apr 25, 2023 at 12:16 PM Andres Freund wrote: > &

Re: could not extend file "base/5/3501" with FileFallocate(): Interrupted system call

2023-05-23 Thread Kyotaro Horiguchi
gt; cases we actually have here. FWIW I share the same feeling about looping by EINTR without signals being blocked. If we just retry the same operation without processing signals after getting EINTR, I think blocking signals is better. We could block signals more gracefully, but I'm not sure it's worth the complexity. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_stat_io for the startup process

2023-05-21 Thread Kyotaro Horiguchi
l. While I can't confidently claim it is the best, its simplicilty gives us a solid reason to proceed with it. If necessary, we can switch to alternative timing sources in the future without causing major disruptions for users, I believe. > It's not the prettiest solution, but I think

Re: walsender performance regression due to logical decoding on standby changes

2023-05-18 Thread Kyotaro Horiguchi
the stream is tightly packed. I'm just wondering why logical replication doesn't (or can't) do the same thing, IMHO. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: pg_stat_io for the startup process

2023-05-11 Thread Kyotaro Horiguchi
Thanks for clarifying! At Mon, 8 May 2023 14:46:43 -0700, Andres Freund wrote in > Hi, > > On 2023-04-26 18:47:14 +0900, Kyotaro Horiguchi wrote: > > I see four issues here. > > > > 1. The current database stats omits buffer fetches that don't > > origi

Re: pg_stat_io for the startup process

2023-04-27 Thread Kyotaro Horiguchi
At Fri, 28 Apr 2023 11:15:51 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 27 Apr 2023 17:30:40 -0400, Melanie Plageman > wrote in > > After a quick example implementation of this, I found that it seemed to > > try and flush the stats less often on an idle standby

Re: pg_stat_io for the startup process

2023-04-27 Thread Kyotaro Horiguchi
At Thu, 27 Apr 2023 17:30:40 -0400, Melanie Plageman wrote in > On Wed, Apr 26, 2023 at 2:53 PM Melih Mutlu wrote: > > > > Hi all, > > > > Robert Haas , 26 Nis 2023 Çar, 15:34 tarihinde şunu > > yazdı: > >> > >> On Wed, Apr 26, 2023 at 5:

Re: In-placre persistance change of a relation

2023-04-27 Thread Kyotaro Horiguchi
(I find the misspelled subject makes it difficult to find the thread..) At Thu, 27 Apr 2023 14:47:41 +0200, Jakub Wartak wrote in > On Tue, Apr 25, 2023 at 9:55 AM Kyotaro Horiguchi > wrote: > > > > Rebased. > > > > I fixed some code comments and comm

Re: pg_stat_io not tracking smgrwriteback() is confusing

2023-04-26 Thread Kyotaro Horiguchi
OCONTEXT_NORMAL since these are the +* most likely targets for writeback. The backend can overwrite these as +* appropriate. Or I actually think we might not even need to pass around the io_* parameters and could just pass immediate values to the pgstat_count_io_op_time call. If we

Re: pg_stat_io for the startup process

2023-04-26 Thread Kyotaro Horiguchi
As a result, the attached patch, which is meant for discussion, allows pg_stat_database to show fetches and reads by the startup process as the counts for the database with id 0. There's still some difference between pg_stat_io and pg_stat_database, but I haven't examined it in detail.

Re: Allow pg_archivecleanup to remove backup history files

2023-04-25 Thread Kyotaro Horiguchi
009 > > $ ls archivedir > 00010009 0001000A.partial > > Any thoughts? I thought that we have decided not to do that, but I coundn't find any discussion about it in the ML archive. Anyway, I think it is great that we have that option. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: In-placre persistance change of a relation

2023-04-25 Thread Kyotaro Horiguchi
At Fri, 17 Mar 2023 15:16:34 +0900 (JST), Kyotaro Horiguchi wrote in > Mmm. It took longer than I said, but this is the patch set that > includes all three parts. > > 1. "Mark files" to prevent orphan storage files for in-transaction > created relations after

seemingly useless #include recently added

2023-04-24 Thread Kyotaro Horiguchi
thout it. Moreover, it brings in some server-related stuff when I incluce smgr.h in storage_xlog.h, causing compilation issues for pg_rewind. Should we remove it? Please find the attached patch. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Perform streaming logical transactions by background workers and parallel apply

2023-04-23 Thread Kyotaro Horiguchi
> > > > I think ERROR should be fine here similar to other cases in worker.c. Sure, I don't have any issues with it. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Perform streaming logical transactions by background workers and parallel apply

2023-04-23 Thread Kyotaro Horiguchi
At Mon, 24 Apr 2023 11:50:37 +0900 (JST), Kyotaro Horiguchi wrote in > In my opinion, it is fine to replace the Assert with an ERROR. Sorry for posting multiple times in a row, but I'm a bit unceratin whether we should use FATAL or ERROR for this situation. The stream is not provided

Re: Perform streaming logical transactions by background workers and parallel apply

2023-04-23 Thread Kyotaro Horiguchi
At Mon, 24 Apr 2023 11:50:37 +0900 (JST), Kyotaro Horiguchi wrote in > I concur that returning false is problematic. > > For assertion builds, Assert typically provides more detailed > information than elog. However, in this case, it wouldn't matter much > since the wor

Re: Perform streaming logical transactions by background workers and parallel apply

2023-04-23 Thread Kyotaro Horiguchi
ituation doesn't justify server-restaring, as it would unnecessarily involve other backends. In my opinion, it is fine to replace the Assert with an ERROR. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Fix documentation for max_wal_size and min_wal_size

2023-04-23 Thread Kyotaro Horiguchi
At Mon, 24 Apr 2023 10:57:56 +0900 (JST), Kyotaro Horiguchi wrote in > So, to clarify the situation, I would phrase it like this: > > The default size is 80MB. Note that if you have changed the WAL > segment size from the default of 16MB with the initdb option > --wal-segsize,

Re: New committers: Nathan Bossart, Amit Langote, Masahiko Sawada

2023-04-20 Thread Kyotaro Horiguchi
uch success and few reverts. Congratulations to all, from me, too, wishing much success! regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: eclg -C ORACLE breaks data

2023-04-19 Thread Kyotaro Horiguchi
At Thu, 20 Apr 2023 13:00:52 +0900, Michael Paquier wrote in > On Thu, Apr 20, 2023 at 12:56:32PM +0900, Kyotaro Horiguchi wrote: > > Oh, I didn't realize there were differences in the > > configurations. Good to know. > > C99 declarations are OK in v12~, so with

Re: Remove io prefix from pg_stat_io columns

2023-04-19 Thread Kyotaro Horiguchi
to apply this one myself, with a catversion bump. (Happy to > help.) So, I don't have any issues with the patch overall. From what I can tell, there are no remaining instances of io_foobar that need to be rewritten. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: eclg -C ORACLE breaks data

2023-04-19 Thread Kyotaro Horiguchi
] > for (int i = 0 ; i < sqlda->sqld ; i++) > > I'll go fix that in a minute, across all the branches for > consistency. Oh, I didn't realize there were differences in the configurations. Good to know. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: eclg -C ORACLE breaks data

2023-04-17 Thread Kyotaro Horiguchi
(sorry for the wrong subject..) At Mon, 17 Apr 2023 17:00:59 +0900, Michael Paquier wrote in > On Mon, Apr 10, 2023 at 05:35:00PM +0900, Kyotaro Horiguchi wrote: > > This results in overwriting str[-1], the last byte of the preceding > > numeric in this case, with 0x00, represe

Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply

2023-04-17 Thread Kyotaro Horiguchi
..). In my opinion, PQconnectPoll and PQgetCancel should use the same parsing function or PQconnectPoll should set parsed values, making unnecessary for PQgetCancel to parse the same parameter again. Additionally, PQgetCancel should set appropriate error messages for all failure modes. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Fix documentation for max_wal_size and min_wal_size

2023-04-14 Thread Kyotaro Horiguchi
written like this: "The default size is 80MB. However, if you have changed the WAL segment size from the default of 16MB, it will be five times the segment size.", but I'm not sure what the others think about this.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: psql: Add role's membership options to the \du+ command

2023-04-14 Thread Kyotaro Horiguchi
=# select memberofexplode('pg_read_server_files=ais/horiguti,pg_execute_server_program=/postgres'); privilege | grantor | admin | inherit | set ---+--+---+-+--- pg_read_server_files | horiguti | true | true| true pg_ex

Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply

2023-04-12 Thread Kyotaro Horiguchi
owever, I notcied that PQgetCancel() doesn't set errbuf.. So, I'm fine with your proposal. > I think it is important to inform the user when an error > occurs and a cancel request cannot be sent, as this information > can help them identify the cause of the problem (such as > setting an overly large value for the keepalives parameter). Although I view it as an internal error, I agree with emitting some error messages in that situation. regrads. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Bufmgr possible overflow

2023-04-12 Thread Kyotaro Horiguchi
ctions. Regarding the duplicate assignment to existing_hdr, I prefer assigning it in the definition line, but I don't have a strong opinion on this matter. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply

2023-04-11 Thread Kyotaro Horiguchi
gfdw_cancel_query_begin() ignores the result from PQgetCancel(), but I think we don't need another ereport. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread Kyotaro Horiguchi
g > is out of step with these messages. On the other hand, the documentation write optinos in uppercase [1]. It is why I did not push hard for the normalization. [1] https://www.postgresql.org/docs/devel/sql-vacuum.html regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Improve logging when using Huge Pages

2023-04-11 Thread Kyotaro Horiguchi
At Tue, 11 Apr 2023 15:17:46 +0900, Michael Paquier wrote in > On Thu, Mar 23, 2023 at 05:25:46PM +0900, Kyotaro Horiguchi wrote: > > Wouldn't storing the value in the shared memory itself work? Though, > > that space does become almost dead for the server's lifetime...

eclg -C ORACLE breaks data

2023-04-10 Thread Kyotaro Horiguchi
, the current fix presumes exact-fit storage when varcharsize is zero. I haven't fully checked, but at least back to 10 have this issue. Thoughts? regards. -- Kyotaro Horiguchi NTT Open Source Software Center #include #include #include #include #include #include #include EXE

Re: failure in 019_replslot_limit

2023-04-05 Thread Kyotaro Horiguchi
e missed. If that's the case, we'll need to check active_pid again after the calling ConditionVariablePrepareToSleep(). Does this make sense? regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Should vacuum process config file reload more often

2023-04-05 Thread Kyotaro Horiguchi
short interval and +* thereby thrash the global balance. */ LWLockAcquire(AutovacuumScheduleLock, LW_EXCLUSIVE); MyWorkerInfo->wi_tableoid = InvalidOid; The comment mentions wi_dobalance, but it doesn't appear here.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access

2023-04-02 Thread Kyotaro Horiguchi
more attenstion to it, I would use an assertion, but I don't think it's necessary here. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Should vacuum process config file reload more often

2023-03-29 Thread Kyotaro Horiguchi
At Wed, 29 Mar 2023 13:21:55 +0900 (JST), Kyotaro Horiguchi wrote in > So, sorry for the noise. I'll review it while this into cnosideration. 0003: It's not this patche's fault, but I don't like the fact that the variables used for GUC, VacuumCostDelay and VacuumCostLim

Re: Should vacuum process config file reload more often

2023-03-28 Thread Kyotaro Horiguchi
At Wed, 29 Mar 2023 13:21:55 +0900 (JST), Kyotaro Horiguchi wrote in > autovacuum.c:2893 > /* >* If any of the cost delay parameters has been set > individually for >* this table, disable the bala

Re: Should vacuum process config file reload more often

2023-03-28 Thread Kyotaro Horiguchi
At Wed, 29 Mar 2023 12:09:08 +0900 (JST), Kyotaro Horiguchi wrote in > timeing perfectly. I think we might accidentally add a reload > timing. In that case, the assumption could break. In most cases, I > think we use snapshotting in various ways to avoid unintended variable > cha

Re: Should vacuum process config file reload more often

2023-03-28 Thread Kyotaro Horiguchi
At Tue, 28 Mar 2023 20:35:28 -0400, Melanie Plageman wrote in > On Tue, Mar 28, 2023 at 4:21 AM Kyotaro Horiguchi > wrote: > > > > At Mon, 27 Mar 2023 14:12:03 -0400, Melanie Plageman > > wrote in > > > So, I've attached an alternate version of the patc

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-03-28 Thread Kyotaro Horiguchi
ls, maybe because it's not clear whether "block" refers to our buffer blocks or file blocks to me.. If it is generally clear, I'm fine with the proposal. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Should vacuum process config file reload more often

2023-03-28 Thread Kyotaro Horiguchi
VacuumCostLimit = Max(Min(balanced_cost_limit, vac_cost_limit), 1); } This seems to repeatedly divide VacuumCostLimit by nworkers_for_balance. I'm not sure, but this function might only be called after a reload. If that's the case, I don't think it's safe coding, even if it works. regars. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-03-27 Thread Kyotaro Horiguchi
or pg_stat_get_xact_blocks_fetched(). The confusion stems from the inconsistency between the views and underlying functions related to block reads and hits. If we add descriptions for the two functions, we should also explain their relationship. Otherwise, it might be better to add the functio

Re: Assertion in pgstat_assoc_relation() fails intermittently

2023-03-27 Thread Kyotaro Horiguchi
postgres/inst/bin/postgres(+0x1326f5)[0x55d98f8576f5] > /home/ubuntu/postgres/inst/bin/postgres(heap_beginscan+0x17a)[0x55d98f8586b5] > /home/ubuntu/postgres/inst/bin/postgres(table_beginscan_catalog+0x6e)[0x55d98f8c4cf3] regareds. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: awkward cancellation of parallel queries on standby.

2023-03-27 Thread Kyotaro Horiguchi
gresMain, there's still a possibility of the cancellation if a conflicting process tries to read a command right before ending the ongoing transaction. Although we might prevent cancellations in those final moments, it seems like things could get complicated. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-26 Thread Kyotaro Horiguchi
ear where +* that decision should be made though? For now just use a cutoff of +* 8, anything between 4 and 8 worked OK in some local testing. The chose is quite similar to what FileFallocate() makes. However, I'm not sure FileFallocate() itself should be doing this. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Add pg_walinspect function with block info columns

2023-03-26 Thread Kyotaro Horiguchi
o, although it may not be significant for SQL, the rows are output in lsn order from the function. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Error "initial slot snapshot too large" in create replication slot

2023-03-23 Thread Kyotaro Horiguchi
Thanks for looking this! At Thu, 23 Mar 2023 14:15:12 +0530, Dilip Kumar wrote in > On Thu, Mar 23, 2023 at 10:53 AM Kyotaro Horiguchi > wrote: > Thanks for working on this, your idea looks fine but my only worry is > that in the future if someone tries to change

Re: Improve logging when using Huge Pages

2023-03-23 Thread Kyotaro Horiguchi
pealing. Wouldn't storing the value in the shared memory itself work? Though, that space does become almost dead for the server's lifetime... regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Error "initial slot snapshot too large" in create replication slot

2023-03-22 Thread Kyotaro Horiguchi
At Wed, 22 Mar 2023 14:27:40 +0900 (JST), Kyotaro Horiguchi wrote in > At Mon, 20 Mar 2023 13:46:51 -0400, "Gregory Stark (as CFM)" > wrote in > > Kyotoro Horiguchi, any chance you'll be able to work on this for this > > commitfest? If so shout (or anyone

Re: Error "initial slot snapshot too large" in create replication slot

2023-03-21 Thread Kyotaro Horiguchi
lost track of the conversation. I'm currently working on this and will come back soon with a new version. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-03-21 Thread Kyotaro Horiguchi
it should be "number of buffers fetched". > > + > > +pg_stat_get_xact_blocks_hit ( > > oid ) > > +bigint > > + > > + > > +Returns the number of buffer hits for table or index, in the > > current transaction > > + > > This one looks OK to me too. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Fix misplaced shared_preload_libraries_in_progress check in few extensions

2023-03-20 Thread Kyotaro Horiguchi
king in that case. I didn't look at the part for worker_spi.c. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

About a recently-added permission-related error message

2023-03-20 Thread Kyotaro Horiguchi
1" requires the REPLICATION attribute. What do you think about this change? regards. -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 31d6a05426..31b33524ad 100644 --- a/src/backend/utils/init/

Re: Add pg_walinspect function with block info columns

2023-03-19 Thread Kyotaro Horiguchi
lRecordInfo, but I don't think this approach is clean and stable. I agree we don't want the final columns in a block info tuple but we don't want to duplicate the common code path. I initially thought we could devide the function into GetWALCommonInfo(), GetWALRecordInfo() and GetWALBlockInfo(), but it doesn't seem that simple.. In the end, I think we should have separate GetWALRecordInfo() and GetWALBlockInfo() that have duplicate "values[i++] = .." lines. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: In-placre persistance change of a relation

2023-03-16 Thread Kyotaro Horiguchi
At Fri, 03 Mar 2023 18:03:53 +0900 (JST), Kyotaro Horiguchi wrote in > Correctly they are three parts. The attached patch is the first part - > the storage mark files, which are used to identify storage files that > have not been committed and should be removed during the next > s

Re: "current directory" in a server error message

2023-03-16 Thread Kyotaro Horiguchi
At Thu, 16 Mar 2023 12:05:32 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > At Thu, 16 Mar 2023 09:32:05 +0530, Bharath Rupireddy > > wrote in > >> On Thu, Mar 16, 2023 at 7:47 AM Kyotaro Horiguchi > >> wrote: > >>> Thus I think tha

Re: "current directory" in a server error message

2023-03-16 Thread Kyotaro Horiguchi
At Thu, 16 Mar 2023 09:32:05 +0530, Bharath Rupireddy wrote in > On Thu, Mar 16, 2023 at 7:47 AM Kyotaro Horiguchi > wrote: > > Thus I think that the message should read "path must be in or below > > the data directory" instead. > > > > What do you think

"current directory" in a server error message

2023-03-15 Thread Kyotaro Horiguchi
27;t apply to the server side. In fact, the function comment for convert_and_check_filename explicitly states that: > * Filename may be absolute or relative to the DataDir Thus I think that the message should read "path must be in or below the data directory" instead. What do you thi

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