Fix missing spaces in docs

2018-03-07 Thread Fabrízio de Royes Mello
Hi all, The attached patch just fix missing spaces in documentation of CREATE SERVER and CREATE USER MAPPING. Regards, -- Fabrízio de Royes Mello Consultoria/Coaching PostgreSQL >> Timbira: http://www.timbira.com.br >> Blog: http://fabriziomello.github.io >> Linkedin:

Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT

2018-03-07 Thread Matheus de Oliveira
Em 2 de mar de 2018 08:15, "Andres Freund" escreveu: Hi, On 2018-02-20 12:10:22 -0300, Matheus de Oliveira wrote: > I attached a patch to add support for changing ON UPDATE/DELETE actions of > a constraint using ALTER TABLE ... ALTER CONSTRAINT. This patch has been

Re: Protect syscache from bloating with negative cache entries

2018-03-07 Thread Andres Freund
On 2018-03-07 14:48:48 -0300, Alvaro Herrera wrote: > Oh, I wasn't suggesting to throw away the whole cache at that point; > only that that is a convenient to do whatever cleanup we want to do. But why is that better than doing so continuously? > What I'm not clear about is exactly what is the

Re: planner failure with ProjectSet + aggregation + parallel query

2018-03-07 Thread Robert Haas
On Mon, Mar 5, 2018 at 10:38 AM, Robert Haas wrote: > 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; >

Re: parallel append vs. simple UNION ALL

2018-03-07 Thread Robert Haas
On Wed, Mar 7, 2018 at 5:36 AM, Rajkumar Raghuwanshi wrote: > With 0001 applied on PG-head, I got reference leak warning and later a > server crash. > this crash is reproducible with enable_parallel_append=off also. > below is the test case to reproduce

Re: csv format for psql

2018-03-07 Thread Fabien COELHO
psql --csv -c 'TABLE foo' > foo.csv With a -c to introduce the command. This seems pretty specialized. If we're adding something new, how about psql --format=csv -o foo.csv -c 'TABLE foo' Or we could stick with: psql -P format=csv -o foo.csv -c 'TABLE foo' Currently "-P

Re: csv format for psql

2018-03-07 Thread Daniel Verite
David Fetter wrote: > This seems pretty specialized. If we're adding something new, how about > >psql --format=csv -o foo.csv -c 'TABLE foo' It's a bit easier to memorize than -P format=csv, but psql doesn't have any long option that does not a have a short form with a single

Re: csv format for psql

2018-03-07 Thread Pavel Stehule
2018-03-07 19:40 GMT+01:00 Fabien COELHO : > > Hello Pavel, > > psql --csv 'TABLE Stuff;' > stuff.csv >>> >> >> There is commad -c and it should be used. The --csv options should not to >> have a parameter. I don't like a idea to have more options for query >>

Re: csv format for psql

2018-03-07 Thread Fabien COELHO
Hello Pavel, psql --csv 'TABLE Stuff;' > stuff.csv There is commad -c and it should be used. The --csv options should not to have a parameter. I don't like a idea to have more options for query execution. Yes, I agree and that is indeed what I meant, sorry for the typo. The

Re: csv format for psql

2018-03-07 Thread Daniel Verite
I wrote: > a better idea would to have a new \pset fieldsep_csv PFA a v3 patch that implements that, along with regression tests this time. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite diff --git a/doc/src/sgml/ref/psql-ref.sgml

Re: csv format for psql

2018-03-07 Thread Pavel Stehule
2018-03-07 21:31 GMT+01:00 Daniel Verite : > David Fetter wrote: > > > We have some inconsistency here in that fewer table formats are > > supported, but I think asciidoc, etc., do this correctly via > > invocations like: > > > >psql -P format=asciidoc -o

Re: csv format for psql

2018-03-07 Thread David Fetter
On Wed, Mar 07, 2018 at 09:37:26PM +0100, Pavel Stehule wrote: > 2018-03-07 21:31 GMT+01:00 Daniel Verite : > > > David Fetter wrote: > > > > > We have some inconsistency here in that fewer table formats are > > > supported, but I think asciidoc, etc., do this

Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT

2018-03-07 Thread Matheus de Oliveira
Em 3 de mar de 2018 19:32, "Peter Eisentraut" < peter.eisentr...@2ndquadrant.com> escreveu: On 2/20/18 10:10, Matheus de Oliveira wrote: > Besides that, there is a another change in this patch on current ALTER > CONSTRAINT about deferrability options. Previously, if the user did > ALTER

Re: csv format for psql

2018-03-07 Thread Pavel Stehule
2018-03-07 20:25 GMT+01:00 David Fetter : > On Wed, Mar 07, 2018 at 08:04:05PM +0100, Fabien COELHO wrote: > > > > >> psql --csv -c 'TABLE foo' > foo.csv > > >> > > >>With a -c to introduce the command. > > > > > >This seems pretty specialized. If we're adding something new,

Re: csv format for psql

2018-03-07 Thread Daniel Verite
David Fetter wrote: > We have some inconsistency here in that fewer table formats are > supported, but I think asciidoc, etc., do this correctly via > invocations like: > >psql -P format=asciidoc -o foo.adoc -AtXc 'TABLE foo' -A is equivalent to -P format=unaligned, so in the above

Re: csv format for psql

2018-03-07 Thread David Fetter
On Wed, Mar 07, 2018 at 08:04:05PM +0100, Fabien COELHO wrote: > > >> psql --csv -c 'TABLE foo' > foo.csv > >> > >>With a -c to introduce the command. > > > >This seems pretty specialized. If we're adding something new, how about > > > > psql --format=csv -o foo.csv -c 'TABLE foo' > > > >Or

Re: Server won't start with fallback setting by initdb.

2018-03-07 Thread Robert Haas
On Tue, Mar 6, 2018 at 10:51 PM, Stephen Frost wrote: > Changing the defaults to go back down strikes me as an entirely wrong > approach after we've had a release with the higher defaults without > seriously compelling arguments against, and I don't agree that we've had > such

Re: pgbench's expression parsing & negative numbers

2018-03-07 Thread Fabien COELHO
Hello Andres, working on overflow correctness in pg I noticed that pgbench isn't quite there. Indeed. I assume it won't matter terribly often, but the way it parses integers makes it incorrect for, at least, the negativemost number. [...] but that unfortunately means that the sign is no

Re: Protect syscache from bloating with negative cache entries

2018-03-07 Thread Robert Haas
On Wed, Mar 7, 2018 at 6:01 AM, Alvaro Herrera wrote: > The thing that comes to mind when reading this patch is that some time > ago we made fun of other database software, "they are so complicated to > configure, they have some magical settings that few people understand

Re: FOR EACH ROW triggers on partitioned tables

2018-03-07 Thread Thomas Munro
On Thu, Mar 8, 2018 at 6:17 AM, Alvaro Herrera wrote: > Here's another version of this patch. It is virtually identical to the > previous one, except for a small doc update and whitespace changes. What is this test for? +create trigger failed after update on

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Robert Haas
On Wed, Feb 28, 2018 at 8:03 PM, Craig Ringer wrote: > A huge +1 from me for the idea. I can't even count the number of black box > "WTF did you DO?!?" servers I've looked at, where bizarre behaviour has > turned out to be down to the user doing something very silly and not

Re: Two-phase update of restart_lsn in LogicalConfirmReceivedLocation

2018-03-07 Thread Robert Haas
On Thu, Mar 1, 2018 at 2:03 AM, Craig Ringer wrote: > So I can't say it's definitely impossible. It seems astonishingly unlikely, > but that's not always good enough. Race conditions tend to happen a lot more often than one might think. If there's a theoretical opportunity

Re: faster testing with symlink installs

2018-03-07 Thread Tom Lane
Robert Haas writes: > On Wed, Feb 28, 2018 at 9:34 PM, Peter Eisentraut > wrote: >> Except ... this doesn't actually work. find_my_exec() resolves symlinks >> to find the actual program installation, and so for example the >> installed

Re: INOUT parameters in procedures

2018-03-07 Thread Peter Eisentraut
On 3/6/18 04:22, Pavel Stehule wrote: > why just OUT variables are disallowed? > > The oracle initializes these values to NULL - we can do same? The problem is function call resolution. If we see a call like CALL foo(a, b, c); the this could be foo() with zero input and three output

Re: public schema default ACL

2018-03-07 Thread Peter Eisentraut
On 3/7/18 10:05, Stephen Frost wrote: > I liken this to a well-known and well-trodden feature for auto creating > user home directories on Unix. I don't think likening schemas to home directories is really addressing the most typical use cases. Database contents are for the most part carefully

Re: unused includes in test_decoding

2018-03-07 Thread Robert Haas
On Wed, Feb 28, 2018 at 6:59 PM, Euler Taveira wrote: > This is a cosmetic patch that removes some unused includes in > test_decoding. It seems to be like this since day 1 (9.4). Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL

Re: Add default role 'pg_access_server_files'

2018-03-07 Thread Michael Paquier
On Thu, Mar 08, 2018 at 10:15:11AM +0900, Michael Paquier wrote: > Other than that the patch looks in pretty good shape to me. The regression tests of file_fdw are blowing up because of an error string patch 2 changes. -- Michael signature.asc Description: PGP signature

Re: faster testing with symlink installs

2018-03-07 Thread Robert Haas
On Wed, Feb 28, 2018 at 9:34 PM, Peter Eisentraut wrote: > Except ... this doesn't actually work. find_my_exec() resolves symlinks > to find the actual program installation, and so for example the > installed initdb will look for postgres in src/bin/initdb/. I

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-03-07 Thread Peter Geoghegan
On Wed, Mar 7, 2018 at 5:16 PM, Tomas Vondra wrote: > FWIW that's usually written to the system log. Does dmesg say something > about the kill? While it would be nice to confirm that it was indeed the OOM killer, either way the crash happened because SIGKILL was

Re: Server won't start with fallback setting by initdb.

2018-03-07 Thread Michael Paquier
On Wed, Mar 07, 2018 at 06:39:32PM -0500, Tom Lane wrote: > OK, seems like I'm on the short end of that vote. I propose to push the > GUC-crosschecking patch I posted yesterday, but not the default-value > change, and instead push Kyotaro-san's initdb change. Should we back-patch > these things

Re: Two-phase update of restart_lsn in LogicalConfirmReceivedLocation

2018-03-07 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 1, 2018 at 2:03 AM, Craig Ringer wrote: >> So I can't say it's definitely impossible. It seems astonishingly unlikely, >> but that's not always good enough. > Race conditions tend to happen a lot more often than one

archive_command

2018-03-07 Thread Rui DeSousa
Hi, I’ve been encouraged to submit this code as there has been talk in the past about a simple pgcopy command to use with the archive_command. Currently there is really no good solution in most base systems without having to introduce a dedicated third party Postgres solution. The best

Re: Server won't start with fallback setting by initdb.

2018-03-07 Thread Tom Lane
Robert Haas writes: > On Tue, Mar 6, 2018 at 10:51 PM, Stephen Frost wrote: >> Changing the defaults to go back down strikes me as an entirely wrong >> approach after we've had a release with the higher defaults without >> seriously compelling arguments

Re: public schema default ACL

2018-03-07 Thread David G. Johnston
On Wed, Mar 7, 2018 at 2:48 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 3/7/18 10:05, Stephen Frost wrote: > > I liken this to a well-known and well-trodden feature for auto creating > > user home directories on Unix. > > I don't think likening schemas to home directories

RE: Protect syscache from bloating with negative cache entries

2018-03-07 Thread Tsunakawa, Takayuki
From: Alvaro Herrera [mailto:alvhe...@alvh.no-ip.org] > The thing that comes to mind when reading this patch is that some time ago > we made fun of other database software, "they are so complicated to configure, > they have some magical settings that few people understand how to set". > Postgres

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-03-07 Thread Tomas Vondra
On 03/07/2018 03:21 PM, Robert Haas wrote: > On Wed, Mar 7, 2018 at 8:59 AM, Prabhat Sahu > > > wrote: > > 2018-03-07 19:24:44.263 IST [54400] LOG:  background worker > "parallel worker" (PID 54482) was terminated by

Re: Add default role 'pg_access_server_files'

2018-03-07 Thread Michael Paquier
On Wed, Mar 07, 2018 at 07:00:03AM -0500, Stephen Frost wrote: > * Michael Paquier (mich...@paquier.xyz) wrote: >> First, could it be possible to do a split for 1) and 2)? > > Done, because it was less work than arguing about it, but I'm not > convinced that we really need to split out patches to

Re: PATCH: Configurable file mode mask

2018-03-07 Thread Michael Paquier
On Wed, Mar 07, 2018 at 10:56:32AM -0500, David Steele wrote: > On 3/6/18 10:04 PM, Michael Paquier wrote: >> Seems like you forgot to re-add the chmod calls in initdb.c. > > Hmmm, I thought we were talking about moving the position of umask(). > > I don't think the chmod() calls are needed

Re: FOR EACH ROW triggers on partitioned tables

2018-03-07 Thread Alvaro Herrera
Alvaro Herrera wrote: > I reserve the right to revise this further, as I'm going to spend a > couple of hours looking at it this afternoon, particularly to see how > concurrent DDL behaves, but I don't see anything obviously wrong with > it. I do now. TLDR; I'm afraid this cute idea crashed and

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Andres Freund
On March 7, 2018 5:51:29 PM PST, Craig Ringer wrote: >My favourite remains an organisation that kept "fixing" an issue by >kill >-9'ing the postmaster and removing postmaster.pid to make it start up >again. Without killing all the leftover backends. Of course, the system

Re: Protect syscache from bloating with negative cache entries

2018-03-07 Thread Kyotaro HORIGUCHI
Hello, At Thu, 8 Mar 2018 00:28:04 +, "Tsunakawa, Takayuki" wrote in <0A3221C70F24FB45833433255569204D1F8FF0D9@G01JPEXMBYT05> > From: Alvaro Herrera [mailto:alvhe...@alvh.no-ip.org] > > The thing that comes to mind when reading this patch is that some time

Testbed for predtest.c ... and some arguable bugs therein

2018-03-07 Thread Tom Lane
In the thread about being able to prove constraint exclusion from an IN clause mentioning a NULL, https://www.postgresql.org/message-id/flat/3bad48fc-f257-c445-feeb-8a2b2fb62...@lab.ntt.co.jp I expressed concern about whether there were existing bugs in predtest.c given the lack of clarity of the

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-07 Thread Pavan Deolasee
On Tue, Feb 13, 2018 at 12:41 PM, amul sul wrote: > > Thanks for the confirmation, updated patch attached. > > I am actually very surprised that 0001-Invalidate-ip_blkid-v5.patch does not do anything to deal with the fact that t_ctid may no longer point to itself to mark end

Re: PATCH: psql tab completion for SELECT

2018-03-07 Thread Edmund Horner
Some updates on patch status: - "version-dependent-tab-completion-1.patch" by Tom Lane was committed in 722408bcd. - "psql-tab-completion-savepoint-v1.patch" by Edmund Horner is probably not needed. - "psql-select-tab-completion-v6.patch" (the latest) is still under development/review.

Re: Server won't start with fallback setting by initdb.

2018-03-07 Thread Robert Haas
On Wed, Mar 7, 2018 at 6:43 PM, Michael Paquier wrote: > On Wed, Mar 07, 2018 at 06:39:32PM -0500, Tom Lane wrote: >> OK, seems like I'm on the short end of that vote. I propose to push the >> GUC-crosschecking patch I posted yesterday, but not the default-value >> change,

Re: Protect syscache from bloating with negative cache entries

2018-03-07 Thread Tom Lane
Kyotaro HORIGUCHI writes: > At Thu, 8 Mar 2018 00:28:04 +, "Tsunakawa, Takayuki" > wrote in > <0A3221C70F24FB45833433255569204D1F8FF0D9@G01JPEXMBYT05> >> Yes. We are now facing the problem of too much memory use by

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-07 Thread Pavan Deolasee
On Thu, Mar 8, 2018 at 12:31 PM, Amit Kapila wrote: > On Thu, Mar 8, 2018 at 11:04 AM, Pavan Deolasee > wrote: > > > > On Tue, Feb 13, 2018 at 12:41 PM, amul sul wrote: > >> > >> Thanks for the confirmation, updated patch

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-07 Thread David Gould
On Tue, 06 Mar 2018 11:16:04 -0500 Tom Lane wrote: > so that we can decide whether this bug is bad enough to justify > back-patching a behavioral change. I remain concerned that the proposed > fix is too simplistic and will have some unforeseen side-effects, so > I'd really

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-07 Thread Pavan Deolasee
On Wed, Feb 28, 2018 at 12:38 PM, Rajkumar Raghuwanshi < rajkumar.raghuwan...@enterprisedb.com> wrote: > On Wed, Feb 14, 2018 at 5:44 PM, Amit Kapila > wrote: > >> +# Concurrency error from GetTupleForTrigger >> +# Concurrency error from ExecLockRows >> >> I think you

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Craig Ringer
On 8 March 2018 at 10:18, Andres Freund wrote: > > > On March 7, 2018 5:51:29 PM PST, Craig Ringer > wrote: > >My favourite remains an organisation that kept "fixing" an issue by > >kill > >-9'ing the postmaster and removing postmaster.pid to make it

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

2018-03-07 Thread Ashutosh Bapat
On Wed, Mar 7, 2018 at 8:55 AM, Stephen Frost wrote: > Greetings Robert, Ashutosh, Arthur, Etsuro, all, > > * Arthur Zakirov (a.zaki...@postgrespro.ru) wrote: >> On Tue, Mar 06, 2018 at 08:09:50PM +0900, Etsuro Fujita wrote: >> > Agreed. I added a comment to that function. I

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-07 Thread Jeff Janes
On Sun, Mar 4, 2018 at 3:18 PM, David Gould wrote: > On Sun, 4 Mar 2018 07:49:46 -0800 > Jeff Janes wrote: > > > On Wed, Jan 17, 2018 at 4:49 PM, David Gould wrote: > ... > > > > Maybe a well-timed crash caused n_dead_tup to get reset to

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-07 Thread Amit Kapila
On Thu, Mar 8, 2018 at 11:57 AM, Amit Khandekar wrote: > On 8 March 2018 at 09:15, Pavan Deolasee wrote: >> For example, with your patches applied: >> >> CREATE TABLE pa_target (key integer, val text) >> PARTITION BY LIST (key); >> CREATE

Re: Two-phase update of restart_lsn in LogicalConfirmReceivedLocation

2018-03-07 Thread Craig Ringer
On 8 March 2018 at 07:32, Tom Lane wrote: > Robert Haas writes: > > On Thu, Mar 1, 2018 at 2:03 AM, Craig Ringer > wrote: > >> So I can't say it's definitely impossible. It seems astonishingly > unlikely, > >> but that's not

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Tom Lane
Craig Ringer writes: > As I understand it, because we allow multiple Pg instances on a system, we > identify the small sysv shmem segment we use by the postmaster's pid. If > you remove the DirLockFile (postmaster.pid) you remove the interlock > against starting a new

Re: ALTER TABLE ADD COLUMN fast default

2018-03-07 Thread Andrew Dunstan
On Tue, Mar 6, 2018 at 8:15 PM, David Rowley wrote: > On 6 March 2018 at 22:40, David Rowley wrote: >> Okay, it looks like the patch should disable physical tlists when >> there's a missing column the same way as we do for dropped

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-07 Thread Amit Khandekar
On 8 March 2018 at 09:15, Pavan Deolasee wrote: > For example, with your patches applied: > > CREATE TABLE pa_target (key integer, val text) > PARTITION BY LIST (key); > CREATE TABLE part1 PARTITION OF pa_target FOR VALUES IN (1); > CREATE TABLE part2 PARTITION OF

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Craig Ringer
On 8 March 2018 at 12:34, Tom Lane wrote: > Craig Ringer writes: > > As I understand it, because we allow multiple Pg instances on a system, > we > > identify the small sysv shmem segment we use by the postmaster's pid. If > > you remove the

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-07 Thread Amit Kapila
On Thu, Mar 8, 2018 at 11:04 AM, Pavan Deolasee wrote: > > On Tue, Feb 13, 2018 at 12:41 PM, amul sul wrote: >> >> Thanks for the confirmation, updated patch attached. >> > > I am actually very surprised that 0001-Invalidate-ip_blkid-v5.patch does not

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-03-07 Thread Andres Freund
On March 7, 2018 5:40:18 PM PST, Peter Geoghegan wrote: >On Wed, Mar 7, 2018 at 5:16 PM, Tomas Vondra > wrote: >> FWIW that's usually written to the system log. Does dmesg say >something >> about the kill? > >While it would be nice to confirm that it

Re: Some message fixes

2018-03-07 Thread Kyotaro HORIGUCHI
At Wed, 7 Mar 2018 07:10:34 -0300, Alvaro Herrera wrote in <20180307101034.l7z7kqwqfkjg6c2p@alvherre.pgsql> > Kyotaro HORIGUCHI wrote: > > > 1. some messages are missing partitioned table/index .. > I *think* the idea here is that a partitioned table is a table, so

Re: RFC: Add 'taint' field to pg_control.

2018-03-07 Thread Craig Ringer
On 8 March 2018 at 04:58, Robert Haas wrote: > On Wed, Feb 28, 2018 at 8:03 PM, Craig Ringer > wrote: > > A huge +1 from me for the idea. I can't even count the number of black > box > > "WTF did you DO?!?" servers I've looked at, where bizarre

Re: pgstat_report_activity() and parallel CREATE INDEX (was: Parallel index creation & pg_stat_activity)

2018-03-07 Thread Peter Geoghegan
On Thu, Mar 1, 2018 at 2:47 PM, Peter Geoghegan wrote: > No. Just an oversight. Looks like _bt_parallel_build_main() should > call pgstat_report_activity(), just like ParallelQueryMain(). > > I'll come up with a patch soon. Attached patch has parallel CREATE INDEX propagate

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-07 Thread Robert Haas
On Fri, Mar 2, 2018 at 5:17 PM, Tom Lane wrote: > (1) do we really want to go over to treating ANALYZE's tuple density > result as gospel, contradicting the entire thrust of the 2011 discussion? > >> This tables reltuples is 18 times the actual row count. It will never >>

Re: PATCH: psql tab completion for SELECT

2018-03-07 Thread Edmund Horner
New patch that fixes a little bug with appending NULL addons to schema queries. psql-select-tab-completion-v6.patch Description: Binary data

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-07 Thread Amit Khandekar
On 8 March 2018 at 12:34, Amit Kapila wrote: > On Thu, Mar 8, 2018 at 11:57 AM, Amit Khandekar > wrote: >> On 8 March 2018 at 09:15, Pavan Deolasee wrote: >>> For example, with your patches applied: >>> >>> CREATE TABLE

Re: parallel append vs. simple UNION ALL

2018-03-07 Thread Rajkumar Raghuwanshi
On Thu, Mar 8, 2018 at 12:27 AM, Robert Haas wrote: > New patches attached, fixing all 3 of the issues you reported: > Thanks. new patches applied cleanly on head and fixing all reported issue. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-07 Thread Ashutosh Bapat
On Wed, Mar 7, 2018 at 8:07 PM, Jeevan Chalke wrote: Here are some more review comments esp. on try_partitionwise_grouping() function. BTW name of that function doesn't go in sync with enable_partitionwise_aggregation (which btw is in sync with enable_fooagg GUCs).

Re: csv format for psql

2018-03-07 Thread Pavel Stehule
2018-03-07 22:16 GMT+01:00 David Fetter : > On Wed, Mar 07, 2018 at 09:37:26PM +0100, Pavel Stehule wrote: > > 2018-03-07 21:31 GMT+01:00 Daniel Verite : > > > > > David Fetter wrote: > > > > > > > We have some inconsistency here in that fewer

Re: INOUT parameters in procedures

2018-03-07 Thread Pavel Stehule
Hi 2018-03-08 1:53 GMT+01:00 Peter Eisentraut : > On 3/6/18 04:22, Pavel Stehule wrote: > > why just OUT variables are disallowed? > > > > The oracle initializes these values to NULL - we can do same? > > The problem is function call resolution. If we see a

Re: FOR EACH ROW triggers on partitioned tables

2018-03-07 Thread Alvaro Herrera
Here's another version of this patch. It is virtually identical to the previous one, except for a small doc update and whitespace changes. To recap: when a row-level trigger is created on a partitioned table, it is marked tginherits; partitions all have their pg_class row modified with

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-03-07 Thread Alvaro Herrera
I suggest to create a new function GinPredicateLockPage() that checks whether fast update is enabled for the index. The current arrangement looks too repetitive and it seems easy to make a mistake. Stylistically, please keep #include lines ordered alphabetically, and cut long lines to below 80

Re: GSoC 2017: weekly progress reports (week 6)

2018-03-07 Thread Andres Freund
Hi, On 2018-03-07 11:58:51 -0300, Alvaro Herrera wrote: > > This appears to be a duplicate of > > https://commitfest.postgresql.org/17/1466/ - as the other one is older, I'm > > closing this one. > > This comment makes no sense from the POV of the mail archives. I had to > look at the

Re: Protect syscache from bloating with negative cache entries

2018-03-07 Thread Andres Freund
Hi, On 2018-03-07 08:01:38 -0300, Alvaro Herrera wrote: > I wonder if this is just because we refuse to acknowledge the notion of > a connection pooler. If we did, and the pooler told us "here, this > session is being given back to us by the application, we'll keep it > around until the next app

Re: Protect syscache from bloating with negative cache entries

2018-03-07 Thread Alvaro Herrera
Hello, Andres Freund wrote: > On 2018-03-07 08:01:38 -0300, Alvaro Herrera wrote: > > I wonder if this is just because we refuse to acknowledge the notion of > > a connection pooler. If we did, and the pooler told us "here, this > > session is being given back to us by the application, we'll

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2018-03-07 Thread Alvaro Herrera
Andreas Karlsson wrote: > On 02/06/2018 11:15 AM, Mark Rofail wrote: > > A new patch including all the fixes is ready. > > > > Can you give the docs another look. I re-wrapped, re-indented  and > > changed all `Foreign Key Arrays` to `Array Element Foreign Keys` for > > consistency. > > Looks

parse callback allows inserting cursorpos when hide_stmt.

2018-03-07 Thread Kyotaro HORIGUCHI
Hello. Parse error callback sets cursor position even if hide_stmt is true. So I see a strange message with meaningless 'at character %d' notation. 2018-03-07 11:11:43.489 JST [10304] DEBUG: removed 223/2049, age(-2s:121, -3s:121, *-30s:1584, -60s:223, -90s:0) naccessed(0:223, 1:0, 2:0) at

Re: csv format for psql

2018-03-07 Thread Pavel Stehule
2018-03-07 10:45 GMT+01:00 Fabien COELHO : > > Hello Daniel, > > Attached is a v2 fixing the bugs you mentioned, and adding ---csv/-C >> as discussed upthread. I'll add some regression tests shortly. >> > > Basically I'm waiting for the version with regression tests before >

RE: Temporary tables prevent autovacuum, leading to XID wraparound

2018-03-07 Thread Tsunakawa, Takayuki
From: Tom Lane [mailto:t...@sss.pgh.pa.us] > I just read through this thread for the first time; sorry for not paying > attention sooner. Don't mind, please. It's very happy that you gave attention now. > I'm uncomfortable with all the discussion of changing the autovacuum > launcher's

Re: parallel append vs. simple UNION ALL

2018-03-07 Thread Rajkumar Raghuwanshi
Hi, With 0001 applied on PG-head, I got reference leak warning and later a server crash. this crash is reproducible with enable_parallel_append=off also. below is the test case to reproduce this. SET enable_parallel_append=off; SET parallel_setup_cost=0; SET parallel_tuple_cost=0; SET

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-07 Thread Pavel Stehule
2018-03-07 14:10 GMT+01:00 Pavel Stehule : > > > 2018-03-07 13:58 GMT+01:00 Arthur Zakirov : > >> On Wed, Mar 07, 2018 at 01:47:25PM +0100, Pavel Stehule wrote: >> > > Do you mean that a shared dictionary should be reloaded if its .affix >> > >

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-03-07 Thread Prabhat Sahu
Hi all, While testing this feature I found a crash on PG head with parallel create index using pgbanch tables. -- GUCs under postgres.conf max_parallel_maintenance_workers = 16 max_parallel_workers = 16 max_parallel_workers_per_gather = 8 maintenance_work_mem = 8GB max_wal_size = 4GB ./pgbench

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-03-07 Thread Prabhat Sahu
On Wed, Mar 7, 2018 at 7:16 PM, Robert Haas wrote: > On Wed, Mar 7, 2018 at 8:13 AM, Prabhat Sahu < > prabhat.s...@enterprisedb.com> wrote: > >> Hi all, >> >> While testing this feature I found a crash on PG head with parallel >> create index using pgbanch tables. >> >> --

Re: [HACKERS] Subscription code improvements

2018-03-07 Thread Alvaro Herrera
0002 looks like a good improvement to me. The existing routine is messy, and apparently it's so just to save one LockSharedObject plus cache lookup; IMO it's not worth it. Patched code looks simpler. If there are cases where having the combined behavior is useful, it's not clear what they are.

Re: public schema default ACL

2018-03-07 Thread Alvaro Herrera
Stephen Frost wrote: > * Noah Misch (n...@leadboat.com) wrote: > > I like the idea of getting more SQL-compatible, if this presents a distinct > > opportunity to do so. I do think it would be too weird to create the schema > > in one database only. Creating it on demand might work. What would

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-07 Thread Arthur Zakirov
On Wed, Mar 07, 2018 at 02:12:32PM +0100, Pavel Stehule wrote: > 2018-03-07 14:10 GMT+01:00 Pavel Stehule : > > 2018-03-07 13:58 GMT+01:00 Arthur Zakirov : > >> Oh understood. Tomas suggested those commands too earlier. I'll > >> implement them.

Re: General purpose hashing func in pgbench

2018-03-07 Thread Ildar Musin
Hello Teodor, 1) Seems, it's good idea to add credits to Austin Appleby to comments. Done. Also rebased to the latest master. I think that both points refer to the fact that original algorithm accepts a byte string as an input, slices it up by 8 bytes and form unsigned int values from it.

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-03-07 Thread Robert Haas
On Wed, Mar 7, 2018 at 8:13 AM, Prabhat Sahu wrote: > Hi all, > > While testing this feature I found a crash on PG head with parallel create > index using pgbanch tables. > > -- GUCs under postgres.conf > max_parallel_maintenance_workers = 16 > max_parallel_workers

Re: Typo in objectaccess.h prototype

2018-03-07 Thread Peter Eisentraut
On 3/7/18 07:23, Daniel Gustafsson wrote: > s/ereport_on_volation/ereport_on_violation/ as per the attached patch. fixed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] Subscription code improvements

2018-03-07 Thread Alvaro Herrera
0001: there are a bunch of other messages of the same ilk in the file. I don't like how the current messages are worded; maybe Peter or Petr had some reason why they're like that, but I would have split out the reason for not starting or stopping into errdetail. Something like errmsg("logical

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-03-07 Thread Robert Haas
On Wed, Mar 7, 2018 at 8:59 AM, Prabhat Sahu wrote: > > 2018-03-07 19:24:44.263 IST [54400] LOG: background worker "parallel > worker" (PID 54482) was terminated by signal 9: Killed > That looks like the background worker got killed by the OOM killer. How much

Re: public schema default ACL

2018-03-07 Thread Peter Eisentraut
On 3/6/18 15:20, Robert Haas wrote: > On Sat, Mar 3, 2018 at 4:56 AM, Noah Misch wrote: >> I propose, for v11, switching to "GRANT USAGE ON SCHEMA >> public TO PUBLIC" (omit CREATE). Concerns? An alternative is to change the >> default search_path to "$user"; that would be

Re: jsonpath

2018-03-07 Thread Nikita Glukhov
On 02.03.2018 00:57, Alexander Korotkov wrote: On Fri, Mar 2, 2018 at 12:40 AM, Nikita Glukhov > wrote: On 28.02.2018 06:55, Robert Haas wrote: On Mon, Feb 26, 2018 at 10:34 AM, Nikita Glukhov

Re: [HACKERS] Subscription code improvements

2018-03-07 Thread David Steele
On 3/7/18 7:41 AM, Masahiko Sawada wrote: > On Tue, Mar 6, 2018 at 11:17 PM, David Steele wrote: >> Hi Masahiko, >> >> On 1/30/18 5:00 AM, Masahiko Sawada wrote: >>> On Fri, Jan 26, 2018 at 11:41 AM, Peter Eisentraut >>> wrote: On

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-07 Thread Jeevan Chalke
On Tue, Mar 6, 2018 at 4:59 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > Hi Jeevan, > I am back reviewing this. Here are some comments. > > @@ -1415,7 +1413,8 @@ add_paths_to_append_rel(PlannerInfo *root, > RelOptInfo *rel, > * the unparameterized Append path we are

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-07 Thread Jeevan Chalke
On Wed, Mar 7, 2018 at 1:45 AM, Robert Haas wrote: > On Tue, Mar 6, 2018 at 5:31 AM, Jeevan Chalke > wrote: > > This is in-lined with enable_hashagg GUC. Do you think > > enable_partitionwise_aggregate seems better? But it will be not >

Re: [HACKERS] Subscription code improvements

2018-03-07 Thread Alvaro Herrera
David Steele wrote: > I'm marking this submission Returned with Feedback. Not yet please. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] Subscription code improvements

2018-03-07 Thread David Steele
On 3/7/18 9:37 AM, Alvaro Herrera wrote: > David Steele wrote: > >> I'm marking this submission Returned with Feedback. > > Not yet please. Back to Waiting on Author state. Regards, -- -David da...@pgmasters.net

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-07 Thread Ashutosh Bapat
On Wed, Mar 7, 2018 at 10:04 AM, Ashutosh Bapat wrote: > On Tue, Mar 6, 2018 at 7:52 PM, Jeevan Chalke > wrote: > >> >> >> Changes look good to me and refactoring will be useful for partitionwise >> patches. >> >> However, will it

Re: public schema default ACL

2018-03-07 Thread Stephen Frost
Greetings, * Noah Misch (n...@leadboat.com) wrote: > On Tue, Mar 06, 2018 at 09:28:21PM -0500, Stephen Frost wrote: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > > I wonder whether it'd be sensible for CREATE USER --- or at least the > > > createuser script --- to automatically make a matching

  1   2   >