Re: [HACKERS] Hooks to track changed pages for backup purposes

2017-09-12 Thread Andrey Borodin
Hi Tomas! Thank you for looking into that patch. > 8 сент. 2017 г., в 1:53, Tomas Vondra > написал(а): > > A few more comments: > > * The patch defines wal_switch_hook, but it's never called. That call was missing, that's a bug, thanks for spotting that out. > *

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-12 Thread Amit Langote
On 2017/09/13 13:05, Tom Lane wrote: > Amit Langote writes: >> On 2017/09/12 23:27, Amit Kapila wrote: >>> I think one point which might be missed is that the patch needs to >>> modify pd_lower for all usages of metapage, not only when it is first >>> time

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-09-12 Thread Vaishnavi Prabakaran
On Wed, Sep 13, 2017 at 3:33 PM, Craig Ringer wrote: > > I really do not like calling it "commit" as that conflates with a database > commit. > > A batch can embed multiple BEGINs and COMMITs. It's entirely possible for > an earlier part of the batch to succeed and commit,

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-09-12 Thread Craig Ringer
On 13 September 2017 at 13:06, Vaishnavi Prabakaran < vaishnaviprabaka...@gmail.com> wrote: > > > On Wed, Aug 23, 2017 at 7:40 PM, Andres Freund wrote: > >> >> >> >> > Am failing to see the benefit in allowing user to set >> > PQBatchAutoFlush(true|false) property? Is it

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-09-12 Thread Vaishnavi Prabakaran
On Wed, Aug 23, 2017 at 7:40 PM, Andres Freund wrote: > > > > > Am failing to see the benefit in allowing user to set > > PQBatchAutoFlush(true|false) property? Is it really needed? > > I'm inclined not to introduce that for now. If somebody comes up with a > convincing

Re: [HACKERS] pg_rewind proposed scope and interface changes

2017-09-12 Thread Michael Paquier
On Tue, Sep 12, 2017 at 11:52 PM, Chris Travers wrote: > Additionally the wal, xact, timestamp and logical directories must be > processed in some way. To what does the term "logical directories" refer to? > * if --wal=sync the directories are processed the way they

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-09-12 Thread Michael Paquier
On Wed, Sep 13, 2017 at 1:13 PM, Kyotaro HORIGUCHI wrote: > This patch creates a new memory context "Vacuum" under > PortalContext in vacuum.c, but AFAICS the current context there > is PortalHeapMemory, which has the same expected lifetime with > the new context

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-09-12 Thread Kyotaro HORIGUCHI
Hello, I began to look on this. (But it seems almost ready for committer..) At Wed, 13 Sep 2017 11:47:11 +0900, Michael Paquier wrote in > On Wed, Sep 13, 2017 at 12:31 AM, Bossart, Nathan

Re: [HACKERS] [PATCH] Call RelationDropStorage() for broader range of object drops.

2017-09-12 Thread Michael Paquier
On Wed, Sep 13, 2017 at 2:40 AM, Hadi Moshayedi wrote: > Motivation for this patch is that some FDWs (notably, cstore_fdw) try > utilizing PostgreSQL internal storage. PostgreSQL assigns relfilenode's to > foreign tables, but doesn't clean up storage for foreign tables when >

Re: [HACKERS] Race between SELECT and ALTER TABLE NO INHERIT

2017-09-12 Thread Amit Langote
On 2017/09/13 12:05, Simon Riggs wrote: > On 26 June 2017 at 10:16, Amit Langote wrote: > >> BTW, in the partitioned table case, the parent is always locked first >> using an AccessExclusiveLock. There are other considerations in that case >> such as needing to

Re: [HACKERS] why not parallel seq scan for slow functions

2017-09-12 Thread Amit Kapila
On Tue, Sep 12, 2017 at 5:47 PM, Amit Khandekar wrote: > On 5 September 2017 at 14:04, Amit Kapila wrote: > > I started with a quick review ... a couple of comments below : > > - * If this is a baserel, consider gathering any partial paths we may

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-12 Thread Masahiko Sawada
On Wed, Sep 13, 2017 at 12:48 AM, Arseny Sher wrote: > Masahiko Sawada writes: > >> FWIW, perhaps we can change the replication origin management so that >> DROP SUBSCRIPTION doesn't drop the replication origin and the apply >> worker itself removes

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-12 Thread Tom Lane
Amit Langote writes: > On 2017/09/12 23:27, Amit Kapila wrote: >> I think one point which might be missed is that the patch needs to >> modify pd_lower for all usages of metapage, not only when it is first >> time initialized. > Maybe I'm missing something, but

Re: [HACKERS] plpgsql - additional extra checks

2017-09-12 Thread Pavel Stehule
2017-09-13 1:42 GMT+02:00 Daniel Gustafsson : > > On 08 Apr 2017, at 15:46, David Steele wrote: > > > >> On 1/13/17 6:55 AM, Marko Tiikkaja wrote: > >>> On Fri, Jan 13, 2017 at 2:46 AM, Jim Nasby >>>

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-12 Thread Pavel Stehule
2017-09-09 1:30 GMT+02:00 Alvaro Herrera : > Tomas Vondra wrote: > > > > Finally, as vertical scrolling is mandatory, I would be fine with > > > skipping lines with entries for readability, but it is just a matter of > > > taste and I expect there should be half a dozen

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Bruce Momjian
On Tue, Sep 12, 2017 at 07:54:15PM -0400, Stephen Frost wrote: > Andreas, > > * Andreas Joseph Krogh (andr...@visena.com) wrote: > > I have to ask; Why not run pg_upgrade on standby, after verifying that it's > > in > > sync with primary and promoting it to primary if necessary and then making

Re: [HACKERS] WAL logging problem in 9.4.3?

2017-09-12 Thread Thomas Munro
On Wed, Sep 13, 2017 at 1:04 PM, Kyotaro HORIGUCHI wrote: > The CF status of this patch turned into "Waiting on Author" by > automated CI checking. However, I still don't get any error even > on the current master (69835bc) after make distclean. Also I > don't see

Re: [HACKERS] Race between SELECT and ALTER TABLE NO INHERIT

2017-09-12 Thread Simon Riggs
On 26 June 2017 at 10:16, Amit Langote wrote: > BTW, in the partitioned table case, the parent is always locked first > using an AccessExclusiveLock. There are other considerations in that case > such as needing to recreate the partition descriptor upon

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-12 Thread Amit Langote
Thanks for the review. On 2017/09/12 23:27, Amit Kapila wrote: > On Tue, Sep 12, 2017 at 3:51 PM, Amit Langote wrote: >> I updated the patches for GIN, BRIN, and SP-GiST to include the following >> changes: >> >> 1. Pass REGBUF_STNADARD flag when registering the metapage buffer >> > > I have

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-09-12 Thread Michael Paquier
On Wed, Sep 13, 2017 at 12:31 AM, Bossart, Nathan wrote: > Sorry for the spam. I am re-sending these patches with modified names so that > the apply order is obvious to the new automated testing framework (and to > everybody else). - * relid, if not InvalidOid, indicate the

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-09-12 Thread Kyotaro HORIGUCHI
At Thu, 07 Sep 2017 21:59:56 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170907.215956.110216588.horiguchi.kyot...@lab.ntt.co.jp> > Hello, > > At Thu, 07 Sep 2017 14:12:12 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI >

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-09-12 Thread Ashutosh Bapat
Thanks Amit for taking care of this. On Wed, Sep 13, 2017 at 6:31 AM, Amit Langote wrote: > On 2017/09/06 19:14, Amit Langote wrote: >> On 2017/09/06 18:46, Rushabh Lathia wrote: >>> Okay, I have marked this as ready for committer. >> >> Thanks Ashutosh and Rushabh

Re: [HACKERS] Some subscriptions fail (while some succeed) with pglogical

2017-09-12 Thread xiaolongc
Never mind. The problem was actually a minor one -- I need to truncate the table before re-subscribe (otherwise table copy would fail when syncing data with master). -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Race between SELECT and ALTER TABLE NO INHERIT

2017-09-12 Thread Kyotaro HORIGUCHI
At Mon, 28 Aug 2017 18:28:07 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170828.182807.98097766.horiguchi.kyot...@lab.ntt.co.jp> > I'll add this to CF2017-09. This patch got deadly atack from the commit 30833ba. I changed the signature of

Re: [HACKERS] no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...

2017-09-12 Thread Amit Langote
On 2017/09/12 20:17, Ashutosh Bapat wrote: > On Tue, Sep 12, 2017 at 2:27 PM, Amit Langote > wrote: >> Thanks Ashutosh for taking a look at this. >> >> On 2017/09/05 21:16, Ashutosh Bapat wrote: >>> The patch needs a rebase. >> >> Attached rebased patch. > > Thanks

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-12 Thread Kyotaro HORIGUCHI
Hello, aside from the discussion on the policy of usage of automation CI, it seems having trouble applying patches. https://travis-ci.org/postgresql-cfbot/postgresql/builds/27450 >1363 heapam.c:2502:18: error: ‘HEAP_INSERT_SKIP_WAL’ undeclared (first use in >this function) >1364 if

Re: [HACKERS] generated columns

2017-09-12 Thread Simon Riggs
On 31 August 2017 at 05:16, Peter Eisentraut wrote: > Here is another attempt to implement generated columns. This is a > well-known SQL-standard feature, also available for instance in DB2, > MySQL, Oracle. A quick example: > > CREATE TABLE t1 ( > ..., >

Re: [HACKERS] Supporting huge pages on Windows

2017-09-12 Thread Tsunakawa, Takayuki
Hi Thomas, Magnus From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Thomas Munro > Since it only conflicts with c7b8998e because of pgindent whitespace > movement, I applied it with "patch -p1 --ignore-whitespace" and created > a new patch. See

Re: [HACKERS] Log LDAP "diagnostic messages"?

2017-09-12 Thread Thomas Munro
On Tue, Sep 12, 2017 at 11:23 PM, Ashutosh Bapat wrote: > On Wed, Aug 16, 2017 at 11:13 AM, Ashutosh Bapat > wrote: >> On Wed, Aug 16, 2017 at 8:44 AM, Alvaro Herrera >> wrote: >>> Christoph Berg wrote:

Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.

2017-09-12 Thread Thomas Munro
On Wed, Sep 13, 2017 at 3:48 AM, Elvis Pranskevichus wrote: > I incorporated those bits into your patch and rebased in onto master. > Please see attached. > > FWIW, I think that mixing the standby status and the default > transaction writability is suboptimal. They are

Re: [HACKERS] WAL logging problem in 9.4.3?

2017-09-12 Thread Kyotaro HORIGUCHI
Hello, (does this seem to be a top post?) The CF status of this patch turned into "Waiting on Author" by automated CI checking. However, I still don't get any error even on the current master (69835bc) after make distclean. Also I don't see any difference between the "problematic" patch and my

Re: [HACKERS] pg_stat_wal_write statistics view

2017-09-12 Thread Haribabu Kommi
On Tue, Sep 12, 2017 at 3:14 PM, Kuntal Ghosh wrote: > On Tue, Sep 12, 2017 at 9:06 AM, Haribabu Kommi > wrote: > > > > > > On Tue, Sep 12, 2017 at 2:04 AM, Kuntal Ghosh < > kuntalghosh.2...@gmail.com> > > wrote: > > > Thanks for the patch.

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-09-12 Thread Amit Langote
On 2017/09/06 19:14, Amit Langote wrote: > On 2017/09/06 18:46, Rushabh Lathia wrote: >> Okay, I have marked this as ready for committer. > > Thanks Ashutosh and Rushabh for rebasing and improving the patch. Looks > good to me too. Patch needed to be rebased after the default partitions patch

Re: [HACKERS] Arrays of domains

2017-09-12 Thread Tom Lane
I wrote: > Attached is a patch series that allows us to create arrays of domain > types. Here's a rebased-up-to-HEAD version of this patch set. The only actual change is removal of a no-longer-needed hunk in pl_exec.c. regards, tom lane diff --git

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-12 Thread Kyotaro HORIGUCHI
At Wed, 13 Sep 2017 08:13:08 +0900, Michael Paquier wrote in

Re: [HACKERS] More flexible LDAP auth search filters?

2017-09-12 Thread Michael Paquier
On Wed, Sep 13, 2017 at 8:04 AM, Thomas Munro wrote: > I wonder if there is a reasonable way to indicate or determine whether > you have slapd installed so that check-world could run this test... Module::Install's requires_external_bin is one:

[HACKERS] Some subscriptions fail (while some succeed) with pglogical

2017-09-12 Thread xiaolongc
Hey guys, I'm setting up logical replication with pglogical, and found out that some of my subscriptions are working well but others are not. They are set up in the same way tho, and both master and replica are running pg9.5. Below is subscription status on the replica: \# select

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Andreas Joseph Krogh
På onsdag 13. september 2017 kl. 01:54:15, skrev Stephen Frost < sfr...@snowman.net >: Andreas, * Andreas Joseph Krogh (andr...@visena.com) wrote: > I have to ask; Why not run pg_upgrade on standby, after verifying that it's in > sync with primary and promoting it

Re: [HACKERS] Small patch for pg_basebackup argument parsing

2017-09-12 Thread Daniel Gustafsson
> On 05 Jul 2017, at 08:32, Michael Paquier wrote: > > On Wed, Jul 5, 2017 at 2:57 PM, Ryan Murphy wrote: >> I tried to apply your patch to test it (though reading Robert's last comment >> it seems we wish to have it adjusted before

Re: [HACKERS] Replication status in logical replication

2017-09-12 Thread Daniel Gustafsson
> On 30 May 2017, at 19:55, Peter Eisentraut > wrote: > > On 5/29/17 22:56, Noah Misch wrote: >> On Fri, May 19, 2017 at 11:33:48AM +0900, Masahiko Sawada wrote: >>> On Wed, Apr 12, 2017 at 5:31 AM, Simon Riggs wrote: Looks like a

Re: [HACKERS] Faster methods for getting SPI results

2017-09-12 Thread Daniel Gustafsson
> On 12 Sep 2017, at 23:00, Tom Lane wrote: > > Chapman Flack writes: >> On 09/12/2017 03:41 PM, Tom Lane wrote: >>> So the conclusion at the end of the last commitfest was that this patch >>> should be marked Returned With Feedback, and no new work

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Stephen Frost
Andreas, * Andreas Joseph Krogh (andr...@visena.com) wrote: > I have to ask; Why not run pg_upgrade on standby, after verifying that it's > in > sync with primary and promoting it to primary if necessary and then making it > standby again after pg_upgrade is finished? I don't think that we

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-12 Thread Tom Lane
Thomas Munro writes: > On Wed, Sep 13, 2017 at 2:34 AM, Alvaro Herrera > wrote: >> Tom Lane wrote: >>> Can you clarify what went wrong for you on that one? I went to rebase it, >>> but I end up with the identical patch except for a few

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Andreas Joseph Krogh
På onsdag 13. september 2017 kl. 01:38:40, skrev Stephen Frost < sfr...@snowman.net >: Bruce, all, [snip] Further, really, I think we should provide a utility to do all of the above instead of using rsync- and that utility should do some additional things, such as:

Re: [HACKERS] plpgsql - additional extra checks

2017-09-12 Thread Daniel Gustafsson
> On 08 Apr 2017, at 15:46, David Steele wrote: > >> On 1/13/17 6:55 AM, Marko Tiikkaja wrote: >>> On Fri, Jan 13, 2017 at 2:46 AM, Jim Nasby >> > wrote: >>> >>>On 1/11/17 5:54 AM, Pavel Stehule wrote: >>> >>>

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-12 Thread Tom Lane
Fabien COELHO writes: > See v9 attached. I've pushed this with some editorialization. > I put back SetResultVariables function which is called twice, for SQL > queries and the new descriptions. It worked out of the box with DECLARE > which is just another SQL statement,

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Stephen Frost
Bruce, all, * Bruce Momjian (br...@momjian.us) wrote: > On Wed, Sep 13, 2017 at 12:40:32AM +0200, Andreas Joseph Krogh wrote: > > På tirsdag 12. september 2017 kl. 23:52:02, skrev Bruce Momjian < > > br...@momjian.us>: > > > > On Tue, Sep 12, 2017 at 08:59:05PM +0200, Andreas Joseph Krogh

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Andreas Joseph Krogh
På onsdag 13. september 2017 kl. 01:00:20, skrev Bruce Momjian >: On Wed, Sep 13, 2017 at 12:40:32AM +0200, Andreas Joseph Krogh wrote: > På tirsdag 12. september 2017 kl. 23:52:02, skrev Bruce Momjian < > br...@momjian.us>: > >     On Tue, Sep 12,

Re: [HACKERS] PATCH: psql show index with type info

2017-09-12 Thread Daniel Gustafsson
> On 18 Apr 2017, at 05:13, Amos Bird wrote: > > Ah, thanks for the suggestions. I'll revise this patch soon :) Have you had a chance to revise the patch to address the review comments such that the patch can move forward during this Commitfest? cheers ./daniel -- Sent

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-09-12 Thread Daniel Gustafsson
> On 08 May 2017, at 12:02, Fabien COELHO > wrote: > > Hello Jan, > > Please give a number to submitted patches. I think that this was v3. > > The patch does NOT fix various issues I pointed out in my previous review: > > - tabs introduced in

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-12 Thread Michael Paquier
On Wed, Sep 13, 2017 at 7:39 AM, Daniel Gustafsson wrote: >> On 12 Sep 2017, at 23:54, Tomas Vondra wrote: >> With all due respect, it's hard not to see this as a disruption of the >> current CF. I agree automating the patch processing is a

Re: [HACKERS] [WIP] RE: DECLARE STATEMENT setting up a connection in ECPG

2017-09-12 Thread Daniel Gustafsson
> On 30 Mar 2017, at 09:11, Ideriha, Takeshi > wrote: > > Thank you for prompt check! > > >As per above test steps, it doesn't produce the results and doesn't > >generate the error also. I feel this needs to be fixed. > > >As we are at the end of commitfest,

Re: [HACKERS] More flexible LDAP auth search filters?

2017-09-12 Thread Thomas Munro
On Wed, Sep 13, 2017 at 1:55 AM, Peter Eisentraut wrote: > On 9/11/17 23:58, Thomas Munro wrote: >> Sounds good. Here it is with $username. It's nice not to have to >> escape any characters in URLs. I suppose more keywords could be added >> in follow-up

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-09-12 Thread Michael Paquier
On Tue, Sep 12, 2017 at 11:38 PM, Peter Eisentraut wrote: > It seems we should start by sorting out the mechanism by which the > client can control what authentication mechanisms it accepts. In your > patch set you introduce a connection parameter saslname. I

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Bruce Momjian
On Wed, Sep 13, 2017 at 12:40:32AM +0200, Andreas Joseph Krogh wrote: > På tirsdag 12. september 2017 kl. 23:52:02, skrev Bruce Momjian < > br...@momjian.us>: > > On Tue, Sep 12, 2017 at 08:59:05PM +0200, Andreas Joseph Krogh wrote: > >     Improvements? > > > > Thanks, that

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Andreas Joseph Krogh
På tirsdag 12. september 2017 kl. 23:52:02, skrev Bruce Momjian < br...@momjian.us >: On Tue, Sep 12, 2017 at 08:59:05PM +0200, Andreas Joseph Krogh wrote: >     Improvements? > > Thanks, that certainly improves things. > But; I still find the rsync-command in f)

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-12 Thread Daniel Gustafsson
> On 12 Sep 2017, at 23:54, Tomas Vondra wrote: > > On 09/12/2017 04:14 PM, Aleksander Alekseev wrote: >> Hello, hackers! >> >> Thanks to the work of Thomas Munro now we have a CI for the patches on >> the commitfest [1]. Naturally there is still room for

Re: [HACKERS] Renaming PG_GETARG functions (was Re: PG_GETARG_GISTENTRY?)

2017-09-12 Thread Mark Dilger
> On Sep 12, 2017, at 1:07 PM, Tom Lane wrote: > > [ changing subject line to possibly draw more attention ] > > Mark Dilger writes: >>> On Apr 5, 2017, at 9:23 AM, Tom Lane wrote: >>> In short, if you are supposed to write >>>

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-12 Thread Thomas Munro
On Tue, Sep 12, 2017 at 12:45 AM, Tomas Vondra wrote: > That won't work until (2) is reliable enough. There are patches (for > example my "multivariate MCV lists and histograms") which fails to apply > only because the tool picks the wrong patch. Possibly because it

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-12 Thread Thomas Munro
On Wed, Sep 13, 2017 at 2:34 AM, Alvaro Herrera wrote: > Tom Lane wrote: >> Aleksander Alekseev writes: >> > I've ended up with this script [1]. It just generates a list of patches >> > that are in "Needs Review" status but don't apply or don't

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-12 Thread Tomas Vondra
On 09/12/2017 04:14 PM, Aleksander Alekseev wrote: > Hello, hackers! > > Thanks to the work of Thomas Munro now we have a CI for the patches on > the commitfest [1]. Naturally there is still room for improvement, but > in any case it's much, much better than nothing. > > After a short discussion

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Bruce Momjian
On Tue, Sep 12, 2017 at 08:59:05PM +0200, Andreas Joseph Krogh wrote: > Improvements? > > Thanks, that certainly improves things. > But; I still find the rsync-command in f) confusing; > 1. Why --size-only? From rsync manual: "skip files that match in size", is > this > safe?? > 2. Why is

Re: [HACKERS] Faster methods for getting SPI results

2017-09-12 Thread Chapman Flack
On 09/12/17 17:00, Tom Lane wrote: > I did not see any reason given in the thread why we should need that. > If you want to accumulate tuples ten at a time before you do something > with them, you can do that now, by calling ExecutorRun with count=10. Ah, that sounds easy enough. I'll withdraw

Re: [HACKERS] generated columns

2017-09-12 Thread Serge Rielau
> On Sep 12, 2017, at 12:35 PM, Jaime Casanova > wrote: > > also is interesting that in triggers, both before and after, the > column has a null. that seems reasonable in a before trigger but not > in an after trigger Why is a NULL reasonable for before

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2017-09-12 Thread Tomas Vondra
Attached is an updated version of the patch, dealing with fallout of 821fb8cdbf700a8aadbe12d5b46ca4e61be5a8a8 which touched the SGML documentation for CREATE STATISTICS. regards On 09/07/2017 10:07 PM, Tomas Vondra wrote: > Hi, > > Attached is an updated version of the patch, fixing the issues

Re: [HACKERS] Faster methods for getting SPI results

2017-09-12 Thread Tom Lane
Chapman Flack writes: > On 09/12/2017 03:41 PM, Tom Lane wrote: >> So the conclusion at the end of the last commitfest was that this patch >> should be marked Returned With Feedback, and no new work appears to have >> been done on it since then. Why is it in this fest at

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-12 Thread Thomas Munro
On Wed, Sep 13, 2017 at 2:55 AM, Andreas Karlsson wrote: > On 09/12/2017 04:14 PM, Aleksander Alekseev wrote: >> >> Title: Foreign Key Arrays >> Author: Mark Rofail >> URL:https://commitfest.postgresql.org/14/1252/ > > > I am currently reviewing this one

Re: [HACKERS] Create replication slot in pg_basebackup if requested and not yet present

2017-09-12 Thread Michael Banck
Hi, Am Dienstag, den 12.09.2017, 08:53 -0400 schrieb Peter Eisentraut: > On 9/11/17 03:11, Michael Banck wrote: > > > Is there a race condition here? The slot is created after the checkpoint > > > is completed. But you have to start streaming from the LSN where the > > > checkpoint started, so

Re: [HACKERS] Faster methods for getting SPI results

2017-09-12 Thread Chapman Flack
On 09/12/2017 03:41 PM, Tom Lane wrote: > So the conclusion at the end of the last commitfest was that this patch > should be marked Returned With Feedback, and no new work appears to have > been done on it since then. Why is it in this fest at all? There > certainly doesn't seem to be any

[HACKERS] Renaming PG_GETARG functions (was Re: PG_GETARG_GISTENTRY?)

2017-09-12 Thread Tom Lane
[ changing subject line to possibly draw more attention ] Mark Dilger writes: >> On Apr 5, 2017, at 9:23 AM, Tom Lane wrote: >> In short, if you are supposed to write >> FOO *val = PG_GETARG_FOO(n); >> then the macro designer blew it, because

Re: [HACKERS] domain type smashing is expensive

2017-09-12 Thread Robert Haas
On Tue, Sep 12, 2017 at 3:16 PM, Tom Lane wrote: > I'd say that what you're proposing is the exact opposite of attacking > the problem at the root. I agree. But if we're going to install a cache here, on a cycle-for-cycle basis, it's going to be hard to beat "caching" the

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-12 Thread Tom Lane
Peter Eisentraut writes: > I think we are whacking things around a in circle now. First we moved > the worker killing to the end of the transaction to make subscription > DDL transaction-capable. Then we changed replication origin dropping to > wait until the

Re: [HACKERS] Faster methods for getting SPI results

2017-09-12 Thread Tom Lane
So the conclusion at the end of the last commitfest was that this patch should be marked Returned With Feedback, and no new work appears to have been done on it since then. Why is it in this fest at all? There certainly doesn't seem to be any reason to review it again.

Re: [HACKERS] Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-12 Thread Peter Eisentraut
On 9/11/17 14:26, Peter Eisentraut wrote: > On 9/10/17 12:14, Noah Misch wrote: >> This PostgreSQL 10 open item is past due for your status update. Kindly send >> a status update within 24 hours, and include a date for your subsequent >> status >> update. Refer to the policy on open item

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-12 Thread Peter Eisentraut
On 9/4/17 10:41, Arseny Sher wrote: > node 2: > create table t (i int); > create subscription s CONNECTION 'port=5432' publication p; > begin; > alter subscription s disable ; > alter subscription s set (slot_name = none); > drop subscription s; > end; > > It hangs in replorigin_drop because we

Re: [HACKERS] generated columns

2017-09-12 Thread Jaime Casanova
On 10 September 2017 at 00:08, Jaime Casanova wrote: > > During my own tests, though, i found some problems: > a few more tests: create table t1 ( id serial, height_cm int, height_in int generated always as (height_cm * 10) ) ; """ postgres=# alter table t1

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-12 Thread Fabien COELHO
Well, if we provided a different SQLSTATE for each qualitatively different type of libpq error, that might well be useful enough to justify some risk of application breakage. But replacing a constant string that we've had for ~15 years with a different constraint string isn't doing anything

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-12 Thread Andrew Dunstan
On 09/12/2017 11:30 AM, Tom Lane wrote: > Alvaro Herrera writes: >> Tom Lane wrote: >>> Aleksander Alekseev writes: === Apply Failed: 29 === https://commitfest.postgresql.org/14/1235/ (Support arrays over domain types) >>> Can

Re: [HACKERS] pgbench regression test failure

2017-09-12 Thread Tom Lane
Fabien COELHO writes: >> I have a serious, serious dislike for tests that seem to work until >> they're run on a heavily loaded machine. > I'm not that sure the error message was because of that. No, this particular failure (probably) wasn't. But now that I've realized

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-12 Thread Tom Lane
Robert Haas writes: > Well, if we provided a different SQLSTATE for each qualitatively > different type of libpq error, that might well be useful enough to > justify some risk of application breakage. But replacing a constant > string that we've had for ~15 years with a

Re: [HACKERS] pgbench regression test failure

2017-09-12 Thread Fabien COELHO
I have a serious, serious dislike for tests that seem to work until they're run on a heavily loaded machine. I'm not that sure the error message was because of that. ISTM that it was rather finding 3 seconds in two because it started just at the right time, or maybe because of slowness

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Andreas Joseph Krogh
På tirsdag 12. september 2017 kl. 21:11:45, skrev Robert Haas < robertmh...@gmail.com >: On Tue, Sep 12, 2017 at 2:59 PM, Andreas Joseph Krogh wrote: > There are many ways to do/configure things it seems, resulting in many ifs > and buts which

Re: [HACKERS] domain type smashing is expensive

2017-09-12 Thread Tom Lane
Robert Haas writes: > On Tue, Sep 12, 2017 at 1:37 PM, Tom Lane wrote: >> The trick here is that I don't think we want to change the returned column >> types for queries that are not being sent to a client. The parser and >> planner aren't really aware

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-12 Thread Robert Haas
On Tue, Sep 12, 2017 at 3:12 PM, Tom Lane wrote: >> I think this is a bad plan. Right now, libpq sets no SQLSTATE for >> internally generated errors; it is almost certain that there are >> applications testing for an empty SQLSTATE to notice when they're >> getting an error

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-12 Thread Tom Lane
Robert Haas writes: > On Tue, Sep 12, 2017 at 1:23 PM, Fabien COELHO wrote: >> I added two error codes, which is debatable. One is used hardcoded by libpq >> if no diagnostic is found, and the other by psql if libpq returned something >> empty, which

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Robert Haas
On Tue, Sep 12, 2017 at 2:59 PM, Andreas Joseph Krogh wrote: > There are many ways to do/configure things it seems, resulting in many ifs > and buts which makes section 10 rather confusing. I really think a complete > example, with absolute paths, would be clarifying. > > I'm

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-09-12 Thread Robert Haas
On Tue, Sep 12, 2017 at 3:46 AM, Amit Langote wrote: > In this case, AcquireExecutorLocks will lock all the relations in > PlannedStmt.rtable, which must include all partitioned tables of all > partition trees involved in the query. Of those, it will lock the

Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list

2017-09-12 Thread Pavel Stehule
Hi I am sending rebased patch Regards Pavel diff --git a/src/pl/plpgsql/src/pl_gram.y b/src/pl/plpgsql/src/pl_gram.y index 94f1f58593..4b6bf0b5bc 100644 --- a/src/pl/plpgsql/src/pl_gram.y +++ b/src/pl/plpgsql/src/pl_gram.y @@ -92,9 +92,10 @@ static char *NameOfDatum(PLwdatum *wdatum); static

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-12 Thread Andreas Joseph Krogh
På tirsdag 12. september 2017 kl. 19:19:22, skrev Bruce Momjian < br...@momjian.us >: On Thu, Aug  3, 2017 at 11:37:32AM +0200, Michael Paquier wrote: > On Mon, Jul 31, 2017 at 6:13 PM, Robert Haas wrote: > > On Fri, Jul 28, 2017 at 10:35 AM,

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-12 Thread Pavel Stehule
2017-09-12 20:43 GMT+02:00 Robert Haas : > On Tue, Sep 12, 2017 at 1:23 PM, Fabien COELHO > wrote: > > I added two error codes, which is debatable. One is used hardcoded by > libpq > > if no diagnostic is found, and the other by psql if libpq returned

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-12 Thread Robert Haas
On Tue, Sep 12, 2017 at 1:23 PM, Fabien COELHO wrote: > I added two error codes, which is debatable. One is used hardcoded by libpq > if no diagnostic is found, and the other by psql if libpq returned something > empty, which might happen if psql is linked with an older

Re: [HACKERS] domain type smashing is expensive

2017-09-12 Thread Robert Haas
On Tue, Sep 12, 2017 at 1:37 PM, Tom Lane wrote: > Robert Haas writes: >> On short-running queries that return a lot of columns, >> SendRowDescriptionMessage's calls to getBaseTypeAndTypmod() are a >> noticeable expense. > > Yeah, I was never very happy

Re: [HACKERS] pgbench regression test failure

2017-09-12 Thread Tom Lane
Fabien COELHO writes: > By definition, parallelism induces non determinism. When I put 2 seconds, > the intention was that I would get a non empty trace with a "every second" > aggregation. I would rather take a longer test rather than allowing an > empty file: the point

Re: [HACKERS] pgbench regression test failure

2017-09-12 Thread Fabien COELHO
Apparently, one of the threads ran 3 transactions where the test script expects it to run at most 2. Is this a pgbench bug, or is the test being overoptimistic about how exact the "-T 2" cutoff is? Probably both? It seems that cutting off on time is not a precise science, so I suggest to

[HACKERS] [PATCH] Call RelationDropStorage() for broader range of object drops.

2017-09-12 Thread Hadi Moshayedi
Motivation for this patch is that some FDWs (notably, cstore_fdw) try utilizing PostgreSQL internal storage. PostgreSQL assigns relfilenode's to foreign tables, but doesn't clean up storage for foreign tables when dropping tables. Therefore, in cstore_fdw we have to do some tricks to handle

Re: [HACKERS] Surjective functional indexes

2017-09-12 Thread Konstantin Knizhnik
On 12.09.2017 19:28, Simon Riggs wrote: On 1 September 2017 at 09:47, Konstantin Knizhnik wrote: On 01.09.2017 09:25, Simon Riggs wrote: On 1 September 2017 at 05:40, Thomas Munro wrote: On Fri, Jun 9, 2017 at 8:08 PM, Konstantin

Re: [HACKERS] domain type smashing is expensive

2017-09-12 Thread Tom Lane
Robert Haas writes: > On short-running queries that return a lot of columns, > SendRowDescriptionMessage's calls to getBaseTypeAndTypmod() are a > noticeable expense. Yeah, I was never very happy with the way that the original domain patch dealt with that. I think you're

Re: [HACKERS] pg_basebackup behavior on non-existent slot

2017-09-12 Thread Jeff Janes
On Wed, Sep 6, 2017 at 2:50 AM, Alvaro Herrera wrote: > Magnus Hagander wrote: > > On Mon, Sep 4, 2017 at 3:21 PM, Jeff Janes wrote: > > > > Should the parent process of pg_basebackup be made to respond to > SIGCHLD? > > > Or call waitpid(bgchild,

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-12 Thread Emre Hasegeli
> Hello, sorry to late for the party, but may I comment on this? Thank you for picking this up again. > The first patch reconstructs the operators in layers. These > functions are called very frequently when used. Some function are > already inlined in float.h but some static functions in

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-12 Thread Fabien COELHO
Hello Tom, Yep, I thought I was optimistic:-) Can I add a special SQLSTATE for that situation where libpq did not report an error? Meh. If we're going to do that I think it might be better to hack libpq itself to do so, ie, force PQresultErrorField(..., PG_DIAG_SQLSTATE) to always return

  1   2   >