Re: [HACKERS] path toward faster partition pruning

2018-03-05 Thread Amit Langote
On 2018/03/03 0:47, Robert Haas wrote: > On Fri, Mar 2, 2018 at 6:21 AM, Amit Langote wrote: >> Given the patch's implementation, we'll have to make the structure of that >> Node tree a bit more complex than a simple List. For one thing, the patch >> handles OR clauses by performing pruning separa

Re: [PATCH] Verify Checksums during Basebackups

2018-03-05 Thread Michael Banck
Hi, On Sun, Mar 04, 2018 at 06:19:00PM +0100, Magnus Hagander wrote: > So sure, if we go with WARNING + exit with an errorcode, that is perhaps > the best combination of the two. I had a look at how to go about this, but it appears to be a bit complicated; the first problem is that sendFile() and

Re: PATCH: psql tab completion for SELECT

2018-03-05 Thread Vik Fearing
On 03/04/2018 08:06 PM, Tom Lane wrote: > Edmund Horner writes: >> On 26 January 2018 at 13:44, Vik Fearing wrote: >>> On 01/26/2018 01:28 AM, Edmund Horner wrote: The patch mentioned attempts to put savepoints around the tab completion query where appropriate. > >>> I am -1 on this id

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-05 Thread Jeevan Chalke
On Fri, Mar 2, 2018 at 3:22 AM, Robert Haas wrote: > On Thu, Mar 1, 2018 at 5:34 AM, Jeevan Chalke > wrote: > > Attached new patchset after rebasing my changes over these changes and on > > latest HEAD. > > +* We have already created a Gather or Gather Merge path atop > cheapest > +

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-05 Thread Jeevan Chalke
On Sat, Mar 3, 2018 at 12:12 AM, Robert Haas wrote: > On Thu, Mar 1, 2018 at 4:52 PM, Robert Haas wrote: > > This is not a full review, but I'm out of time for right now. > > Another thing I see here now is that create_grouping_paths() and > create_child_grouping_paths() are extremely similar.

Re: ON CONFLICT DO UPDATE for partitioned tables

2018-03-05 Thread Pavan Deolasee
On Fri, Mar 2, 2018 at 9:06 PM, Alvaro Herrera wrote: > > > Re. the "ugly hack" comments in adjust_inherited_tlist(), I'm confused: > expand_targetlist() runs *after*, not before, so how could it have > affected the result? > If I understand correctly, planner must have called expand_targetlist(

Re: chained transactions

2018-03-05 Thread Simon Riggs
On 2 March 2018 at 07:18, Andres Freund wrote: > Hi, > > On 2018-02-28 22:35:52 -0500, Peter Eisentraut wrote: >> This feature is meant to help manage transaction isolation in >> procedures. > > This is a major new feature, submitted the evening before the last CF > for v11 starts. Therefore I thi

Re: GSOC 2018 ideas

2018-03-05 Thread Aleksander Alekseev
Hello Charles, >Went through the documents listed by you, and they are helpful! > It seems the main purpose of extension pg_protobuf is to parse > a protobuf struct and return the decoded field. May I ask how these kinds > of extensions are used in postgreSQL (or in other words, the scenarios

Re: Online enabling of checksums

2018-03-05 Thread Michael Banck
Hi, Am Sonntag, den 04.03.2018, 23:30 +0100 schrieb Daniel Gustafsson: > Agreed. Looking at our current error messages, “in file” is conventionally > followed by the filename. I do however think “calculated” is better than > “expected” since it conveys clearly that the compared checksum is calcu

Re: Online enabling of checksums

2018-03-05 Thread Magnus Hagander
On Mon, Mar 5, 2018 at 10:43 AM, Michael Banck wrote: > Hi, > > Am Sonntag, den 04.03.2018, 23:30 +0100 schrieb Daniel Gustafsson: > > Agreed. Looking at our current error messages, “in file” is > conventionally > > followed by the filename. I do however think “calculated” is better than > > “e

Re: Better Upgrades

2018-03-05 Thread Daniel Gustafsson
> On 02 Mar 2018, at 12:59, Greg Stark wrote: > My feeling is that worrying about in-place binary upgrades today is > wasted effort. Already the window for installations where this is > useful is narrow -- you have to be big enough that the resources for > deploying a second instance is significa

Re: [HACKERS] [PATCH] Incremental sort

2018-03-05 Thread Tomas Vondra
Hi, I have started reviewing the patch and doing some testing, and I have pretty quickly ran into a segfault. Attached is a simple reproducer and an backtrace. AFAICS the bug seems to be somewhere in the tuplesort changes, likely resetting a memory context too soon or something like that. I haven'

Re: PATCH: psql tab completion for SELECT

2018-03-05 Thread Edmund Horner
On 5 March 2018 at 08:06, Tom Lane wrote: > I looked into this patch and was disappointed to discover that it had > only a very ad-hoc solution to the problem of version-dependent tab > completion queries. We need something better --- in particular, the > recent prokind changes mean that there ne

Re: PATCH: psql tab completion for SELECT

2018-03-05 Thread Edmund Horner
On 5 March 2018 at 21:46, Vik Fearing wrote: > Tab completion on functions in SELECT (a subset of this thread's patch) > is quite important to me personally. I will work on this in the coming > days. It's something I've missed numerous times in the last few months at work. I guess I should real

Re: Better Upgrades

2018-03-05 Thread Daniel Gustafsson
> On 02 Mar 2018, at 01:03, Bruce Momjian wrote: > > On Tue, Feb 6, 2018 at 01:51:09PM +0100, Daniel Gustafsson wrote: >>> On 06 Feb 2018, at 01:09, David Fetter wrote: >> >>> - pg_upgrade is very much a blocker for on-disk format changes. >> >> I wouldn’t call it a blocker, but pg_upgrade ac

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2018-03-05 Thread Daniel Gustafsson
> On 05 Mar 2018, at 02:41, Michael Paquier wrote: > On Sun, Mar 04, 2018 at 11:15:58PM +0100, Daniel Gustafsson wrote: >> If no new TLS library is supported in v11, we still got cleaner SSL support >> out >> of it due to the work performed to further remove our dependency on OpenSSL, >> so >>

Re: [PATCH] Verify Checksums during Basebackups

2018-03-05 Thread Stephen Frost
Michael, * Michael Banck (michael.ba...@credativ.de) wrote: > On Sun, Mar 04, 2018 at 06:19:00PM +0100, Magnus Hagander wrote: > > So sure, if we go with WARNING + exit with an errorcode, that is perhaps > > the best combination of the two. > > I had a look at how to go about this, but it appears

Re: [PATCH] Verify Checksums during Basebackups

2018-03-05 Thread Michael Banck
Hi, Am Montag, den 05.03.2018, 06:36 -0500 schrieb Stephen Frost: > Michael, > > * Michael Banck (michael.ba...@credativ.de) wrote: > > On Sun, Mar 04, 2018 at 06:19:00PM +0100, Magnus Hagander wrote: > > > So sure, if we go with WARNING + exit with an errorcode, that is perhaps > > > the best co

Re: [PATCH] Verify Checksums during Basebackups

2018-03-05 Thread Stephen Frost
Michael, * Michael Banck (michael.ba...@credativ.de) wrote: > Am Montag, den 05.03.2018, 06:36 -0500 schrieb Stephen Frost: > > * Michael Banck (michael.ba...@credativ.de) wrote: > > > On Sun, Mar 04, 2018 at 06:19:00PM +0100, Magnus Hagander wrote: > > > > So sure, if we go with WARNING + exit wi

Re: pgbench randomness initialization

2018-03-05 Thread Fabien COELHO
Hello Chapman, Here is v9. It needs s/explicitely/explicitly/ in the docs. Done. The parsing of the seed involves matters of taste, I guess: if it were a signed int, then sscanf's built-in %i would do everything those three explicit hex/octal/decimal branches do, but there's no unsigned v

Re: [HACKERS] Re: [COMMITTERS] pgsql: Remove pgbench "progress" test pending solution of its timing is (fwd)

2018-03-05 Thread Fabien COELHO
Minor rebase after vpath fix (e94f2bc809a0c684185666f19d81f6496e732a3a). -- Fabien.diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 5c07dd9..1fd2451 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -5163,6 +5163,96 @@ main(int argc, char **argv)

Re: All Taxi Services need Index Clustered Heap Append

2018-03-05 Thread Aleksander Alekseev
Hello Darafei, > After my talk at pgconf.ru Alexander Korotkov encouraged me to share my > story and thoughts in -hackers. > [...] > - An append-only table of shape (id uuid, ts timestamp, geom geometry, > heading speed accuracy float, source text). > A btree index on (id, ts). > [...] > select *

Re: All Taxi Services need Index Clustered Heap Append

2018-03-05 Thread Komяpa
> > This approach mixes well with hash > partitioning. It would be neat indeed if PostgreSQL do something > equivalent on its own, and pluggable storage work being done could > enable index organized tables that would help. But you probably need > something right now. > Fixing glaring issues (no v

Re: Server Crash while executing pg_replication_slot_advance (second time)

2018-03-05 Thread tushar
Hi, There is an another similar issue where i am getting an error - postgres=# select * from pg_replication_slots ;     slot_name |    plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn --+

Re: [PATCH] Find additional connection service files in pg_service.conf.d directory

2018-03-05 Thread Andreas 'ads' Scherbaum
On Thu, Mar 1, 2018 at 7:40 PM, Curt Tilmes wrote: > On Thu, Mar 1, 2018 at 1:13 PM, Andres Freund wrote: > > > I'd also insist that the file ending is ".conf". > > New patch limits files to ".conf". > Looked over this patch and found that you limit the directory entries to files only. Would

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2018-03-05 Thread Etsuro Fujita
Hi Arthur, (2018/03/03 18:51), Arthur Zakirov wrote: On Wed, Feb 28, 2018 at 05:22:42PM +0900, Etsuro Fujita wrote: I rebased the patch over HEAD and revised comments/docs a little bit. Please find attached a new version of the patch. I've reviewed the patch. The code is good, clear and it i

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-05 Thread Michael Banck
Hi Alvaro, On Thu, Mar 01, 2018 at 04:00:52PM -0300, Alvaro Herrera wrote: > strdup -> pg_strdup() Fixed. > I wonder if, instead of doing strcmp() all over the place, we should > give this behavior a separate boolean flag in lclContext. I mused a bit about what to name that flag and came up wit

Re: new function for tsquery creartion

2018-03-05 Thread Aleksander Alekseev
It seems that this patch doesn't apply anymore, see http://commitfest.cputube.org/ The new status of this patch is: Waiting on Author

Re: Cache lookup errors with functions manipulation object addresses

2018-03-05 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hello Michael, It looks like that this patch doesn't apply anymore: http://

Re: Better Upgrades

2018-03-05 Thread David Fetter
On Mon, Mar 05, 2018 at 11:18:20AM +0100, Daniel Gustafsson wrote: > > On 02 Mar 2018, at 12:59, Greg Stark wrote: > > > My feeling is that worrying about in-place binary upgrades today > > is wasted effort. Already the window for installations where this > > is useful is narrow -- you have to be

Re: Flexible configuration for full-text search

2018-03-05 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Unfortunately this patch doesn't apply anymore: http://commitfest.cputube.org

Re: inserts into partitioned table may cause crash

2018-03-05 Thread Etsuro Fujita
(2018/03/01 21:40), Etsuro Fujita wrote: (2018/02/28 17:36), Amit Langote wrote: Attached a patch to fix that, which would need to be back-patched to 10. Good catch! Will review. I started reviewing this. I think the analysis you mentioned upthread would be correct, but I'm not sure the pa

Re: Transform for pl/perl

2018-03-05 Thread Pavel Stehule
Hi I am looking on this patch. I found few issues: 1. compile warning I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/lib64/perl5/CORE -c -o jsonb_plperl.o jsonb_plperl.c jsonb_plperl.c: In function ‘SV_FromJsonbValue’: jsonb_plperl.c:69:9: warning: ‘result’ may be used uninitia

Re: [PATCH] Find additional connection service files in pg_service.conf.d directory

2018-03-05 Thread Curt Tilmes
On Mon, Mar 5, 2018 at 7:45 AM, Andreas 'ads' Scherbaum wrote: > On Thu, Mar 1, 2018 at 7:40 PM, Curt Tilmes wrote: >> On Thu, Mar 1, 2018 at 1:13 PM, Andres Freund wrote: > Looked over this patch and found that you limit the directory entries to > files only. > Would it make sense to allow link

Re: Incorrect use of "an" and "a" in code comments and docs

2018-03-05 Thread Alvaro Herrera
Michael Paquier wrote: > On Mon, Mar 05, 2018 at 07:42:40PM +1300, Thomas Munro wrote: > > $ git grep ' a SQL ' | wc -l > > 642 > > $ git grep ' an SQL ' | wc -l > > 219 > > > > /me grabs popcorn > > ess-queue-el, sir. Yeah, but http://patorjk.com/blog/2012/01/26/pronouncing-sql-s-q-l-

Re: perltidy version

2018-03-05 Thread Alvaro Herrera
Magnus Hagander wrote: > For example, Debian ships with 20140328, which produces the attached diff. > I'm not sure if we want to go to whatever is a "common version on most > platforms" today, or just "whatever is latest" if we do upgrade. AFAICT > RHEL 7 seems to be on 20121207, RHEL 6 on 2009061

Re: [HACKERS] Creating backup history files for backups taken from standbys

2018-03-05 Thread David Steele
On 3/5/18 1:06 AM, Michael Paquier wrote: > On Fri, Mar 02, 2018 at 03:41:57PM -0500, David Steele wrote: >> On 3/2/18 1:03 PM, Fujii Masao wrote: >>> On Fri, Mar 2, 2018 at 1:07 PM, Michael Paquier wrote: We would talk about two backups running simultaneously on a standby, which would o

Re: perltidy version

2018-03-05 Thread Magnus Hagander
On Mon, Mar 5, 2018 at 2:53 PM, Alvaro Herrera wrote: > Magnus Hagander wrote: > > > For example, Debian ships with 20140328, which produces the attached > diff. > > I'm not sure if we want to go to whatever is a "common version on most > > platforms" today, or just "whatever is latest" if we do

Re: constraint exclusion and nulls in IN (..) clause

2018-03-05 Thread Emre Hasegeli
>> Shouldn't we check if we consumed all elements (state->next_elem >= >> state->num_elems) inside the while loop? > > You're right. Fixed. I don't think the fix is correct. arrayconst_next_fn() can still execute state->next_elem++ without checking if we consumed all elements. I couldn't manage

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-05 Thread Andreas 'ads' Scherbaum
On Mon, Mar 5, 2018 at 1:49 PM, Michael Banck wrote: > > In any case, new patch attached which does this. > The null device is already defined in port.h, as DEVNULL. No need to redefine it as NULL_DEVICE. Alternatively paths.h defines _PATH_DEVNULL. Regards, -- Andreas 'ads' Scherbaum German

Re: MCV lists for highly skewed distributions

2018-03-05 Thread Dean Rasheed
On 7 February 2018 at 15:58, Dean Rasheed wrote: > On 7 February 2018 at 15:25, Robert Haas wrote: >> Do you plan to press forward with this, then, or what's >> the next step? > > I plan to do more testing TL;DR: I tested this new algorithm using 9 different relative standard error cutoffs (10%,

Re: PATCH: psql tab completion for SELECT

2018-03-05 Thread Tom Lane
Edmund Horner writes: > On 5 March 2018 at 08:06, Tom Lane wrote: >> If people like this approach, I propose to commit this more or less >> as-is. The select-tab-completion patch would then need to be rewritten >> to use this infrastructure, but I think that should be straightforward. > My patc

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-05 Thread Michael Banck
Hi Andreas, On Mon, Mar 05, 2018 at 03:15:19PM +0100, Andreas 'ads' Scherbaum wrote: > The null device is already defined in port.h, as DEVNULL. No need to > redefine it as NULL_DEVICE. Thanks for pointing that out, a new patch removing NULL_DEVICE is attached. Michael -- Michael Banck Projek

Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)

2018-03-05 Thread Tomas Vondra
Hi, I've done a bit of benchmarking on the last patch version (from 22/8), using a simple workload: 1) 8 clients doing SELECT SUM(abalance) FROM pgbench_accounts with the table truncated to only 10k rows 2) variable number (8, 16, 32, ..., 512) of write clients, doing this \set aid random

Re: PATCH: psql tab completion for SELECT

2018-03-05 Thread David G. Johnston
On Mon, Mar 5, 2018 at 7:41 AM, Tom Lane wrote: > What would be actually useful is to be able to tab-complete even in > the midst of a failed transaction block ... but savepoints as such > won't get us there, and I have no good ideas about what would. > ​Why not have psql open two sessions to th

Re: 2018-03 CFM

2018-03-05 Thread David Steele
Hi Aleksander, On 3/2/18 7:18 AM, Aleksander Alekseev wrote: > >> You do realize we have the actual source database available, I hope? Since >> it's our own system... There is no need to scrape the data back out -- if >> we can just define what kind of reports we want, we can trivially run it on

get_actual_variable_range vs idx_scan/idx_tup_fetch, again

2018-03-05 Thread Marko Tiikkaja
(Sorry for not continuing the thread in 54418d75.2000...@joh.to , but I don't have the original email anymore.) So I'm in the same pickle again. According to pg_stat_user_indexes an index is being used all the time. However, it's only being used by mergejoinscansel() to compare these two plans:

Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)

2018-03-05 Thread Tom Lane
Tomas Vondra writes: > Snapshots are static (we don't really add new XIDs into existing ones, > right?), so why don't we simply sort the XIDs and then use bsearch to > lookup values? That should fix the linear search, without need for any > local hash table. +1 for looking into that, since it wou

Re: PATCH: psql tab completion for SELECT

2018-03-05 Thread Tom Lane
"David G. Johnston" writes: > On Mon, Mar 5, 2018 at 7:41 AM, Tom Lane wrote: >> What would be actually useful is to be able to tab-complete even in >> the midst of a failed transaction block ... but savepoints as such >> won't get us there, and I have no good ideas about what would. > ​Why not

Re: get_actual_variable_range vs idx_scan/idx_tup_fetch, again

2018-03-05 Thread Tom Lane
Marko Tiikkaja writes: > So I'm in the same pickle again. According to pg_stat_user_indexes an > index is being used all the time. However, it's only being used by > mergejoinscansel() to compare these two plans: If it's not being used otherwise, could you drop it? > I think it would be really

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-03-05 Thread Claudio Freire
On Sun, Mar 4, 2018 at 10:25 PM, Masahiko Sawada wrote: > On Mon, Mar 5, 2018 at 10:21 AM, Masahiko Sawada > wrote: >> On Fri, Mar 2, 2018 at 10:50 PM, Claudio Freire >> wrote: >>> On Fri, Mar 2, 2018 at 10:47 AM, Claudio Freire >>> wrote: On Fri, Mar 2, 2018 at 7:38 AM, Masahiko Sawada

Re: Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2018-03-05 Thread David Steele
Hi Tomas, On 1/8/18 3:28 PM, Tomas Vondra wrote: > > > On 01/08/2018 08:39 PM, Tom Lane wrote: >> Tomas Vondra writes: >>> As I already mentioned, Tom's updated patch is better than what I >>> posted initially, and I agree with his approach to the remaining >>> issues he pointed out. But I some

Re: get_actual_variable_range vs idx_scan/idx_tup_fetch, again

2018-03-05 Thread Marko Tiikkaja
On Mon, Mar 5, 2018 at 5:08 PM, Tom Lane wrote: > Marko Tiikkaja writes: > > So I'm in the same pickle again. According to pg_stat_user_indexes an > > index is being used all the time. However, it's only being used by > > mergejoinscansel() to compare these two plans: > > If it's not being use

Re: Re: WIP Patch: Pgbench Serialization and deadlock errors

2018-03-05 Thread David Steele
Hello Marina, On 1/12/18 12:01 PM, Marina Polyakova wrote: >> >> Yep. I'm trying to suggest an incremental path with simple but yet >> quite useful things first. > > This question ("if there's a failure what savepoint we should rollback > to and start the execution again? ...") mostly concerns th

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2018-03-05 Thread Tomas Vondra
On 03/05/2018 04:12 PM, David Steele wrote: > Hi Tomas, > > On 1/8/18 3:28 PM, Tomas Vondra wrote: >> >> >> On 01/08/2018 08:39 PM, Tom Lane wrote: >>> Tomas Vondra writes: As I already mentioned, Tom's updated patch is better than what I posted initially, and I agree with his approac

Too much memory allocated for ReorderBufferDiskChange

2018-03-05 Thread Antonin Houska
I suggest the following change to avoid excessive allocation. sizeof(ReorderBufferDiskChange) should already be contained in ondisk->size. diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c new file mode 100644 index c72a611..84f6e05 ***

Re: Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-03-05 Thread David Steele
Hi Craig, On 1/21/18 5:45 PM, Craig Ringer wrote: > On 6 January 2018 at 08:28, Alvaro Herrera > wrote: > > I think this should use ReadDirExtended with an elevel less than ERROR, > and do nothing. > > Why have strcmp(.) and strcmp(..)?  These are goi

planner failure with ProjectSet + aggregation + parallel query

2018-03-05 Thread Robert Haas
While trying to track down a bug today, I found a different bug. As of 6946280cded903b6f5269fcce105f8ab1d455d33: rhaas=# create table foo (a int); CREATE TABLE rhaas=# set min_parallel_table_scan_size = 0; SET rhaas=# set parallel_setup_cost = 0; SET rhaas=# set parallel_tuple_cost = 0; SET rhaas

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-05 Thread Alvaro Herrera
Please make ctx->discard a bool, not an int. You can initialize it like this: ctx->discard = strcmp(ctx->directory, DEVNULL) == 0; Why do you change the mode to create directory to 0711 from 0700? You have a cuddled "else" in the last hunk. Please uncuddle. -- Álvaro Herrera

Re: PATCH: psql tab completion for SELECT

2018-03-05 Thread Vik Fearing
On 03/05/2018 11:33 AM, Edmund Horner wrote: > On 5 March 2018 at 21:46, Vik Fearing wrote: >> Tab completion on functions in SELECT (a subset of this thread's patch) >> is quite important to me personally. I will work on this in the coming >> days. > > It's something I've missed numerous times

Re: Re: [HACKERS] PoC: custom signal handler for extensions

2018-03-05 Thread David Steele
Hello Maksim, On 1/27/18 2:19 PM, Arthur Zakirov wrote: > On Mon, Jan 22, 2018 at 02:34:58PM +0300, Maksim Milyutin wrote: > > The patch is applied and build. > >> +/* >> + * UnregisterCustomProcSignal >> + * Release slot of specific custom signal. >> + * >> + * This function have to be cal

Re: Too much memory allocated for ReorderBufferDiskChange

2018-03-05 Thread Euler Taveira
2018-03-05 12:26 GMT-03:00 Antonin Houska : > ! ReorderBufferSerializeReserve(rb, > ! > sizeof(ReorderBufferDiskChange) + ondisk->size); > ondisk = (ReorderBufferDiskChange *) rb->outbuf; > Reorde

Re: [Patch] Checksums for SLRU files

2018-03-05 Thread Andrey Borodin
Hi, Ivan! I've found that there are few more places with SLRU items per page, where you have to update usable page size. Please find the diff attached. I agree that there is a little chance to get this commitable quickly, but still, the feature worth working on, from my point of view. Best rega

Re: PATCH: psql tab completion for SELECT

2018-03-05 Thread Vik Fearing
On 03/05/2018 11:21 AM, Edmund Horner wrote: > I am still just slightly unclear on where we are in relation to the > SAVEPOINT patch -- is that redundant now? My vote is to reject that patch. -- Vik Fearing +33 6 46 75 15 36 http://2ndQuadrant.fr Postg

Re: INOUT parameters in procedures

2018-03-05 Thread Pavel Stehule
Hi 2018-02-28 23:28 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > This patch set adds support for INOUT parameters to procedures. > Currently, INOUT and OUT parameters are not supported. > > A top-level CALL returns the output parameters as a result row. In > PL/pgSQL, I have

Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

2018-03-05 Thread Alvaro Herrera
Thomas Munro wrote: > On Sun, Mar 4, 2018 at 10:46 PM, Magnus Hagander wrote: > > Um. Have you actually seen the "mail archive app" cut long threads off in > > other cases? Because it's certainly not supposed to do that... > > Hi Magnus, > > I mean the "flat" thread view: > > https://www.postgr

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-05 Thread Michael Banck
Hi Alvaro, Am Montag, den 05.03.2018, 12:48 -0300 schrieb Alvaro Herrera: > Please make ctx->discard a bool, not an int. Ok, done so now. I forgot to mention that in the earlier resubmission, but I had a look at the other pg_backup_*.c files and isSpecialScript and hasSeek were ints as well, so

Re: [HACKERS] PoC: custom signal handler for extensions

2018-03-05 Thread Maksim Milyutin
Hello David, On 05.03.2018 18:50, David Steele wrote: Hello Maksim, On 1/27/18 2:19 PM, Arthur Zakirov wrote: Is there actual need in UnregisterCustomProcSignal() within _PG_init()? An extension registers a handler and then unregister it doing nothing. It seems useless. Also process_shared_

Re: All Taxi Services need Index Clustered Heap Append

2018-03-05 Thread Ants Aasma
On Mon, Mar 5, 2018 at 2:11 PM, Darafei "Komяpa" Praliaskouski wrote: >> This approach mixes well with hash >> partitioning. It would be neat indeed if PostgreSQL do something >> equivalent on its own, and pluggable storage work being done could >> enable index organized tables that would help. Bu

Re: 2018-03 CFM

2018-03-05 Thread Aleksander Alekseev
Hello David, > I would like to get a list of submitter patches totals vs the total > number of patches they are reviewing. In the past I have done this by > eyeball. > > Do you think you could put something like that together? Sure, no problem. It's pretty late in my timezone (UTC+3) right now

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-05 Thread Alvaro Herrera
I made a few amendments (here's v5) and was ready to push, when I noticed that _StartBlobs() does not seem to be doing the right thing. Did you test this with a few large objects? The reason I noticed is I wondered about the amount of open() calls (plus zlib function calls) we would save by keepin

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2018-03-05 Thread Arthur Zakirov
On Mon, Mar 05, 2018 at 09:44:37PM +0900, Etsuro Fujita wrote: > I rebased the patch over HEAD. Please find attached an updated patch. Thank you! IMHO, it is worth to add more explaining comment into deparseReturningList, why it is necessary to merge WCO attributes to RETURNING clause. You alrea

Re: All Taxi Services need Index Clustered Heap Append

2018-03-05 Thread Alex Kane
https://aws.amazon.com/dms/ DMS might be helpful if you need to move off of RDS Alex Kane On Mon, Mar 5, 2018 at 11:48 AM, Ants Aasma wrote: > On Mon, Mar 5, 2018 at 2:11 PM, Darafei "Komяpa" Praliaskouski > wrote: > >> This approach mixes well with hash > >> partitioning. It would be neat i

Re: [bug fix] pg_rewind takes long time because it mistakenly copies data files

2018-03-05 Thread Fujii Masao
On Wed, Feb 28, 2018 at 3:58 PM, Tsunakawa, Takayuki wrote: > From: Michael Paquier [mailto:mich...@paquier.xyz] >> So I would propose to just do that later. I have looked a second time at >> your patch, attached is the set of tests I have run: > > Thanks so much, that has helped me a lot! > >> I

Re: INOUT parameters in procedures

2018-03-05 Thread Douglas Doole
> > At the top-level, it's even more dubious. In DB2, apparently you write >> >> CALL foo(123, ?); >> >> with a literal ? for the OUT parameters. >> > That's not actually as scary as it seems. DB2 has two cases where you can use a ? like that: 1) In CLP (DB2's equivalent to psql) DB2 draws a di

Re: [HACKERS] Creating backup history files for backups taken from standbys

2018-03-05 Thread Fujii Masao
On Mon, Mar 5, 2018 at 11:01 PM, David Steele wrote: > On 3/5/18 1:06 AM, Michael Paquier wrote: >> On Fri, Mar 02, 2018 at 03:41:57PM -0500, David Steele wrote: >>> On 3/2/18 1:03 PM, Fujii Masao wrote: On Fri, Mar 2, 2018 at 1:07 PM, Michael Paquier wrote: > We would talk about t

Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

2018-03-05 Thread Alvaro Herrera
David G. Johnston wrote: > This bug has an obvious if annoying work-around and fixing the bug will > likely cause people's code, that uses said work-around, to fail. Breaking > people's working code in stable release branches is generally a no-no. > > However, given that this was discovered 4 mo

Re: PATCH: Unlogged tables re-initialization tests

2018-03-05 Thread David Steele
Hi, On 3/1/18 11:59 PM, Michael Paquier wrote: > On Thu, Mar 01, 2018 at 01:12:19PM -0500, David Steele wrote: >> But your point is well-taken. No symlinks are used in this test so it >> *should* work. >> >> Michael, what do you think? > > Perl's symlink() does not work on Windows. It does not

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2018-03-05 Thread Andres Freund
On 2018-03-05 10:41:01 +0900, Michael Paquier wrote: > > If no new TLS library is supported in v11, we still got cleaner SSL support > > out > > of it due to the work performed to further remove our dependency on > > OpenSSL, so > > we still come out on top IMO. Thanks Peter et.al! > > I am defi

Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

2018-03-05 Thread Tomas Vondra
Hi, On 03/03/2018 11:20 AM, David Rowley wrote: > I've attached a rebased patch which fixes up the conflicts caused by 8b08f7d. > The patch seems fine to me. A couple of minor points 1) I wonder if we should make the list in create_table.sgml to also be alphabetically sorted. 2) I think the co

Re: INOUT parameters in procedures

2018-03-05 Thread Peter Eisentraut
On 3/5/18 11:00, Pavel Stehule wrote: > I am looking on attached code, and it looks pretty well. Can be really > nice if this code will be part of release 11, because it is very > interesting, important feature feature. Here is an updated patch, rebased on top of several recent changes, also added

Re: INOUT parameters in procedures

2018-03-05 Thread Pavel Stehule
2018-03-05 19:38 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 3/5/18 11:00, Pavel Stehule wrote: > > I am looking on attached code, and it looks pretty well. Can be really > > nice if this code will be part of release 11, because it is very > > interesting, important featur

Re: Optimize Arm64 crc32c implementation in Postgresql

2018-03-05 Thread Heikki Linnakangas
On 02/03/18 06:42, Andres Freund wrote: On 2018-03-02 11:37:52 +1300, Thomas Munro wrote: So... that stuff probably needs either a configure check for the getauxval function and/or those headers, or an OS check? It'd probably be better to not rely on os specific headers, and instead directly a

Re: IndexJoin memory problem using spgist and boxes

2018-03-05 Thread Alexander Kuzmenkov
On 04.03.2018 20:20, Anton Dignös wrote: The better alternative may be to have two temporary memory contexts, one per-tuple for calling the inner consistent method and one per-index-scan for the traversal memory. Yes, this seems to be a better way of fixing the problem without introducing regr

Re: parallel append vs. simple UNION ALL

2018-03-05 Thread Robert Haas
On Tue, Feb 27, 2018 at 6:21 AM, Rajkumar Raghuwanshi wrote: > I have applied 0001 on pg-head, and while playing with regression tests, it > crashed with below test case. > > postgres=# SET min_parallel_table_scan_size=0; > SET > postgres=# SELECT * FROM information_schema.foreign_data_wrapper_opt

Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2018-03-05 Thread Tom Lane
I wrote: > The thing that I find curious, now that we've shut off autovacuum > altogether on those tables, is that we *still* aren't getting stable > results. How can that be? I spent some time trying to figure out what's going on here. I've still not been able to replicate the failure on any of

Re: [HACKERS] PoC: custom signal handler for extensions

2018-03-05 Thread David Steele
Hi Maksim, On 3/5/18 11:24 AM, Maksim Milyutin wrote: > Hello David, > > > On 05.03.2018 18:50, David Steele wrote: >> Hello Maksim, >> >> On 1/27/18 2:19 PM, Arthur Zakirov wrote: >> >>> Is there actual need in UnregisterCustomProcSignal() within _PG_init()? >>> An extension registers a handler

Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type

2018-03-05 Thread Tom Lane
Tomas Vondra writes: > On 03/04/2018 09:46 PM, Tom Lane wrote: >> Well, I think the existing bytea bug is a counterexample to that. If >> someone were to repeat that mistake with, say, UUID, these tests would not >> catch it, because none of them would exercise UUID-vs-something-else. >> For that

Re: Kerberos test suite

2018-03-05 Thread Peter Eisentraut
On 2/27/18 00:21, Michael Paquier wrote: > Thanks. Could you document that on the README please? krb5-user and > krb5-kdc is a split from Debian. For darwin, are you using macports or > homebrew? I would assume the later, and it would be nice to precise > that in the README as well. On Debian

Re: [HACKERS] generated columns

2018-03-05 Thread Peter Eisentraut
On 2/1/18 21:25, Michael Paquier wrote: > On Thu, Feb 01, 2018 at 09:29:09AM -0500, Peter Eisentraut wrote: >> That would be nice. I'm going to study this some more to see what can >> be done. > > Thanks for the update. Note: Peter has moved the patch to next CF. I didn't get to updating this p

Re: chained transactions

2018-03-05 Thread Andres Freund
On 2018-03-05 09:21:33 +, Simon Riggs wrote: > On 2 March 2018 at 07:18, Andres Freund wrote: > > Hi, > > > > On 2018-02-28 22:35:52 -0500, Peter Eisentraut wrote: > >> This feature is meant to help manage transaction isolation in > >> procedures. > > > > This is a major new feature, submitted

Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

2018-03-05 Thread Alvaro Herrera
Tomas Vondra wrote: > 4) I see you've added generateClonedExtStatsStmt to parse_utilcmd.h, but > it was only really called in parse_utilcmd.c, so I've made it static. I > don't think we need to expose stuff unnecessarily. > BTW the last point made me thinking, because parse_utilcmd.h also > expos

Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

2018-03-05 Thread Thomas Munro
On Tue, Mar 6, 2018 at 5:04 AM, Alvaro Herrera wrote: > Thomas Munro wrote: >> On Sun, Mar 4, 2018 at 10:46 PM, Magnus Hagander wrote: >> > Um. Have you actually seen the "mail archive app" cut long threads off in >> > other cases? Because it's certainly not supposed to do that... >> >> Hi Magnus

Re: PATCH: Configurable file mode mask

2018-03-05 Thread David Steele
On 2/28/18 2:28 AM, Michael Paquier wrote: > On Tue, Feb 27, 2018 at 03:52:32PM -0500, David Steele wrote: >> On 1/30/18 3:01 AM, Michael Paquier wrote: > >>> +command_ok( >>> + ['chmod', "-R", 'g+rX', "$pgdata"], >>> + 'add group perms to PGDATA'); >>> >>> That would blow up on Windows. You

Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly

2018-03-05 Thread Joe Conway
On 03/05/2018 11:19 AM, Tom Lane wrote: > Joe, I wonder if you could add "log_autovacuum_min_duration = 0" to > rhinoceros' extra_config options, temporarily? Correlating that log > output with the log_statement output from the test proper would let > us confirm or deny whether it's autovacuum.

Re: select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?

2018-03-05 Thread Robert Haas
On Sun, Mar 4, 2018 at 4:46 PM, Thomas Munro wrote: > Thanks! Here are a couple of patches. I'm not sure which I prefer. > The "pessimistic" one looks simpler and is probably the way to go, but > the "optimistic" one avoids doing an extra read until it has actually > run out of data and seen mq_

Re: JIT compiling with LLVM v11

2018-03-05 Thread Andres Freund
Hi, On 2018-03-04 21:00:06 -0800, Andres Freund wrote: > > Looking at llvm_get_function(), the function that raises that error, I > > see that there are a few different paths here. I don't have > > HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN defined, and I don't have LLVM < > > 5, so I should be getting

RE: [HACKERS] Client Connection redirection support for PostgreSQL

2018-03-05 Thread Satyanarayana Narlapuram
Please see the attached patch with the comments. Changes in the patch: A client-side PGREDIRECTLIMIT parameter has been introduced to control the maximum number of retries. BE_v3.1 sends a ProtocolNegotiation message. FE_v3.1 downgrades to v3.0 upon receipt of this message.

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-05 Thread Pavel Stehule
2018-02-21 8:35 GMT+01:00 Michael Paquier : > On Tue, Feb 20, 2018 at 06:46:57PM +0300, Arthur Zakirov wrote: > > Just 2 cents from me. It seems that there is a problem with extensions > > GUCs. > > > > [...] > > > > =# SELECT pg_get_functiondef('func_with_set_params'::regproc); > > ERROR: unreco

Re: PATCH: Configurable file mode mask

2018-03-05 Thread David Steele
On 3/1/18 11:18 PM, Michael Paquier wrote: > > Based on my recent lookup at code level for this feature, the patch for > pg_resetwal (which could have been discussed on its own thread as well), > would be fine for commit. The thing could be extended a bit more but > there is nothing opposing even

  1   2   >