Re: warn_unused_results

2020-11-08 Thread Peter Eisentraut
On 2020-11-09 07:56, Michael Paquier wrote: This is accepted by clang, and MSVC has visibly an equivalent for that, as of VS 2012: #elif defined(_MSC_VER) && (_MSC_VER >= 1700) #define pg_nodiscard _Check_return_ We don't care about the 1700 condition as we support only >= 1800 on HEAD, and in th

Re: warn_unused_results

2020-11-08 Thread Michael Paquier
On Sat, Oct 17, 2020 at 08:57:51AM +0200, Peter Eisentraut wrote: > Forgetting to assign the return value of list APIs such as lappend() is a > perennial favorite. The compiler can help point out such mistakes. GCC has > an attribute warn_unused_results. Also C++ has standardized this under the >

Re: [PATCH] Add features to pg_stat_statements

2020-11-08 Thread Seino Yuki
However, let me confirm the following. Is this information really useful? If there is no valid use case for this, I'd like to drop it. Thought? I thought it would be easy for users to see at a glance that if there is a case I assumed, if the last modified date and time is old, there is no nee

RE: Disable WAL logging to speed up data loading

2020-11-08 Thread osumi.takami...@fujitsu.com
Hello, Stephen On Tuesday, Nov 3, 2020 3:02 AM Stephen Frost wrote: > * Magnus Hagander (mag...@hagander.net) wrote: > > On Mon, Nov 2, 2020 at 4:28 PM Robert Haas > wrote: > > > On Thu, Oct 29, 2020 at 4:00 PM Fujii Masao > wrote: > > > > Yes. What I meant was such a safe guard needs to be im

Re: Temporary tables versus wraparound... again

2020-11-08 Thread Greg Stark
On Mon, 9 Nov 2020 at 00:17, Noah Misch wrote: > > > 2) adding the dependency on heapam.h to heap.c makes sense because of > > heap_inplace_update bt it may be a bit annoying because I suspect > > that's a useful sanity check that the tableam stuff hasn't been > > bypassed > > That is not terrible

Re: document pg_settings view doesn't display custom options

2020-11-08 Thread Fujii Masao
On 2020/11/07 0:42, Fujii Masao wrote: On 2020/10/31 2:06, John Naylor wrote: On Fri, Oct 30, 2020 at 12:48 PM Tom Lane mailto:t...@sss.pgh.pa.us>> wrote:     John Naylor mailto:john.nay...@enterprisedb.com>> writes: > Okay, along those lines here's a patch using "this view" in a ne

Re: abstract Unix-domain sockets

2020-11-08 Thread Michael Paquier
On Thu, Oct 22, 2020 at 09:03:49AM +0200, Peter Eisentraut wrote: > On 2020-10-09 09:28, Peter Eisentraut wrote: >> During the discussion on Unix-domain sockets on Windows, someone pointed >> out[0] abstract Unix-domain sockets. This is a variant of the normal >> Unix-domain sockets that don't use

Re: logical streaming of xacts via test_decoding is broken

2020-11-08 Thread Amit Kapila
On Mon, Nov 9, 2020 at 11:21 AM Dilip Kumar wrote: > > On Mon, Nov 9, 2020 at 11:04 AM Dilip Kumar wrote: > > > > On Mon, Nov 9, 2020 at 11:00 AM Amit Kapila wrote: > > > > > > Michael reported a BF failure [1] related to one of the logical > > > streaming test case and I've analyzed the issue.

Re: logical streaming of xacts via test_decoding is broken

2020-11-08 Thread Dilip Kumar
On Mon, Nov 9, 2020 at 11:04 AM Dilip Kumar wrote: > > On Mon, Nov 9, 2020 at 11:00 AM Amit Kapila wrote: > > > > Michael reported a BF failure [1] related to one of the logical > > streaming test case and I've analyzed the issue. As responded on > > pgsql-committers [2], the issue here is that t

Re: logical streaming of xacts via test_decoding is broken

2020-11-08 Thread Dilip Kumar
On Mon, Nov 9, 2020 at 11:00 AM Amit Kapila wrote: > > Michael reported a BF failure [1] related to one of the logical > streaming test case and I've analyzed the issue. As responded on > pgsql-committers [2], the issue here is that the streaming > transactions can be interleaved and because we ar

logical streaming of xacts via test_decoding is broken

2020-11-08 Thread Amit Kapila
Michael reported a BF failure [1] related to one of the logical streaming test case and I've analyzed the issue. As responded on pgsql-committers [2], the issue here is that the streaming transactions can be interleaved and because we are maintaining whether xact_wrote_changes at the LogicalDecodin

Re: Temporary tables versus wraparound... again

2020-11-08 Thread Noah Misch
On Sun, Nov 08, 2020 at 06:19:57PM -0500, Greg Stark wrote: > However in the case of ON COMMIT DELETE ROWS we can do better. Why not > just reset the relfrozenxid and other stats as if the table was > freshly created when it's truncated? That concept is sound. > 1) Should we update relpages and r

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2020-11-08 Thread Noah Misch
On Wed, Oct 28, 2020 at 09:01:59PM -0700, Noah Misch wrote: > On Sat, Aug 29, 2020 at 10:34:33PM -0700, Noah Misch wrote: > > On Mon, May 25, 2020 at 12:00:33AM -0700, Noah Misch wrote: > > > [last non-rebase change] > > > > Rebased the second patch. The first patch did not need a rebase. > > Re

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-11-08 Thread Andy Fan
On Mon, Nov 9, 2020 at 10:07 AM David Rowley wrote: > On Mon, 9 Nov 2020 at 03:52, Andy Fan wrote: > > then I did a perf on the 2 version, Is it possible that you called > tts_minimal_clear twice in > > the v9 version? Both ExecClearTuple and ExecStoreMinimalTuple called > tts_minimal_clear >

RE: extension patch of CREATE OR REPLACE TRIGGER

2020-11-08 Thread osumi.takami...@fujitsu.com
Hi, On Saturday, Nov 7, 2020 2:06 PM Dilip Kumar wrote: > The patch looks fine to me however I feel that in the test case there are a > lot > of duplicate statement which can be reduced e.g. > +-- 1. Overwrite existing regular trigger with regular trigger > (without OR REPLACE) > +create trigge

Re: Some doubious code in pgstat.c

2020-11-08 Thread Kyotaro Horiguchi
At Fri, 6 Nov 2020 16:40:39 +0530, Amit Kapila wrote in > On Thu, Nov 5, 2020 at 2:13 PM Kyotaro Horiguchi > wrote: > > > > At Thu, 5 Nov 2020 11:48:24 +0530, Amit Kapila > > wrote in > > > On Thu, Nov 5, 2020 at 9:44 AM Masahiko Sawada > > > wrote: > > > > > > > > On Thu, Nov 5, 2020 at 11

Re: Protect syscache from bloating with negative cache entries

2020-11-08 Thread Kyotaro Horiguchi
At Mon, 09 Nov 2020 11:13:31 +0900 (JST), Kyotaro Horiguchi wrote in > Now the branch for counter-increment is removed. For similar > branches for counter-decrement side in CatCacheCleanupOldEntries(), > Min() is compiled into cmovbe and a branch was removed. Mmm. Sorry, I sent this by a mista

Re: Protect syscache from bloating with negative cache entries

2020-11-08 Thread Kyotaro Horiguchi
At Fri, 6 Nov 2020 10:42:15 +0200, Heikki Linnakangas wrote in > On 06/11/2020 10:24, Kyotaro Horiguchi wrote: > > Thank you for the comment! > > First off, I thought that I managed to eliminate the degradation > > observed on the previous versions, but significant degradation (1.1% > > slower)

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-11-08 Thread David Rowley
On Mon, 9 Nov 2020 at 03:52, Andy Fan wrote: > then I did a perf on the 2 version, Is it possible that you called > tts_minimal_clear twice in > the v9 version? Both ExecClearTuple and ExecStoreMinimalTuple called > tts_minimal_clear > on the same slot. > > With the following changes: Thank

Re: array_cat anycompatible change is breaking xversion upgrade tests

2020-11-08 Thread Tom Lane
I wrote: > I think the most plausible response is to add this aggregate to the filter > logic that already exists in the xversion tests. Perhaps we could > alternatively change this test case so that it relies on some other > polymorphic function, but I'm not quite sure what a good candidate > wou

Re: upcoming API changes for LLVM 12

2020-11-08 Thread Tom Lane
Andres Freund writes: > Yea, I'll try to do that in the next few days (was plannin to last week, > but due to a hand injury I was typing one handed last week - makes it > pretty annoying to clean up code. But I just started being able to at > least use my left thumb again...). Ouch. Get well soo

Temporary tables versus wraparound... again

2020-11-08 Thread Greg Stark
We had an outage caused by transaction wraparound. And yes, one of the first things I did on this site was check that we didn't have any databases that were in danger of wraparound. However since then we added a monitoring job that used a temporary table with ON COMMIT DELETE ROWS. Since it was a

Re: upcoming API changes for LLVM 12

2020-11-08 Thread Andres Freund
Hi, On 2020-11-08 17:35:20 -0500, Tom Lane wrote: > I suppose this is related to what you are talking about here. Yes. > If so, could we prioritize getting that committed? It's annoying > to have the buildfarm failures page so full of this one issue. Yea, I'll try to do that in the next few d

Re: upcoming API changes for LLVM 12

2020-11-08 Thread Tom Lane
Andres Freund writes: > On 2020-11-02 10:28:33 -0800, Jesse Zhang wrote: >> On Thu, Oct 15, 2020 at 6:12 PM Andres Freund wrote: >>> There will be a breaking API change for JIT related API in LLVM >>> 12. seawasp, which runs some bleeding-edge version of clang, has been falling over for the last

2020-11-12 Release Announcement Draft

2020-11-08 Thread Jonathan S. Katz
Hi, Attached is a draft of the release announcement for the upcoming 2020-11-12 update release. Corrections and feedback welcome, so long as it is submitted by 2020-11-11 AoE[1]. Thanks! Jonathan [1] https://en.wikipedia.org/wiki/Anywhere_on_Earth The PostgreSQL Global Development Group has re

Re: list of extended statistics on psql

2020-11-08 Thread Tomas Vondra
Hi, I took a look at this today, and I think the code is ready, but the regression test needs a bit more work: 1) It's probably better to use somewhat more specific names for the objects, especially when created in public schema. It decreases the chance of a collision with other tests (which may

Re: [BUG]: segfault during update

2020-11-08 Thread Tom Lane
I wrote: > Yeah, this is sufficient reason why we must use the more invasive > patch on those branches. What I'm wondering now is if there's a > way to break even-older branches based on failure to handle dropped > columns here. After tracing through the example in v11, I see why those branches a

Re: [BUG]: segfault during update

2020-11-08 Thread Tom Lane
"Drouvot, Bertrand" writes: > Here is a scenario that produces segfault during update (on version 12 > and 13): Hm. So the point about failing to reproduce dropped columns is more critical than I thought. I wonder how come we get away with that before v12? > So, we would need to back port thi

Re: Yet another (minor) fix in BRIN

2020-11-08 Thread Tomas Vondra
On 11/8/20 12:34 PM, Michael Paquier wrote: > On Sat, Nov 07, 2020 at 10:45:26PM -0500, Tom Lane wrote: >> The weekend before stable-branch releases is probably not the best >> time to be pushing "minor" fixes into those branches. I got my >> fingers burned today, and so did Peter. Don't follow o

Re: pgbench stopped supporting large number of client connections on Windows

2020-11-08 Thread Marina Polyakova
On 2020-11-07 01:01, Fabien COELHO wrote: Hello Marina, Hello, Fabien! Thank you for your comments! While trying to test a patch that adds a synchronization barrier in pgbench [1] on Windows, Thanks for trying that, I do not have a windows setup for testing, and the sync code I wrote for W

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-11-08 Thread Andy Fan
On Mon, Nov 2, 2020 at 3:44 PM David Rowley wrote: > On Tue, 20 Oct 2020 at 22:30, David Rowley wrote: > > > > So far benchmarking shows there's still a regression from the v8 > > version of the patch. This is using count(*). An earlier test [1] did > > show speedups when we needed to deform tup

Re: Hybrid Hash/Nested Loop joins and caching results from subplans

2020-11-08 Thread Andy Fan
On Fri, Nov 6, 2020 at 6:13 AM David Rowley wrote: > On Mon, 2 Nov 2020 at 20:43, David Rowley wrote: > > > > On Tue, 20 Oct 2020 at 22:30, David Rowley wrote: > > I did some further tests this time with some tuple deforming. Again, > > it does seem that v9 is slower than v8. > > > > Graphs at

Re: Yet another (minor) fix in BRIN

2020-11-08 Thread Michael Paquier
On Sat, Nov 07, 2020 at 10:45:26PM -0500, Tom Lane wrote: > The weekend before stable-branch releases is probably not the best > time to be pushing "minor" fixes into those branches. I got my > fingers burned today, and so did Peter. Don't follow our example ;-) You could just apply your stuff a

Re: Collation versioning

2020-11-08 Thread Thomas Munro
On Fri, Oct 4, 2019 at 1:25 AM Thomas Munro wrote: > Ok. Here's one like that. Also, a WIP patch for FreeBSD. Here's an updated patch for FreeBSD, which I'll sit on for a bit longer. It needs bleeding edge 13-CURRENT (due out Q1ish). From b9cb5562457c214c48c0a6334b8ed3264f50e3d6 Mon Sep 17 00:

Re: Allow "snapshot too old" error, to prevent bloat

2020-11-08 Thread Andy Fan
On Sun, Nov 8, 2020 at 5:14 PM Tom Lane wrote: > Jim Nasby writes: > > On 2/15/15 10:36 AM, Tom Lane wrote: > >> I wonder if we couldn't achieve largely the same positive effects > through > >> adding a simple transaction-level timeout option. > > > A common use-case is long-running reports hitt

Re: pgbench stopped supporting large number of client connections on Windows

2020-11-08 Thread Fabien COELHO
Hello Tom, Use ppoll, and start more threads but not too many? Does ppoll exist on Windows? Some g*gling suggest that the answer is no. There was a prior thread on this topic, which seems to have drifted off into the sunset: Indeed. I may have contributed to this dwindling by not adding