Re: [16Beta1][doc] pgstat: Track time of the last scan of a relation

2023-06-04 Thread David Rowley
On Wed, 31 May 2023 at 15:57, Shinoda, Noriyoshi (PN Japan FSIP) wrote: > PostgreSQL 16 Beta1, added last access time to pg_stat_all_tables and > pg_stat_all_indexes views by this patch [1]. > According to the documentation [2], the data type of the columns added to > these views is 'timestampt

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-04 Thread Tom Lane
jiye writes: > in our test enviroment, if one database's have major update operations, > autovacuum does not work and cause major performance degradation. > if found this issue may be resolved by revert this Skip redundant > anti-wraparound vacuums · postgres/postgres@2aa6e33 (github.com) commit

confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-04 Thread jiye
hi, in our test enviroment, if one database's have major update operations, autovacuum does not work and cause major performance degradation. if found this issue may be resolved by revert this Skip redundant anti-wraparound vacuums · postgres/postgres@2aa6e33 (github.com) commit. after fetch

Re: postgres_fdw: wrong results with self join + enable_nestloop off

2023-06-04 Thread Richard Guo
On Fri, Jun 2, 2023 at 8:31 PM Nishant Sharma < nishant.sha...@enterprisedb.com> wrote: > *I only had a minor comment on below change:-* > > > > > > *- gating_clauses = get_gating_quals(root, scan_clauses);+ if > (best_path->pathtype == T_ForeignScan && IS_JOIN_REL(rel))+ > gating_clauses = ge

Re: postgres_fdw: wrong results with self join + enable_nestloop off

2023-06-04 Thread Richard Guo
On Fri, Jun 2, 2023 at 11:30 AM Suraj Kharage < suraj.khar...@enterprisedb.com> wrote: > +1 for fixing this in the backend code rather than FDW code. > > Thanks, Richard, for working on this. The patch looks good to me at > a glance. > Thank you Suraj for the review! Thanks Richard

Re: Cleaning up array_in()

2023-06-04 Thread Tom Lane
Nikhil Benesch writes: > I took a look at 0002 because I attempted a similar but more surgical > fix in [0]. > I spotted a few opportunities for further reducing state tracked by > `ArrayCount`. Wow, thanks for looking! I've not run these suggestions to ground (and won't have time for a few days

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

2023-06-04 Thread Richard Guo
On Sun, Jun 4, 2023 at 8:42 PM Ranier Vilela wrote: > Hi, > > Per Coverity. > > At function ExtendBufferedRelShared, has a always true test. > eb.rel was dereferenced one line above, so in > if (eb.rel) is always true. > > I think it's worth removing the test, because Coverity raises dozens of >

collation settings table in v16 docs

2023-06-04 Thread Jeremy Schneider
Looking at the "collation settings" table in the v16 docs, I think some readers may have a little difficulty understanding what each row means. https://www.postgresql.org/docs/devel/collation.html#ICU-COLLATION-SETTINGS The "Key" column isn't meaningful and it's a bit arduous to read the whole de

Re: WAL Insertion Lock Improvements

2023-06-04 Thread Bharath Rupireddy
On Wed, May 31, 2023 at 5:05 PM Michael Paquier wrote: > > On Mon, May 22, 2023 at 09:26:25AM +0900, Michael Paquier wrote: > > Simpler and consistent, nice. I don't have much more to add, so I > > have switched the patch as RfC. > > While at PGcon, Andres has asked me how many sockets are in the

Re: New Table Access Methods for Multi and Single Inserts

2023-06-04 Thread Bharath Rupireddy
On Sun, Jun 4, 2023 at 4:08 AM Andres Freund wrote: > > Hi, > > This patch was referenced in a discussion at pgcon, so I thought I'd give it a > look, even though Bharat said that he won't have time to drive it forward... Thanks. I'm glad to know that the feature was discussed at PGCon. If there

Re: Cleaning up array_in()

2023-06-04 Thread Nikhil Benesch
I took a look at 0002 because I attempted a similar but more surgical fix in [0]. I spotted a few opportunities for further reducing state tracked by `ArrayCount`. You may not find all of these suggestions to be worthwhile. 1) `in_quotes` appears to be wholly redundant with `parse_state == ARRAY_

Re: Reload configuration more frequently in apply worker.

2023-06-04 Thread Amit Kapila
On Wed, May 17, 2023 at 8:34 AM Amit Kapila wrote: > > On Wed, May 17, 2023 at 7:18 AM Zhijie Hou (Fujitsu) > wrote: > > > > > > The attached tap test shows how the failure happened. > > > > I haven't yet tried to reproduce it but will try later sometime. > I am able to reproduce the problem wit

Re: Do we want a hashset type?

2023-06-04 Thread Tomas Vondra
On 6/1/23 09:14, Joel Jacobson wrote: > On Thu, Jun 1, 2023, at 09:02, Joel Jacobson wrote: >> Here is an example using a real anonymised social network. > > I realised the "found" column is not necessary in this particular example, > since we only care about the friends at the exact depth leve

Re: Prevent psql \watch from running queries that return no rows

2023-06-04 Thread Greg Sabino Mullane
On Sat, Jun 3, 2023 at 5:58 PM Michael Paquier wrote: > > Wouldn't something like a target_rows be more flexible? You could use > this parameter with a target number of rows to expect, zero being one > choice in that. > Thank you! That does feel better to me. Please see attached a new v2 patch

Re: running logical replication as the subscription owner

2023-06-04 Thread Amit Kapila
On Fri, May 26, 2023 at 6:18 PM Masahiko Sawada wrote: > > On Thu, May 25, 2023 at 5:41 PM Amit Kapila wrote: > > I've attached the updated patch. Please review it. > Few comments: 1. + /* get the owner for ACL and RLS checks */ + run_as_owner = MySubscription->runasowner; + checkowner = run_as_

Re: [BUG] pg_dump does not properly deal with BEGIN ATOMIC function

2023-06-04 Thread Tom Lane
Kirk Wolak writes: > On Sat, Jun 3, 2023 at 2:28 PM Tom Lane wrote: >> I'm not really sure which of these I like better. The first one >> is a much simpler code change, and there is some value in labeling >> the output like that. The second patch's output seems less cluttered, >> but it's commi

Re: [BUG] pg_dump does not properly deal with BEGIN ATOMIC function

2023-06-04 Thread Tom Lane
"Imseih (AWS), Sami" writes: > Some minor comments I have: > 1/ > + agginfo[i].aggfn.postponed_def = false; /* might get set during sort */ > This is probably not needed as it seems that we can only > get into this situation when function dependencies are tracked. That's just to keep from

Re: Wrong syntax in feature description

2023-06-04 Thread Amit Kapila
On Fri, Jun 2, 2023 at 7:01 PM Peter Smith wrote: > > Hi, I noticed a feature description [1] referring to a command example: > > CREATE PUBLICATION ... FOR ALL TABLES IN SCHEMA > > ~~ > > AFAIK that should say "FOR TABLES IN SCHEMA" (without the "ALL", see [2]) > Right, this should be chang

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

2023-06-04 Thread Ranier Vilela
Hi, Per Coverity. At function ExtendBufferedRelShared, has a always true test. eb.rel was dereferenced one line above, so in if (eb.rel) is always true. I think it's worth removing the test, because Coverity raises dozens of alerts thinking eb.rel might be NULL. Besides, one less test is one les

Re: Avoid unused value (src/fe_utils/print.c)

2023-06-04 Thread Ranier Vilela
Em dom., 4 de jun. de 2023 às 01:00, Alexander Lakhin escreveu: > Hi Michael, > > 04.06.2023 01:42, Michael Paquier wrote: > > On Sat, Jun 03, 2023 at 03:00:01PM +0300, Alexander Lakhin wrote: > >> Clang' scan-build detects 58 errors "Dead assignment", including that > one. > >> Maybe it would be

Re: LLVM 16 (opaque pointers)

2023-06-04 Thread Dmitry Dolgov
> On Mon, May 22, 2023 at 03:38:44PM +1200, Thomas Munro wrote: > Further changes are already needed for their "main" branch (LLVM > 17-to-be), so this won't quite be enough to shut seawasp up. At a > glance, we will need to change from the "old pass manager" API that > has recently been vaporised