Re: [PATCH] Simple progress reporting for COPY command

2021-01-01 Thread Josef Šimánek
pá 1. 1. 2021 v 11:16 odesílatel Bharath Rupireddy napsal: > > On Fri, Jan 1, 2021 at 6:55 AM Josef Šimánek wrote: > > finally I had some time to revisit patch and all comments from > > https://www.postgresql.org/message-id/CAFp7QwqMGEi4OyyaLEK9DR0%2BE%2BoK3UtA4bEjDVCa4bNkwUY2PQ%40mail.gmail.com

Re: patch: reduce overhead of execution of CALL statement in no atomic mode from PL/pgSQL

2021-01-01 Thread Pavel Stehule
Hi only rebase Regards Pavel diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c index 89087a7be3..b1d2f1af37 100644 --- a/src/backend/commands/prepare.c +++ b/src/backend/commands/prepare.c @@ -230,7 +230,7 @@ ExecuteQuery(ParseState *pstate,

Re: [PATCH] Simple progress reporting for COPY command

2021-01-01 Thread Bharath Rupireddy
On Fri, Jan 1, 2021 at 6:55 AM Josef Šimánek wrote: > finally I had some time to revisit patch and all comments from > https://www.postgresql.org/message-id/CAFp7QwqMGEi4OyyaLEK9DR0%2BE%2BoK3UtA4bEjDVCa4bNkwUY2PQ%40mail.gmail.com > and I have prepared simple version of COPY command progress

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2021-01-01 Thread Bharath Rupireddy
On Thu, Dec 31, 2020 at 8:29 AM Bharath Rupireddy wrote: > Right. I meant the "next use" as the select attempt on a foreign table > with that foreign server. If no select query is run, then at the end > of the current txn that connection gets closed. Yes internally such > connection gets closed

Re: [PATCH] Simplify permission checking logic in user.c

2021-01-01 Thread Andrey Borodin
> 31 дек. 2020 г., в 00:37, Paul Martinez написал(а): > > In Google Cloud SQL we create a role for customers, cloudsqlsuperuser, > which, confusingly, is not a SUPERUSER, but does have some extra > permissions. We've modified a lot of "if (!superuser())" checks to > "if (!superuser() &&

Re: proposal: schema variables

2021-01-01 Thread Pavel Stehule
Hi fresh rebase Regards Pavel schema-variables-20210101.patch.gz Description: application/gzip

faster ETL / bulk data load for heap tables

2021-01-01 Thread Luc Vlaming
Hi, In an effort to speed up bulk data loading/transforming I noticed that considerable time is spent in the relation extension lock. I know there are already many other efforts to increase the chances of using bulk loading [1], [2], [3], [4], efforts to make loading more parallel [5], and

Re: Asynchronous Append on postgres_fdw nodes.

2021-01-01 Thread Etsuro Fujita
On Thu, Dec 31, 2020 at 7:15 PM Etsuro Fujita wrote: > * I tweaked comments a bit to address your comments. I forgot to update some comments. :-( Attached is a new version of the patch updating comments further. I did a bit of cleanup for the postgres_fdw part as well. Best regards, Etsuro

Re: poc - possibility to write window function in PL languages

2021-01-01 Thread Pavel Stehule
Hi rebase Regards Pavel diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 11246aa653..89a07678ee 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -4606,6 +4606,99 @@ CREATE EVENT TRIGGER snitch ON ddl_command_start EXECUTE FUNCTION snitch();

Commitfest 2021-01 Now in Progress

2021-01-01 Thread Masahiko Sawada
Hi, Happy new year to all! The January Commitfest for PG14 is now in progress! I'm happy to volunteer to manage it. Current state for the Commitfest is: Needs review: 188 Waiting on Author: 28 Ready for Committer: 22 Committed: 19 Withdrawn: 3 Total: 260 The number of patches waiting on

Re: Let people set host(no)ssl settings from initdb

2021-01-01 Thread Magnus Hagander
On Wed, Dec 30, 2020 at 9:00 PM Tom Lane wrote: > David Fetter writes: > > On Wed, Dec 30, 2020 at 08:24:06PM +0100, David Fetter wrote: > >> On Mon, Sep 07, 2020 at 11:57:58AM +0900, Michael Paquier wrote: > >>> I have looked at the patch of this thread, and I doubt that it is a > >>> good

Re: Moving other hex functions to /common

2021-01-01 Thread Bruce Momjian
On Thu, Dec 31, 2020 at 03:10:29PM +0900, Michael Paquier wrote: > On Wed, Dec 30, 2020 at 08:22:07PM -0500, Bruce Momjian wrote: > > So, I am learning this cfbot thing. Seems I need -M100% to disable > > rename detection for diffs to work with cfbot --- makes sense. > > A good way to make sure

Re: Safety/validity of resetting permissions by updating system tables

2021-01-01 Thread Tom Lane
Isaac Morland writes: > Is it safe and valid to reset to default permissions by doing > UPDATE pg_namespace/pg_class/pg_type/pg_proc > SET nspacl/relacl/typacl/proacl = NULL WHERE ... to accomplish this? Not terribly; the main objection is you'd fail to update pg_shdepend. > And what do people

Move --data-checksums to common options in initdb --help

2021-01-01 Thread Michael Banck
Hi, I noticed -k/--data-checksums is currently in the less commonly used options part of the initdb --help output: |Less commonly used options: | -d, --debug generate lots of debugging output | -k, --data-checksums use data page checksums I think enough people use data

Re: Safety/validity of resetting permissions by updating system tables

2021-01-01 Thread Isaac Morland
On Fri, 1 Jan 2021 at 11:44, Tom Lane wrote: > Isaac Morland writes: > > Is it safe and valid to reset to default permissions by doing > > UPDATE pg_namespace/pg_class/pg_type/pg_proc > > SET nspacl/relacl/typacl/proacl = NULL WHERE ... to accomplish this? > > Not terribly; the main objection

Re: Implement for window functions

2021-01-01 Thread Zhihong Yu
Krasiyan: Happy New Year. For WinGetFuncArgInPartition(): + if (target > 0) + step = 1; + else if (target < 0) + step = -1; + else + step = 0; When would the last else statement execute ? Since the above code is for

Re: faster ETL / bulk data load for heap tables

2021-01-01 Thread Zhihong Yu
Hi, Luc: Happy New Year. Looking at BufferAllocExtend() in v1-0002-WIP-buffer-alloc-specialized-for-relation-extensi.patch. it seems there is duplicate code with the existing BufferAlloc(). It would be good if some refactoring is done by extracting common code into a helper function. Thanks On

Re: poc - possibility to write window function in PL languages

2021-01-01 Thread Zhihong Yu
Hi, Pavel: Happy New Year. + command with clause WINDOW. The specific feature of + this functions is a possibility to two special storages with this functions -> this function possibility to two special storages: there is no verb. 'store with stored one value': store is repeated. + *

Re: adding wait_start column to pg_locks

2021-01-01 Thread Justin Pryzby
On Tue, Dec 15, 2020 at 11:47:23AM +0900, torikoshia wrote: > So I'm now thinking about adding a new column in pg_locks which > keeps the time at which locks started waiting. > > Attached a patch. This is failing make check-world, would you send an updated patch ? I added you as an author so it

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

2021-01-01 Thread Andrey Borodin
Hi Noah! I've found this thread in CF looking for something to review. > 9 нояб. 2020 г., в 09:53, Noah Misch написал(а): > > Rebased both patches, necessitated by commit c732c3f (a repair of commit > dee663f). As I mentioned on another branch of the thread, I'd be content if > someone

Re: Proposed patch for key management

2021-01-01 Thread Alastair Turner
Hi Stephen, Bruce, Fabien On Thu, 31 Dec 2020 at 17:05, Stephen Frost wrote: > > Greetings, > > * Bruce Momjian (br...@momjian.us) wrote: > > On Thu, Dec 31, 2020 at 11:11:11AM +0100, Fabien COELHO wrote: > > > > I am not sure what else I can add to this discussion. Having something > > > >

Re: pgbench: option delaying queries till connections establishment?

2021-01-01 Thread Fabien COELHO
It looks like macOS doesn't have pthread barriers (via cfbot 2021, now with more operating systems): Indeed:-( I'll look into that. -- Fabien.

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

2021-01-01 Thread Noah Misch
On Fri, Jan 01, 2021 at 11:05:29PM +0500, Andrey Borodin wrote: > I've found this thread in CF looking for something to review. Thanks for taking a look. > > 9 нояб. 2020 г., в 09:53, Noah Misch написал(а): > > > > Rebased both patches, necessitated by commit c732c3f (a repair of commit > >

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2021-01-01 Thread Zhihong Yu
Hi, Bharath: Happy new year. + appendStringInfo(, "(%s, %s)", server->servername, +entry->invalidated ? "false" : "true"); Is it better to use 'invalidated' than 'false' in the string ? For the first if block of postgres_fdw_disconnect(): +* Check if the

Re: Implement for window functions

2021-01-01 Thread Krasiyan Andreev
Hi, it looks like cfbot.cputube.org didn't recognize and can't apply a patch, so I resend it now with a different format, no other changes. На ср, 30.12.2020 г. в 22:16 ч. Krasiyan Andreev написа: > It works - now it compiles clean and all checks are passed, thank you. I > will continue with

Re: psql \df choose functions by their arguments

2021-01-01 Thread Thomas Munro
On Thu, Dec 31, 2020 at 7:01 AM Greg Sabino Mullane wrote: > Attached is the latest patch against HEAD - basically fixes a few typos. Hi Greg, It looks like there is a collation dependency here that causes the test to fail on some systems: === ./src/test/regress/regression.diffs === diff -U3

Re: faster ETL / bulk data load for heap tables

2021-01-01 Thread Amit Kapila
On Fri, Jan 1, 2021 at 7:37 PM Luc Vlaming wrote: > > Hi, > > In an effort to speed up bulk data loading/transforming I noticed that > considerable time is spent in the relation extension lock. > We already do extend the relation in bulk when there is a contention on relation extension lock via

Re: Move --data-checksums to common options in initdb --help

2021-01-01 Thread Michael Paquier
On Fri, Jan 01, 2021 at 08:34:34PM +0100, Michael Banck wrote: > I think enough people use data checksums these days that it warrants to > be moved into the "normal part", like in the attached. +1. Let's see first what others think about this change. -- Michael signature.asc Description: PGP

Re: WIP: BRIN multi-range indexes

2021-01-01 Thread Thomas Munro
On Sun, Dec 20, 2020 at 1:16 PM Tomas Vondra wrote: > Attached is an updated version of the patch series, rebased on current > master, and results for benchmark comparing the various bloom variants. Perhaps src/include/utils/inet.h needs to include , because FreeBSD says:

Re: Moving other hex functions to /common

2021-01-01 Thread Michael Paquier
On Fri, Jan 01, 2021 at 03:06:13PM -0500, Bruce Momjian wrote: > Thanks. I had to learn how to squash my commits into a new branch and > then generate a format-patch on that: > > https://bugsdb.com/_en/debug/8b648ec395b86be32efa9629cb006d74 > > I wanted to see how the cfbot liked my

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2021-01-01 Thread Bharath Rupireddy
Thanks for taking a look at the patches. On Fri, Jan 1, 2021 at 9:35 PM Zhihong Yu wrote: > Happy new year. > > + appendStringInfo(, "(%s, %s)", server->servername, > +entry->invalidated ? "false" : "true"); > > Is it better to use 'invalidated' than 'false' in the

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

2021-01-01 Thread Andrey Borodin
> 2 янв. 2021 г., в 01:35, Noah Misch написал(а): > There's no > other connection to this thread, and one can review patches on this thread > without studying commit c732c3f. OK, thanks! Do I understand correctly that this is bugfix that needs to be back-patched? Thus we should not refactor

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2021-01-01 Thread Bharath Rupireddy
On Sat, Jan 2, 2021 at 10:53 AM Bharath Rupireddy wrote: > Thanks for taking a look at the patches. > > On Fri, Jan 1, 2021 at 9:35 PM Zhihong Yu wrote: > > Happy new year. > > > > + appendStringInfo(, "(%s, %s)", server->servername, > > +entry->invalidated ?