Re: range_agg

2020-01-19 Thread Pavel Stehule
so 18. 1. 2020 v 17:35 odesílatel Pavel Stehule napsal: > > > so 18. 1. 2020 v 17:07 odesílatel Paul A Jungwirth < > p...@illuminatedcomputing.com> napsal: > >> On Sat, Jan 18, 2020 at 7:20 AM Pavel Stehule >> wrote: >> > Can be nice to have a polymorphic function >> > >> > multirange(anymultira

Re: Parallel grouping sets

2020-01-19 Thread Richard Guo
I realized that there are two patches in this thread that are implemented according to different methods, which causes confusion. So I decide to update this thread with only one patch, i.e. the patch for 'Implementation 1' as described in the first email and then move the other patch to a separate

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-01-19 Thread Michael Paquier
On Sat, Jan 18, 2020 at 06:21:22PM +0300, Alexander Korotkov wrote: > I made some minor cleanup. In particular, I've to fix usage of terms > "WAL" and "WALs". This patch sometimes use term "WAL" to specify > single WAL file and term "WALs" to specify multiple WAL files. But > WAL stands for Writ

Re: remove separate postgres.(sh)description files

2020-01-19 Thread Heikki Linnakangas
On 16/01/2020 23:39, Tomas Vondra wrote: On Wed, Jan 08, 2020 at 02:33:23PM +0200, Heikki Linnakangas wrote: On 31/12/2019 02:08, John Naylor wrote: I'm guessing the initial data for pg_(sh)description is output into separate files because it was too difficult for the traditional shell script t

SLRU statistics

2020-01-19 Thread Tomas Vondra
Hi, One of the stats I occasionally wanted to know are stats for the SLRU stats (we have couple of those - clog, subtrans, ...). So here is a WIP version of a patch adding that. The implementation is fairly simple - the slru code updates counters in local memory, and then sends them to the colle

Re: should crash recovery ignore checkpoint_flush_after ?

2020-01-19 Thread Justin Pryzby
On Sat, Jan 18, 2020 at 03:32:02PM -0800, Andres Freund wrote: > On 2020-01-19 09:52:21 +1300, Thomas Munro wrote: > > On Sun, Jan 19, 2020 at 3:08 AM Justin Pryzby wrote: > > Does sync_file_range() even do anything for non-mmap'd files on ZFS? > > Good point. Next time it might be worthwhile to

Re: [Proposal] Global temporary tables

2020-01-19 Thread Erik Rijkers
On 2020-01-19 18:04, 曾文旌(义从) wrote: 2020年1月14日 下午9:20,Pavel Stehule 写道: út 14. 1. 2020 v 14:09 odesílatel 曾文旌(义从) > napsal: [global_temporary_table_v4-pg13.patch ] Hi, This patch doesn't quiet apply for me: patching file src/backend/access/common/relopt

[PATCH] Windows port, fix some resources leaks

2020-01-19 Thread Ranier Vilela
Hi, greetings everyone. Continuing the process of improving windows port, I'm trying to fix some leaks. best regards, Ranier Vilela win_resource_leak.patch Description: Binary data

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-01-19 Thread Alvaro Herrera
On 2020-Jan-19, Michael Paquier wrote: > So using WAL to tell about a WAL segment file is wrong, WALs is not a > term that actually exists. I agree. > So, in my opinion, it is fine to use "WAL file", "WAL segment" or even > "WAL segment file". Agreed with these three terms -- "WAL file" seems t

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-01-19 Thread Tom Lane
Alvaro Herrera writes: > On 2020-Jan-19, Michael Paquier wrote: >> +use File::Glob ':bsd_glob'; >> +use File::Path qw(remove_tree make_path); >> +use File::Spec::Functions qw(catdir catfile); >> Is this compatible with our minimum perl requirements for the TAP >> tests? > I *think* :bsd_glob shou

Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from a REFCURSOR

2020-01-19 Thread Dent John
> On 11 Jan 2020, at 12:04, Dent John wrote: > >> On 10 Jan 2020, at 15:45, Daniel Verite wrote: >> >> postgres=# select unnest('c'::refcursor); >> server closed the connection unexpectedly >> This probably means the server terminated abnormally >> before or while processing the reque

Re: longs where uint64s could be

2020-01-19 Thread David Fetter
On Fri, Jan 17, 2020 at 05:12:20PM -0800, Peter Geoghegan wrote: > On Fri, Jan 17, 2020 at 4:42 PM David Fetter wrote: > > While going over places where I might use compiler intrinsics for > > things like ceil(log2(n))) and next power of 2(n), I noticed that a > > lot of things that can't be fract

Re: Possible performance regression with pg_dump of a large number of relations

2020-01-19 Thread Felipe Sateler
Hello Stephen, everyone, On Fri, Jan 12, 2018 at 10:39:09PM -0500, Stephen Frost wrote: > Greetings Jeff & Luke, > > * Jeff Janes (jeff.ja...@gmail.com) wrote: > > Sorry, that query reflects some munging I did to it. The real part added > > to the query is: > > > > EXISTS (SELECT 1 FROM pg_attrib

[PATCH] src\backend\utils\adt\numeric.c copy and past error

2020-01-19 Thread Ranier Vilela
Hi, Possible copy and past error, found in numeric.c. I believe I believe that the author's intention was to return const_zero. regards, Ranier Vilela numeric.patch Description: Binary data

Re: range_agg

2020-01-19 Thread Paul A Jungwirth
On Sun, Jan 19, 2020 at 12:10 AM Pavel Stehule wrote: > Now, I think so name "anymultirange" is not good. Maybe better name is just > "multirange" Are you sure? This function exists to be a cast to an anymultirange, and I thought the convention was to name cast functions after their destination

Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error

2020-01-19 Thread Tom Lane
Ranier Vilela writes: > Possible copy and past error, found in numeric.c. > I believe I believe that the author's intention was to return const_zero. Did you read the comment just above there? regards, tom lane

[PATCH] Windows port, fix some missing locks

2020-01-19 Thread Ranier Vilela
Hi, Two possible race condition found. 1. src\backend\port\win32\signal.c (line 82) The var "pg_signal_queue", is accessed eleswhere with lock. 2. src\backend\postmaster\syslogger.c The var "rotation_requested" is accessed elsewhere with lock. regards, Ranier Vilela win_missing_locks.patch Desc

Re: remove separate postgres.(sh)description files

2020-01-19 Thread John Naylor
On Sun, Jan 19, 2020 at 7:58 PM Heikki Linnakangas wrote: > > > On Wed, Jan 08, 2020 at 02:33:23PM +0200, Heikki Linnakangas wrote: > >> Grepping around, there are a few stray references to > >> postgres.description still: > >> > >> $ git grep -r -I postgres.shdescript . > >> src/backend/catalog/.

Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error

2020-01-19 Thread Ranier Vilela
Hi, Yes, but the comment it does not clarify that the return of the variable "const_one" is intentional, instead of "const_zero". Anybody with reads the source, can think which is a copy and paste mistake. regards Ranier Vilela Em dom., 19 de jan. de 2020 às 21:22, Tom Lane escreveu: > Ranier

Re: Reorderbuffer crash during recovery

2020-01-19 Thread vignesh C
On Sat, Jan 18, 2020 at 2:42 AM Alvaro Herrera wrote: > > On 2020-Jan-17, vignesh C wrote: > > > Thanks Dilip for reviewing. > > I have fixed the comments you have suggested. > > I ended up rewording that comment completely; I thought the original was > not explaining things well enough. > > I als

Re: range_agg

2020-01-19 Thread Tom Lane
Paul A Jungwirth writes: > On Sun, Jan 19, 2020 at 12:10 AM Pavel Stehule > wrote: >> Now, I think so name "anymultirange" is not good. Maybe better name is just >> "multirange" > Are you sure? This function exists to be a cast to an anymultirange, > and I thought the convention was to name ca

Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error

2020-01-19 Thread Tom Lane
Ranier Vilela writes: > Yes, but the comment it does not clarify that the return of the variable > "const_one" is intentional, instead of "const_zero". I'm not sure which part of "NaN ^ 0 = 1" doesn't clarify for you that the intended result is 1. Even without the comment, if you'd bothered to r

RE: SLRU statistics

2020-01-19 Thread tsunakawa.ta...@fujitsu.com
From: Tomas Vondra > One of the stats I occasionally wanted to know are stats for the SLRU > stats (we have couple of those - clog, subtrans, ...). So here is a WIP > version of a patch adding that. How can users take advantage of this information? I think we also need the ability to set the si

Re: TRUNCATE on foreign tables

2020-01-19 Thread Kyotaro Horiguchi
Hello. At Fri, 17 Jan 2020 22:49:41 +0900, Kohei KaiGai wrote in > The v3 patch updated the points below: Did you attached it? regards. -- Kyotaro Horiguchi NTT Open Source Software Center

Re: TRUNCATE on foreign tables

2020-01-19 Thread Kohei KaiGai
2020年1月20日(月) 11:09 Kyotaro Horiguchi : > > Hello. > > At Fri, 17 Jan 2020 22:49:41 +0900, Kohei KaiGai wrote > in > > The v3 patch updated the points below: > > Did you attached it? > Sorry, it was a midnight job on Friday. Please check the attached patch. Best regards, -- HeteroDB, Inc / The

Re: [HACKERS] Block level parallel vacuum

2020-01-19 Thread Amit Kapila
On Sun, Jan 19, 2020 at 2:15 AM Peter Geoghegan wrote: > > On Fri, Jan 17, 2020 at 1:18 AM Amit Kapila wrote: > > Thanks for doing this test again. In the attached patch, I have > > addressed all the comments and modified a few comments. > > I am in favor of the general idea of parallel VACUUM t

Re: [HACKERS] Block level parallel vacuum

2020-01-19 Thread Amit Kapila
On Fri, Jan 17, 2020 at 4:35 PM Mahendra Singh Thalor wrote: > > Below are some review comments for v50 patch. > > 1. > +LVShared > +LVSharedIndStats > +LVParallelState > LWLock > > I think, LVParallelState should come before LVSharedIndStats. > > 2. > +/* > + * It is possible that parall

[PATCH] query rewrite for distinct stage under some cases

2020-01-19 Thread Andy Fan
Hi Hackers: This is a patch for unique elimination rewrite for distinct query. it will cost much for a big result set and some times it is not necessary. The basic idea is the unique node like in the following can be eliminated. 1. select distinct pk, ... from t; 2. select distinct uk-col1

Re: [HACKERS] Block level parallel vacuum

2020-01-19 Thread Masahiko Sawada
On Mon, 20 Jan 2020 at 12:39, Amit Kapila wrote: > > On Fri, Jan 17, 2020 at 4:35 PM Mahendra Singh Thalor > wrote: > > > > Below are some review comments for v50 patch. > > > > 1. > > +LVShared > > +LVSharedIndStats > > +LVParallelState > > LWLock > > > > I think, LVParallelState should come be

Master Master replication

2020-01-19 Thread Prabhu R
Hi Team, Im looking for the roadmap of the feature - master-mater replication. In Postgresql-10, Bi-Directional replication (BDR3) has been embedded in it. Are there any plans to have built-in master-master replications in future versions of Postgresql 13 (or) 14 ? Thanks, Prabhu.R

Re: range_agg

2020-01-19 Thread Pavel Stehule
po 20. 1. 2020 v 1:38 odesílatel Tom Lane napsal: > Paul A Jungwirth writes: > > On Sun, Jan 19, 2020 at 12:10 AM Pavel Stehule > wrote: > >> Now, I think so name "anymultirange" is not good. Maybe better name is > just "multirange" > > > Are you sure? This function exists to be a cast to an an

Add limit option to copy function

2020-01-19 Thread 김대호
Dear all.   I suggest adding a limit option to the copy function that limits count of input/output. I think this will be useful for testing with sample data. Usage is similar to SELECT LIMIT.   COPY TO : COPY (Table) TO '(File)' CSV LIMIT (count); COPY FROM : COPY (Table) FROM '(File)'

Re: Master Master replication

2020-01-19 Thread Craig Ringer
On Mon, 20 Jan 2020 at 12:37, Prabhu R wrote: > Hi Team, > > Im looking for the roadmap of the feature - master-mater replication. > > In Postgresql-10, Bi-Directional replication (BDR3) has been embedded in > it. > It's available as an extension, it's not part of PostgreSQL 10. PostgreSQL 10 h

Re: doc: vacuum full, fillfactor, and "extra space"

2020-01-19 Thread Justin Pryzby
Rebased against 40d964ec997f64227bc0ff5e058dc4a5770a70a9 >From b9f10d21de62354d953e388642fcdfc6d97a4a47 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Thu, 26 Dec 2019 18:54:28 -0600 Subject: [PATCH v2] doc: VACUUM FULL: separate paragraph; fillfactor FILLFACTOR seems to apply here. Also, "n

Re: error context for vacuum to include block number

2020-01-19 Thread Justin Pryzby
Rebased against 40d964ec997f64227bc0ff5e058dc4a5770a70a9 I moved some unrelated patches to a separate thread ("vacuum verbose detail logs are unclear") >From 33c7166e3c8f056a8eb6295ec92fed8c85eda7d6 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Mon, 23 Dec 2019 14:38:01 -0600 Subject: [PATC

Re: range_agg

2020-01-19 Thread Paul A Jungwirth
On Sun, Jan 19, 2020 at 4:38 PM Tom Lane wrote: > True for casts involving concrete types, mainly because we'd like > the identity "value::typename == typename(value)" to hold without > too much worry about whether the latter is a plain function call > or a special case. Not sure whether it makes

Re: Physical replication slot advance is not persistent

2020-01-19 Thread Michael Paquier
On Thu, Jan 16, 2020 at 08:09:09PM +0300, Alexey Kondratov wrote: > OK, I have definitely overthought that, thanks. This looks like a minimal > subset of changes that actually solves the bug. I would only prefer to keep > some additional comments (something like the attached), otherwise after half

Re: making the backend's json parser work in frontend code

2020-01-19 Thread Mark Dilger
> On Jan 16, 2020, at 1:24 PM, Tom Lane wrote: > >>> >>> Lastly, it strikes me that maybe pg_wchar.h, or parts of it, should >>> migrate over to src/include/common. But that'd be far more invasive >>> to other source files, so I've not touched the issue here. > >> I don't have a view on this

Re: Greatest Common Divisor

2020-01-19 Thread Dean Rasheed
On Tue, 7 Jan 2020 at 12:31, Tom Lane wrote: > > Dean Rasheed writes: > > Do we actually need the smallint versions of these functions? > > Doubt it. It'd be fairly hard even to call those, since e.g. "42" > is an int not a smallint. > I see this has been marked RFC. I'll take it, and barring o

Re: base backup client as auxiliary backend process

2020-01-19 Thread Masahiko Sawada
On Thu, 16 Jan 2020 at 00:17, Peter Eisentraut wrote: > > On 2020-01-15 01:40, Masahiko Sawada wrote: > > Could you rebase the main patch that adds base backup client as > > auxiliary backend process since the previous version patch (v3) > > conflicts with the current HEAD? > > attached Thanks. I

Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings

2020-01-19 Thread Craig Ringer
On Thu, 9 Jan 2020 at 22:38, Christoph Berg wrote: > Re: Robert Haas 2020-01-09 nw+...@mail.gmail.com> > > Does this mean that a non-superuser can induce postgres_fdw to read an > > arbitrary file from the local filesystem? > > Yes, see my comments in the "Allow 'sslkey' and 'sslcert' in > postg

Re: Implementing Incremental View Maintenance

2020-01-19 Thread Yugo NAGATA
On Fri, 17 Jan 2020 14:10:32 -0700 (MST) legrand legrand wrote: > Hello, > > It seems that patch v11 doesn't apply any more. > Problem with "scanRTEForColumn" maybe because of change: Thank you for your reporting! We will fix this in the next update. Regards, Yugo Nagata > > https://git.pos