Re: Add last_vacuum_index_scans in pg_stat_all_tables

2022-09-15 Thread Fujii Masao
On 2022/09/16 13:23, Ken Kato wrote: Regression is failing on all platforms; please correct that and resubmit the patch. Hi, Thank you for the review! I fixed it and resubmitting the patch. Could you tell me why the number of index scans should be tracked for each table? Instead, isn't

Re: why can't a table be part of the same publication as its schema

2022-09-15 Thread Amit Kapila
On Thu, Sep 15, 2022 at 6:27 PM houzj.f...@fujitsu.com wrote: > > Attach the new version patch which added suggested restriction for column list > and merged Vignesh's patch. > Few comments: 1. static void -CheckPubRelationColumnList(List *tables, const char *queryString,

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-09-15 Thread Kyotaro Horiguchi
At Thu, 15 Sep 2022 11:15:12 -0500, Jaime Casanova wrote in > It fails at ./src/backend/utils/activity/pgstat_shmem.c:530 inside Thanks for the info. I reproduced by make check.. stupid.. It's the thinko about the base address of reset_off. So the attached doesn't crash.. regards. --

Re: ICU for global collation

2022-09-15 Thread Kyotaro Horiguchi
At Thu, 15 Sep 2022 18:41:31 +0300, Marina Polyakova wrote in > P.S. While working on the patch, I discovered that UTF8 encoding is > always used for the ICU provider in initdb unless it is explicitly > specified by the user: > > if (!encoding && locale_provider == COLLPROVIDER_ICU) >

Re: Add last_vacuum_index_scans in pg_stat_all_tables

2022-09-15 Thread Ken Kato
Regression is failing on all platforms; please correct that and resubmit the patch. Hi, Thank you for the review! I fixed it and resubmitting the patch. Regards, -- Ken Kato Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATIONdiff --git

Re: missing indexes in indexlist with partitioned tables

2022-09-15 Thread David Rowley
On Wed, 3 Aug 2022 at 11:07, Arne Roland wrote: > Attached a rebased version of the patch. Firstly, I agree that we should fix the issue of join removals not working with partitioned tables. I had a quick look over this and the first thing that I thought was the same as what Amit mentioned in:

Re: Typo in xact.c

2022-09-15 Thread Japin Li
On Fri, 16 Sep 2022 at 11:11, Kyotaro Horiguchi wrote: > At Thu, 15 Sep 2022 22:38:01 +0800, Japin Li wrote in >> >> Hi hacker, >> >> Recently, I find there might be a typo in xact.c comments. The comments >> say "PG_PROC", however, it actually means "PGPROC" structure. Since we >> have

Re: Typo in xact.c

2022-09-15 Thread Japin Li
On Fri, 16 Sep 2022 at 11:51, John Naylor wrote: > On Fri, Sep 16, 2022 at 10:11 AM Kyotaro Horiguchi > wrote: >> >> At Thu, 15 Sep 2022 22:38:01 +0800, Japin Li wrote in >> > >> > Hi hacker, >> > >> > Recently, I find there might be a typo in xact.c comments. The comments >> > say "PG_PROC",

Re: Typo in xact.c

2022-09-15 Thread John Naylor
On Fri, Sep 16, 2022 at 10:11 AM Kyotaro Horiguchi wrote: > > At Thu, 15 Sep 2022 22:38:01 +0800, Japin Li wrote in > > > > Hi hacker, > > > > Recently, I find there might be a typo in xact.c comments. The comments > > say "PG_PROC", however, it actually means "PGPROC" structure. Since we > >

Re: Switching XLog source from archive to streaming when primary available

2022-09-15 Thread Bharath Rupireddy
On Thu, Sep 15, 2022 at 1:52 PM Kyotaro Horiguchi wrote: > > At Thu, 15 Sep 2022 10:28:12 +0530, Bharath Rupireddy > wrote in > > I'm attaching the v6 patch that's rebased on to the latest HEAD. > > Please consider this for review. > > Thaks for the new version! > > +#define

Re: why can't a table be part of the same publication as its schema

2022-09-15 Thread Amit Kapila
On Thu, Sep 15, 2022 at 8:18 AM houzj.f...@fujitsu.com wrote: > > On Thursday, September 15, 2022 3:37 AM Peter Eisentraut > wrote: > > > Another option could be just ingore the column list if table's schema > > > is also part of publication. But it seems slightly inconsistent with > > > the

Re: Background writer and checkpointer in crash recovery

2022-09-15 Thread Justin Pryzby
I don't know that this warrants an Opened Item, but I think some fix ought to be applied to v15, whether that happens this week or next month.

Re: Typo in xact.c

2022-09-15 Thread Kyotaro Horiguchi
At Thu, 15 Sep 2022 22:38:01 +0800, Japin Li wrote in > > Hi hacker, > > Recently, I find there might be a typo in xact.c comments. The comments > say "PG_PROC", however, it actually means "PGPROC" structure. Since we > have pg_proc catalog, and use PG_PROC to reference the catalog [1], so,

Re: Inconsistencies in error messages

2022-09-15 Thread John Naylor
On Wed, Sep 14, 2022 at 5:25 PM John Naylor wrote: > Will commit this way unless there are objections. I forgot to mention yesterday, but this is done. -- John Naylor EDB: http://www.enterprisedb.com

Re: [PATCH]Feature improvement for MERGE tab completion

2022-09-15 Thread bt22kawamotok
Thanks for updating. + COMPLETE_WITH("UPDATE", "DELETE", "DO NOTHING"); "UPDATE" is always followed by "SET", so why not complement it with "UPDATE SET"? Thanks for reviewing. That's a good idea! I create new patch v7. Regards, Kotaro Kawamotodiff --git

Re: ICU for global collation

2022-09-15 Thread Michael Paquier
On Wed, Sep 14, 2022 at 05:19:34PM +0300, Marina Polyakova wrote: > I was surprised that it is allowed to create clusters/databases where the > default ICU collations do not actually work due to unsupported encodings: > > $ initdb --encoding SQL_ASCII --locale-provider icu --icu-locale en-US -D >

Re: pg_basebackup's --gzip switch misbehaves

2022-09-15 Thread Michael Paquier
On Wed, Sep 14, 2022 at 10:26:42AM +0200, Daniel Gustafsson wrote: > Maybe the creation of $tempdir should take PG_TEST_NOCLEAN into account and > not > register CLEANUP if set? Agreed. It sounds like a good idea to me to extend that to temporary paths, and then check those rmtree() calls where

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-15 Thread Kyotaro Horiguchi
At Thu, 15 Sep 2022 17:39:17 +0530, Amit Kapila wrote in > I see your point but I am still worried due to the concern raised by > Horiguchi-San earlier in this thread that the total number could be as > large as TOTAL_MAX_CACHED_SUBXIDS. I think if we want to include > information only on the

warning about missing format string annotations

2022-09-15 Thread Andres Freund
Hi, On 2022-09-15 21:18:03 +, Tom Lane wrote: > We're so used to having the compiler check this stuff for us that > a printf-like function without pg_attribute_printf is a land mine. > I wonder if there is a way to detect such omissions. gcc has -Wsuggest-attribute=format - but unfortunately

Re: Assertion failure in WaitForWALToBecomeAvailable state machine

2022-09-15 Thread Kyotaro Horiguchi
At Fri, 16 Sep 2022 09:05:46 +0900, Michael Paquier wrote in > On Thu, Sep 15, 2022 at 06:58:43AM -0700, Noah Misch wrote: > > Pushed that way. > > Thanks for taking care of it, Noah. +1. Thanks. regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: walmethods.c/h are doing some strange things

2022-09-15 Thread Kyotaro Horiguchi
At Fri, 2 Sep 2022 11:52:38 -0400, Robert Haas wrote in > that type that can ever exist, and the pointer to that object is > stored in a global variable managed by walmethods.c. So whereas in > other cases we give you the object and then a way to get the > corresponding set of callbacks, here we

Re: why can't a table be part of the same publication as its schema

2022-09-15 Thread Peter Smith
On Thu, Sep 15, 2022 at 10:57 PM houzj.f...@fujitsu.com wrote: > ... > Attach the new version patch which added suggested restriction for column list > and merged Vignesh's patch. > > Some other document might need to be updated. I will update them soon. > > Best regards, > Hou zj Hi Hou-san.

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-09-15 Thread Peter Smith
Here are some review comments for the latest v10 patch. (Mostly these are just nitpick wording/comments etc) == 1. Commit message It is often not feasible to use `REPLICA IDENTITY FULL` on the publication because it leads to full table scan per tuple change on the subscription. This makes

Re: remove_useless_groupby_columns is too enthusiastic

2022-09-15 Thread David Rowley
On Wed, 13 Jul 2022 at 05:31, Tom Lane wrote: > I tried the attached quick-hack patch that just prevents > remove_useless_groupby_columns from removing anything that > appears in ORDER BY. That successfully fixes the complained-of > case, and it doesn't change any existing regression test

Re: A question about wording in messages

2022-09-15 Thread Thomas Munro
On Wed, Sep 14, 2022 at 2:38 PM Tom Lane wrote: > Kyotaro Horiguchi writes: > > I saw the following message recently modified. > >> This controls the maximum distance we can read ahead in the WAL to > >> prefetch referenced data blocks. > > Maybe the "we" means "PostgreSQL program and you" but

Re: Kerberos delegation support in libpq and postgres_fdw

2022-09-15 Thread Jacob Champion
On Thu, Jul 7, 2022 at 4:24 PM Jacob Champion wrote: > So my question is this: does substituting my credentials for the admin's > credentials let me weaken or break the transport encryption on the > backend connection, and grab the password that I'm not supposed to have > access to as a front-end

Re: Assertion failure in WaitForWALToBecomeAvailable state machine

2022-09-15 Thread Michael Paquier
On Thu, Sep 15, 2022 at 06:58:43AM -0700, Noah Misch wrote: > Pushed that way. Thanks for taking care of it, Noah. -- Michael signature.asc Description: PGP signature

Backends stalled in 'startup' state

2022-09-15 Thread Ashwin Agrawal
We recently saw many backends (close to max_connection limit) get stalled in 'startup' in one of the production environments for Greenplum (fork of PostgreSQL). Tracing the reason, it was found all the tuples created by bootstrap (xmin=1) in pg_attribute were at super high block numbers (for

Oddities in our pg_attribute_printf usage

2022-09-15 Thread Tom Lane
Following my discovery of missed pg_attribute_printf coverage in libpq_pipeline (cf2c7a736), I went looking to see if we'd forgotten that anywhere else. The coverage seems to be solid ... except at the very root, where we have no such markers for pg_vsnprintf, pg_vsprintf, pg_vfprintf,

Re: [RFC] building postgres with meson - v13

2022-09-15 Thread Andres Freund
Hi, On 2022-09-16 09:14:20 +1200, Thomas Munro wrote: > GCC 12 produces a bunch of warnings by default with meson, and that > turned out to be because the default optimisation level is -O3. > That's a change from the make build, which uses -O2. Should we set a > default of 2, or is there some

Re: [RFC] building postgres with meson - v13

2022-09-15 Thread Thomas Munro
On Thu, Sep 15, 2022 at 2:26 PM Andres Freund wrote: > - noticed that libpgport.a had and needed a dependency on errcodes.h - that > seemed wrong. The dependency is due to src/port/*p{read,write}v?.c including > postgres.h - which seems wrong. So I added a patch changing them to include >

Re: Summary function for pg_buffercache

2022-09-15 Thread Andres Freund
Hi, On 2022-09-09 17:36:45 +0300, Aleksander Alekseev wrote: > I suggest we focus on saving the memory first and then think about the > performance, if necessary. Personally I think the locks part is at least as important - it's what makes the production impact higher. Greetings, Andres Freund

Re: Cleaning up historical portability baggage

2022-09-15 Thread Thomas Munro
On Fri, Sep 16, 2022 at 1:55 AM Tom Lane wrote: > John Naylor writes: > > On Thu, Sep 15, 2022 at 3:11 PM Ibrar Ahmed wrote: > >> The patch does not apply successfully; please rebase the patch. > > > There's a good reason for that -- the latest one was committed two > > weeks ago. The status

Re: failing to build preproc.c on solaris with sun studio

2022-09-15 Thread Andres Freund
Hi, On 2022-09-14 01:02:39 -0400, Tom Lane wrote: > John Naylor writes: > > If we're going to go to this length, it seems more straightforward to > > just check the .c/.h files into version control, like every other > > project that I have such knowledge of. > > Strong -1 on that, because then

Re: New strategies for freezing, advancing relfrozenxid early

2022-09-15 Thread Peter Geoghegan
On Thu, Sep 15, 2022 at 12:09 AM John Naylor wrote: > On Wed, Sep 14, 2022 at 11:33 PM Peter Geoghegan wrote: > > The final number of TIDs doesn't seem like the most interesting > > information that VM snapshots could provide us when it comes to > > building the dead_items TID data structure --

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-09-15 Thread Jaime Casanova
On Thu, Sep 15, 2022 at 05:30:11PM +0900, Kyotaro Horiguchi wrote: > At Thu, 15 Sep 2022 01:26:15 -0500, Jaime Casanova > wrote in > > On Tue, Sep 13, 2022 at 10:07:50PM -0500, Jaime Casanova wrote: > > > On Tue, Sep 13, 2022 at 06:48:45PM +0900, Kyotaro Horiguchi wrote: > > > > > > > >

Re: pgsql: Doc: Explain about Column List feature.

2022-09-15 Thread Alvaro Herrera
On 2022-Sep-15, Alvaro Herrera wrote: > Looking at the rendered docs again, I notice that section "31.4.5. > Combining Multiple Column Lists" is *only* the red-tinted Warning block. > That seems quite odd. I am tempted to remove the sect2 heading for that > one too. Pushed. I didn't modify

Re: ICU for global collation

2022-09-15 Thread Marina Polyakova
On 2022-09-15 09:52, Kyotaro Horiguchi wrote: If I executed initdb as follows, I would be told to specify --icu-locale option. $ initdb --encoding sql-ascii --locale-provider icu hoge ... initdb: error: ICU locale must be specified However, when I reran the command, it complains about

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2022-09-15 Thread Reid Thompson
On Thu, 2022-09-15 at 12:07 +0400, Ibrar Ahmed wrote: > > The patch does not apply; please rebase the patch. > > patching file src/backend/utils/misc/guc.c > Hunk #1 FAILED at 3664. > 1 out of 1 hunk FAILED -- saving rejects to file > src/backend/utils/misc/guc.c.rej  > > patching file

Typo in xact.c

2022-09-15 Thread Japin Li
Hi hacker, Recently, I find there might be a typo in xact.c comments. The comments say "PG_PROC", however, it actually means "PGPROC" structure. Since we have pg_proc catalog, and use PG_PROC to reference the catalog [1], so, we should use PGPROC to reference the structure. Any thoughts? [1]

Re: Can we avoid chdir'ing in resolve_symlinks() ?

2022-09-15 Thread Tom Lane
Peter Eisentraut writes: > On 13.09.22 17:16, Tom Lane wrote: >> What about it does not work? > The problem is if another package or extension uses pg_config to find, > say, libdir, includedir, or bindir and integrates it into its own build > system or its own build products. If those

Re: Can we avoid chdir'ing in resolve_symlinks() ?

2022-09-15 Thread Peter Eisentraut
On 13.09.22 17:16, Tom Lane wrote: Peter Eisentraut writes: 2) You configure and install with prefix=/usr/local/pgsql-14, and then symlink /usr/local/pgsql -> /usr/local/pgsql-14; hoping that you can then use /usr/local/pgsql as if that's where it actually is. We don't currently support that.

Re: Assertion failure in WaitForWALToBecomeAvailable state machine

2022-09-15 Thread Noah Misch
On Tue, Sep 13, 2022 at 11:56:16AM +0530, Bharath Rupireddy wrote: > On Tue, Sep 13, 2022 at 8:52 AM Noah Misch wrote: > > > > > [1] - > > > > > https://www.postgresql.org/message-id/flat/20220909.172949.2223165886970819060.horikyota.ntt%40gmail.com > > > > I plan to use that message's patch,

Re: Cleaning up historical portability baggage

2022-09-15 Thread Tom Lane
John Naylor writes: > On Thu, Sep 15, 2022 at 3:11 PM Ibrar Ahmed wrote: >> The patch does not apply successfully; please rebase the patch. > There's a good reason for that -- the latest one was committed two > weeks ago. The status should still be waiting on author, though, > namely for: > On

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 10:30, Daniel Gustafsson escreveu: > > On 15 Sep 2022, at 15:13, Alvaro Herrera > wrote: > > > > On 2022-Sep-15, Ranier Vilela wrote: > > > >> Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < > >> alvhe...@alvh.no-ip.org> escreveu: > > > >>> These functions

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Daniel Gustafsson
> On 15 Sep 2022, at 15:13, Alvaro Herrera wrote: > > On 2022-Sep-15, Ranier Vilela wrote: > >> Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < >> alvhe...@alvh.no-ip.org> escreveu: > >>> These functions you are patching are not in performance-sensitive code, >>> so I doubt this makes

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 10:13, Alvaro Herrera < alvhe...@alvh.no-ip.org> escreveu: > On 2022-Sep-15, Ranier Vilela wrote: > > > Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < > > alvhe...@alvh.no-ip.org> escreveu: > > > > These functions you are patching are not in

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Aleksander Alekseev
Hi Alvaro, > In what way is this code cleaner? I argue it is the opposite. Well, I guess it depends on the perspective. There are a bit more lines of code for sure. So if "less code is better" is the criteria, then no, the new code is not cleaner. If the criteria is to use an API according to

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Alvaro Herrera
On 2022-Sep-15, Ranier Vilela wrote: > Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < > alvhe...@alvh.no-ip.org> escreveu: > > These functions you are patching are not in performance-sensitive code, > > so I doubt this makes any difference performance wise. I doubt > > Microsoft will

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Alvaro Herrera
On 2022-Sep-15, Aleksander Alekseev wrote: > I agree with Alvaro that it is unlikely to be ever removed, but this > is a trivial change, so let's keep the code a bit cleaner. In what way is this code cleaner? I argue it is the opposite. -- Álvaro Herrera 48°01'N 7°57'E —

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 09:50, Alvaro Herrera < alvhe...@alvh.no-ip.org> escreveu: > On 2022-Sep-14, Ranier Vilela wrote: > > > According to: > > > https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localalloc > > > LocalAlloc is deprecated. > > So use HeapAlloc instead,

Re: pgsql: Doc: Explain about Column List feature.

2022-09-15 Thread Alvaro Herrera
On 2022-Sep-14, Peter Smith wrote: > On Tue, Sep 13, 2022 at 10:11 PM Alvaro Herrera > wrote: > > On 2022-Sep-07, Amit Kapila wrote: > > One more thing. There's a sect2 about combining column list. Part of it > > seems pretty judgmental and I see no reason to have it in there; I > > propose

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 09:58, Aleksander Alekseev < aleksan...@timescale.com> escreveu: > Hi Ranier, > > > use HeapAlloc instead, once LocalAlloc is an overhead wrapper to > HeapAlloc. > > Thanks for the patch. > > Although MSDN doesn't explicitly say that LocalAlloc is _depricated_ > +1

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Aleksander Alekseev
Hi Ranier, > use HeapAlloc instead, once LocalAlloc is an overhead wrapper to HeapAlloc. Thanks for the patch. Although MSDN doesn't explicitly say that LocalAlloc is _depricated_ +1 for replacing it. I agree with Alvaro that it is unlikely to be ever removed, but this is a trivial change, so

RE: why can't a table be part of the same publication as its schema

2022-09-15 Thread houzj.f...@fujitsu.com
On Thursday, September 15, 2022 10:48 AM houzj.f...@fujitsu.com wrote: > > On Thursday, September 15, 2022 3:37 AM Peter Eisentraut > wrote: > > Hi, > > > > > On 14.09.22 07:10, houzj.f...@fujitsu.com wrote: > > > After applying the patch, we support adding a table with column list > > > along

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-09-15 Thread kuroda.hay...@fujitsu.com
Dear Önder, Thank you for proposing good feature. I'm also interested in the patch, So I started to review this. Followings are initial comments. === For execRelation.c 01. RelationFindReplTupleByIndex() ``` /* Start an index scan. */ InitDirtySnapshot(snap); - scan =

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Alvaro Herrera
On 2022-Sep-14, Ranier Vilela wrote: > According to: > https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localalloc > LocalAlloc is deprecated. > So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to > HeapAlloc. These functions you are patching are not in

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-15 Thread Amit Kapila
On Thu, Sep 15, 2022 at 1:26 PM Masahiko Sawada wrote: > > On Wed, Sep 14, 2022 at 6:33 PM Amit Kapila wrote: > > > > On Fri, Sep 9, 2022 at 6:18 AM Masahiko Sawada > > wrote: > > > > > > Updated the patch accordingly. > > > > > > > I have created two xacts each with savepoints and after your

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

2022-09-15 Thread Amit Kapila
On Thu, Sep 15, 2022 at 10:45 AM wangw.f...@fujitsu.com wrote: > > Attach the new patch set. > Review of v29-0001* == 1. +parallel_apply_find_worker(TransactionId xid) { ... + entry = hash_search(ParallelApplyWorkersHash, , HASH_FIND, ); + if (found) + { + /* If any workers (or

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-09-15 Thread Japin Li
On Thu, 15 Sep 2022 at 18:04, Simon Riggs wrote: > On Wed, 14 Sept 2022 at 15:21, Alvaro Herrera wrote: >> >> On 2022-Aug-30, Simon Riggs wrote: >> >> > 001_new_isolation_tests_for_subxids.v3.patch >> > Adds new test cases to master without adding any new code, specifically >> > addressing the

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Ranier Vilela
Em qui., 15 de set. de 2022 às 05:35, Daniel Gustafsson escreveu: > > On 15 Sep 2022, at 01:19, Ranier Vilela wrote: > > > LocalAlloc is deprecated. > > So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to > HeapAlloc. > > > > Attached a patch. > > Don't forget that patches which

Re: Assertion failure in WaitForWALToBecomeAvailable state machine

2022-09-15 Thread Bharath Rupireddy
On Tue, Sep 13, 2022 at 3:56 PM Kyotaro Horiguchi wrote: > > > is that XLogShutdownWalRcv() does a bunch of work via ShutdownWalRcv() > > - it calls ConditionVariablePrepareToSleep(), > > Anyway the code path is executed in almost all cases because the same > assertion fires otherwise. So I don't

Re: Fix gin index cost estimation

2022-09-15 Thread Ronan Dunklau
Le lundi 12 septembre 2022, 16:41:16 CEST Ronan Dunklau a écrit : > But I realised that another approach might be better suited: since we want to > charge a cpu cost for every page visited, actually basing that on the already > estimated entryPagesFetched and dataPagesFetched would be better,

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-09-15 Thread Simon Riggs
On Wed, 14 Sept 2022 at 15:21, Alvaro Herrera wrote: > > On 2022-Aug-30, Simon Riggs wrote: > > > 001_new_isolation_tests_for_subxids.v3.patch > > Adds new test cases to master without adding any new code, specifically > > addressing the two areas of code that are not tested by existing tests. >

Re: failing to build preproc.c on solaris with sun studio

2022-09-15 Thread Justin Pryzby
On Thu, Sep 15, 2022 at 04:53:09PM +1200, Thomas Munro wrote: > Not sure it's OK to put random junk in ccache's directory, and in any > case we'd certainly want to teach it to trim itself before doing that > on CI... > I suppose a version good enough to live in src/tools would need to > trim the

Re: Cleaning up historical portability baggage

2022-09-15 Thread John Naylor
On Thu, Sep 15, 2022 at 3:11 PM Ibrar Ahmed wrote: > The patch does not apply successfully; please rebase the patch. There's a good reason for that -- the latest one was committed two weeks ago. The status should still be waiting on author, though, namely for: On Fri, Aug 26, 2022 at 5:28 AM

Re: Counterintuitive behavior when toast_tuple_target < TOAST_TUPLE_THRESHOLD

2022-09-15 Thread Aleksander Alekseev
Hi David, > There was some discussion on this problem in [1]. > [1] https://www.postgresql.org/message-id/20190403063759.gf3...@paquier.xyz Thanks for sharing this discussion. I missed it. > The problem with #2 is that if you look at > heapam_relation_needs_toast_table(), it only decides if the

Re: walmethods.c/h are doing some strange things

2022-09-15 Thread velagandula sravan kumar
From: Robert Haas Date: Friday, 2 September 2022 at 9:23 PM To: pgsql-hack...@postgresql.org Subject: walmethods.c/h are doing some strange things Hi, We have a number of places in the system where we are using object-oriented design patterns. For example, a foreign data wrapper returns a

Re: Avoid use deprecated Windows Memory API

2022-09-15 Thread Daniel Gustafsson
> On 15 Sep 2022, at 01:19, Ranier Vilela wrote: > LocalAlloc is deprecated. > So use HeapAlloc instead, once LocalAlloc is an overhead wrapper to HeapAlloc. > > Attached a patch. Don't forget that patches which aim to reduce overhead are best when accompanied with benchmarks which show the

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-09-15 Thread Kyotaro Horiguchi
At Thu, 15 Sep 2022 01:26:15 -0500, Jaime Casanova wrote in > On Tue, Sep 13, 2022 at 10:07:50PM -0500, Jaime Casanova wrote: > > On Tue, Sep 13, 2022 at 06:48:45PM +0900, Kyotaro Horiguchi wrote: > > > > > > Another measure would be to add the region to wipe-out on reset to > > >

Re: Switching XLog source from archive to streaming when primary available

2022-09-15 Thread Kyotaro Horiguchi
At Thu, 15 Sep 2022 10:28:12 +0530, Bharath Rupireddy wrote in > I'm attaching the v6 patch that's rebased on to the latest HEAD. > Please consider this for review. Thaks for the new version! +#define StreamingReplRetryEnabled() \ + (streaming_replication_retry_interval > 0 && \ +

Re: Counterintuitive behavior when toast_tuple_target < TOAST_TUPLE_THRESHOLD

2022-09-15 Thread Nikita Malakhov
Hi! As it is seen from the code (toasting.c and further) Toast tables are created immediately when a new relation with the TOASTable column is created. Practically, there could occur the case when Toast table does not exist and we should of course check for that. TOAST_TUPLE_THRESHOLD is not

Re: Cleaning up historical portability baggage

2022-09-15 Thread Ibrar Ahmed
On Mon, Aug 29, 2022 at 3:13 AM Thomas Munro wrote: > On Mon, Aug 29, 2022 at 9:40 AM Tom Lane wrote: > > Here's another bit of baggage handling: fixing up the places that > > were afraid to use fflush(NULL). We could doubtless have done > > this years ago (indeed, I found several places

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2022-09-15 Thread Ibrar Ahmed
On Mon, Sep 12, 2022 at 8:30 PM Reid Thompson wrote: > On Fri, 2022-09-09 at 12:14 -0500, Justin Pryzby wrote: > > On Sat, Sep 03, 2022 at 11:40:03PM -0400, Reid Thompson wrote: > > > > > + 0, 0, INT_MAX, > > > > > + NULL, NULL, NULL > > > > I think this needs a

Re: Add parameter jit_warn_above_fraction

2022-09-15 Thread Ibrar Ahmed
On Sat, Apr 9, 2022 at 8:43 PM Julien Rouhaud wrote: > On Sat, Apr 09, 2022 at 12:31:23PM -0400, Tom Lane wrote: > > Julien Rouhaud writes: > > > On Sat, Apr 09, 2022 at 10:42:12AM -0400, Tom Lane wrote: > > >> Also, good luck with "looking in the logs", because by default > > >> WARNING-level

Re: Improve description of XLOG_RUNNING_XACTS

2022-09-15 Thread Masahiko Sawada
On Wed, Sep 14, 2022 at 6:33 PM Amit Kapila wrote: > > On Fri, Sep 9, 2022 at 6:18 AM Masahiko Sawada wrote: > > > > Updated the patch accordingly. > > > > I have created two xacts each with savepoints and after your patch, > the record will show xacts/subxacts information as below: > > rmgr:

Re: New strategies for freezing, advancing relfrozenxid early

2022-09-15 Thread John Naylor
On Wed, Sep 14, 2022 at 11:33 PM Peter Geoghegan wrote: > > On Wed, Sep 14, 2022 at 3:18 AM John Naylor > > Furthermore, it doesn't have to anticipate the maximum size, so there > > is no up front calculation assuming max-tuples-per-page, so it > > automatically uses less memory for less

Re: ICU for global collation

2022-09-15 Thread Kyotaro Horiguchi
At Wed, 14 Sep 2022 17:19:34 +0300, Marina Polyakova wrote in > Hello! > > I was surprised that it is allowed to create clusters/databases where > the default ICU collations do not actually work due to unsupported > encodings: > > $ initdb --encoding SQL_ASCII --locale-provider icu

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-09-15 Thread Jaime Casanova
On Tue, Sep 13, 2022 at 10:07:50PM -0500, Jaime Casanova wrote: > On Tue, Sep 13, 2022 at 06:48:45PM +0900, Kyotaro Horiguchi wrote: > > > > Another measure would be to add the region to wipe-out on reset to > > PgStat_KindInfo, but it seems too much.. (attached) > > > > This patch solves the