Re: [HACKERS] Statement timeout behavior in extended queries

2017-09-04 Thread Tatsuo Ishii
> What do you think? I've not really tested this with the extended > protocol, so I'd appreciate if you could rerun your test from the > older thread. Attached is your patch just rebased against master branch. Also I attached the test cases and results using pgproto on patched master branch.

[HACKERS] cache lookup errors for missing replication origins

2017-09-04 Thread Michael Paquier
Hi all, Cache lookup errors with elog() can be triggered easily by users at SQL level using replication origin functions: =# select pg_replication_origin_advance('popo', '0/1'); ERROR: XX000: cache lookup failed for replication origin 'popo' LOCATION: replorigin_by_name, origin.c:229 =# select

Re: [HACKERS] Useless code in ExecInitModifyTable

2017-09-04 Thread Ryan Murphy
> FWIW, I find that good ol' patch is much more reliable about applying > patches that didn't come from git itself. In this case > > Thanks, I knew I was missing something! Ryan

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

2017-09-04 Thread Amit Langote
On 2017/09/04 21:32, Ashutosh Bapat wrote: > On Mon, Sep 4, 2017 at 10:04 AM, Amit Langote wrote: >> By the way, if you want to get rid of PartitionedChildRelInfo, you can do >> that as long as you find some other way of putting together the >> partitioned_rels list to add into the ModifyTable

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

2017-09-04 Thread Masahiko Sawada
On Tue, Sep 5, 2017 at 12:24 PM, Michael Paquier wrote: > On Tue, Sep 5, 2017 at 12:05 PM, Masahiko Sawada > wrote: >> In get_rel_oids() we often switch the memory context to vac_context >> and switch back. As a result almost code in

Re: [HACKERS] postgres_fdw bug in 9.6

2017-09-04 Thread Ryan Murphy
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:not tested This feature is obviously a pretty deep cut, and I don't understand the

Re: [HACKERS] Function to move the position of a replication slot

2017-09-04 Thread Michael Paquier
On Thu, Aug 31, 2017 at 9:19 PM, Magnus Hagander wrote: > PFA an updated and rebased patch. > > Rebased. Now named pg_advance_replication_slot. ERROR on logical slots. > Forward only. > > I think that, in the end, covered all the comments? + if (backwards) +

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

2017-09-04 Thread Simon Riggs
On 5 September 2017 at 02:16, Michael Paquier wrote: > On Mon, Sep 4, 2017 at 11:47 PM, Bossart, Nathan wrote: >> I've made this change in v14 of the main patch. >> >> In case others had opinions regarding the de-duplication patch, I've >> attached

Re: [HACKERS] Secondary index access optimizations

2017-09-04 Thread Amit Langote
On 2017/09/04 20:46, Konstantin Knizhnik wrote: > On 04.09.2017 12:59, Amit Langote wrote: >> On 2017/09/04 18:19, Konstantin Knizhnik wrote: >>> Concerning your suggestion to merge check_index_predicates() and >>> remove_restrictions_implied_by_constraints() functions: may be it can be >>> done,

Re: [HACKERS] Useless code in ExecInitModifyTable

2017-09-04 Thread Ryan Murphy
Hello! I downloaded the latest patch "clean-nodeModifyTable-v2.patch" and tried applying it to HEAD using "git apply ". The only response from git was "fatal: unrecognized input". I tried this with git 2.5.4 stable that comes native on my mac, and git 2.12 built from source. In both cases I got

Re: [HACKERS] expanding inheritance in partition bound order

2017-09-04 Thread Amit Khandekar
On 4 September 2017 at 06:34, Amit Langote wrote: > Hi Amit, > > On 2017/09/03 16:07, Amit Khandekar wrote: >> On 31 August 2017 at 13:06, Amit Langote >> wrote: Mind you, that idea has some problems anyway in the face of

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

2017-09-04 Thread Masahiko Sawada
On Tue, Sep 5, 2017 at 10:16 AM, Michael Paquier wrote: > On Mon, Sep 4, 2017 at 11:47 PM, Bossart, Nathan wrote: >> I've made this change in v14 of the main patch. >> >> In case others had opinions regarding the de-duplication patch, I've >>

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Tom Lane
I wrote: > ... Or maybe we should shorten this > variable name so it doesn't force reformatting of all this text. > Possible ideas include "DB_VERSION_NAME", "SERVER_VER_NAME", or > "SERVER_VERSION_STR". (The last saves only one character, whereas > we really need to save two if we're trying not

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Pavel Stehule
Hi 2017-09-04 18:31 GMT+02:00 Tom Lane : > So I thought we were done bikeshedding the variable names for this > feature, but as I was reviewing the patch with intent to commit, > I noticed you hadn't updated helpVariables() to mention them. > Possibly you missed this because

Re: [HACKERS] JIT compiling expressions/deform + inlining prototype v2.0

2017-09-04 Thread Konstantin Knizhnik
On 01.09.2017 09:41, Andres Freund wrote: Hi, I previously had an early prototype of JITing [1] expression evaluation and tuple deforming. I've since then worked a lot on this. Here's an initial, not really pretty but functional, submission. This supports all types of expressions, and

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Pavel Stehule
2017-09-04 18:56 GMT+02:00 Tom Lane : > I wrote: > > ... Or maybe we should shorten this > > variable name so it doesn't force reformatting of all this text. > > Possible ideas include "DB_VERSION_NAME", "SERVER_VER_NAME", or > > "SERVER_VERSION_STR". (The last saves only one

Re: [HACKERS] INSERT .. ON CONFLICT DO SELECT [FOR ..]

2017-09-04 Thread Marko Tiikkaja
On Mon, Sep 4, 2017 at 4:09 AM, Peter Geoghegan wrote: > On Tue, Aug 15, 2017 at 12:17 AM, Marko Tiikkaja wrote: > > On Tue, Aug 15, 2017 at 7:43 AM, Peter Geoghegan wrote: > >> > >> On Mon, Aug 14, 2017 at 6:23 PM, Marko Tiikkaja wrote:

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Daniel Verite
Tom Lane wrote: > Since we've blown past 80 columns on some of the other > output, maybe that doesn't matter. Or maybe we should shorten this > variable name so it doesn't force reformatting of all this text. The two-space left margin on the entire block does not add that much to

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-09-04 Thread Fabien COELHO
Hello Masahiko-san, Currently TRUNCATE pgbench_accounts command is executed within a transaction started immediately before it. If we move it out of the transaction, the table data will be truncated even if the copying data failed. Maybe we can do TRUNCATE pgbench_accounts, pgbench_history

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Tom Lane
"Daniel Verite" writes: > The two-space left margin on the entire block does not add that > much to readability, IMV, so maybe we could reclaim these > two characters. Well, it's a sub-list of the entire output of helpVariables(), so I think some indentation is a good

Re: [HACKERS] INSERT .. ON CONFLICT DO SELECT [FOR ..]

2017-09-04 Thread Peter Geoghegan
On Mon, Sep 4, 2017 at 10:05 AM, Marko Tiikkaja wrote: > I had to look at the patch to see what I'd done, and the tests suggest that > we already complain about this with if a FOR [lock level] clause is present: > >+begin transaction isolation level read committed; >+insert

Re: [HACKERS] pgbench - allow to store select results into variables

2017-09-04 Thread Tom Lane
Tatsuo Ishii writes: >> Here is a v3 with a more precise comment. > Looks good to me. I have marked the patch status as "Ready for > committer". LGTM too. Pushed with a minor adjustment to make parseVariable() have exactly the same test as valid_variable_name().

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Pavel Stehule
2017-09-04 19:35 GMT+02:00 Tom Lane : > "Daniel Verite" writes: > > The two-space left margin on the entire block does not add that > > much to readability, IMV, so maybe we could reclaim these > > two characters. > > Well, it's a sub-list of the

Re: [HACKERS] ALTER INDEX .. SET STATISTICS ... behaviour

2017-09-04 Thread Alexander Korotkov
Hi, Adrien! On Mon, Sep 4, 2017 at 3:57 PM, Adrien Nayrat wrote: > On 08/30/2017 02:26 PM, Alexander Korotkov wrote: > I reviewed this patch. It works as expected but I have few remarks : > Thank you for reviewing my patch!. > * There is a warning during

Re: [HACKERS] index-only count(*) for indexes supporting bitmap scans

2017-09-04 Thread Alexander Kuzmenkov
On 04.09.2017 15:17, Alexey Chernyshov wrote: make check-world fails on contrib/postgres_fdw because of Subquery Scan on ... Probably, query plan was changed. Hi Alexey, Thanks for testing! This is the same problem as the one in 'select_distinct' I mentioned before. I changed the test, the

[HACKERS] CSV Logging questions

2017-09-04 Thread Greg Stark
I was just looking over the CSV logging code and have a few questions about why things were done the way they were done. 1) Why do we gather a per-session log line number? Is it just to aid people importing to avoid duplicate entries from partial files? Is there some other purpose given that

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Tom Lane
So I thought we were done bikeshedding the variable names for this feature, but as I was reviewing the patch with intent to commit, I noticed you hadn't updated helpVariables() to mention them. Possibly you missed this because it doesn't mention VERSION either, but that doesn't seem very

Re: [HACKERS] CSV Logging questions

2017-09-04 Thread David Fetter
On Mon, Sep 04, 2017 at 05:27:40PM +0100, Greg Stark wrote: > I was just looking over the CSV logging code and have a few questions > about why things were done the way they were done. > > 1) Why do we gather a per-session log line number? Is it just to aid > people importing to avoid duplicate

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Tom Lane
Pavel Stehule writes: > 2017-09-04 18:56 GMT+02:00 Tom Lane : >> Just had another idea: maybe make the new variable names >> SERVER_VERSION_S >> SERVER_VERSION_N >> VERSION_S >> VERSION_N > SERVER_VERSION_STR looks better than this. I dunno, I'm not

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Pavel Stehule
2017-09-04 19:08 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > 2017-09-04 18:56 GMT+02:00 Tom Lane : > >> Just had another idea: maybe make the new variable names > >> SERVER_VERSION_S > >> SERVER_VERSION_N > >> VERSION_S > >>

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-09-04 Thread Amit Kapila
On Mon, Sep 4, 2017 at 4:34 PM, wrote: > Our clients complain about this issue and therefore I want to raise the > discussion and suggest several solutions to this problem: > > I. Why does PG use Fatal when Error is enough to release lock that rises > lock conflict? >

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-09-04 Thread Alex Ignatov
-Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Amit Kapila Sent: Monday, September 4, 2017 3:32 PM To: i.kartys...@postgrespro.ru Cc: pgsql-hackers Subject: Re: [HACKERS] WIP: long

Re: [HACKERS] ALTER INDEX .. SET STATISTICS ... behaviour

2017-09-04 Thread Adrien Nayrat
On 09/04/2017 06:16 PM, Alexander Korotkov wrote: > Looks good for me.  I've integrated those changes in the patch. > New revision is attached. Thanks, I changed status to "ready for commiter". -- Adrien NAYRAT http://dalibo.com - http://dalibo.org signature.asc Description: OpenPGP digital

Re: [HACKERS] INSERT .. ON CONFLICT DO SELECT [FOR ..]

2017-09-04 Thread Marko Tiikkaja
On Mon, Sep 4, 2017 at 7:46 PM, Peter Geoghegan wrote: > On Mon, Sep 4, 2017 at 10:05 AM, Marko Tiikkaja wrote: > But I'm generally against > > interfaces which put arbitrary restrictions on what power users can do on > > the basis that less experienced people might

Re: [HACKERS] pgbench - allow to store select results into variables

2017-09-04 Thread Fabien COELHO
Looks good to me. I have marked the patch status as "Ready for committer". LGTM too. Pushed with a minor adjustment to make parseVariable() have exactly the same test as valid_variable_name(). \set ありがとうございました 1 \set 谢谢 2 \set dankeschön 3 :-) -- Fabien. -- Sent via pgsql-hackers

Re: [HACKERS] Walsender timeouts and large transactions

2017-09-04 Thread Sokolov Yura
On 2017-05-25 17:52 Petr Jelinek wrote: > Hi, > > We have had issue with walsender timeout when used with logical > decoding and the transaction is taking long time to be decoded > (because it contains many changes) > > I was looking today at the walsender code and realized that it's > because

Re: [HACKERS] Proposal: pg_rewind to skip config files

2017-09-04 Thread Chris Travers
Ok so I have a proof of concept patch here. This is proof of concept only. It odes not change documentation or the like. The purpose of the patch is discussion on the "do we want this" side. The patch is fairly trivial but I have not added test cases or changed docs yet. Intention of the

Re: [HACKERS] [POC] hash partitioning

2017-09-04 Thread amul sul
I've updated patch to use an extended hash function (​Commit # 81c5e46c490e2426db243eada186995da5bb0ba7) for the partitioning. Regards, Amul On Thu, Jul 27, 2017 at 5:11 PM, amul sul wrote: > Attaching newer patches rebased against the latest master head. Thanks ! > >

Re: [HACKERS] Proposal: pg_rewind to skip config files

2017-09-04 Thread Sokolov Yura
On 2017-09-04 11:53, Chris Travers wrote: In some experiments with pg_rewind and rep mgr I noticed that local testing is complicated by the fact that pg_rewind appears to copy configuration files from the source to target directory. I would propose to make a modest patch to exclude

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_rewind: Fix some problems when copying files >2GB.

2017-09-04 Thread Alvaro Herrera
Tom Lane wrote: > Michael Paquier writes: > > I don't like breaking the abstraction of pg_log() with the existing > > flags with some kind of pg_debug() layer. The set of APIs present now > > in pg_rewind for logging is nice to have, and I think that those debug > >

Re: [HACKERS] Proposal: pg_rewind to skip config files

2017-09-04 Thread Chris Travers
On Mon, Sep 4, 2017 at 12:23 PM, Michael Paquier wrote: > On Mon, Sep 4, 2017 at 7:21 PM, Michael Paquier > wrote: > > A simple idea would be to pass as a parameter a regex on which we > > check files to skip when scanning the directory of

[HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-09-04 Thread i . kartyshov
Our clients complain about this issue and therefore I want to raise the discussion and suggest several solutions to this problem: I. Why does PG use Fatal when Error is enough to release lock that rises lock conflict? "If (RecoveryConflictPending && DoingCommandRead)" II. Do we really need

Re: [HACKERS] index-only count(*) for indexes supporting bitmap scans

2017-09-04 Thread Alexey Chernyshov
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi Alexander, make check-world fails on contrib/postgres_fdw because of

Re: [HACKERS] Release Note changes

2017-09-04 Thread Andreas Joseph Krogh
På mandag 04. september 2017 kl. 10:49:40, skrev Simon Riggs < si...@2ndquadrant.com >: Migration to Version 10 "A dump/restore using pg_dumpall, or use of pg_upgrade, is required for those wishing to migrate data from any previous release." This isn't true and

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-04 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: not tested Spec compliant: not tested Documentation:not tested PostgreSQL fails with SIGSEGV during `make check-world`. Backtrace:

Re: [HACKERS] Secondary index access optimizations

2017-09-04 Thread Amit Langote
Hi Konstantin, On 2017/09/04 18:19, Konstantin Knizhnik wrote: > On 04.09.2017 05:38, Amit Langote wrote: >> On 2017/09/02 12:44, Thomas Munro wrote: >>> On Wed, Aug 16, 2017 at 9:23 PM, Konstantin Knizhnik >>> wrote: postgres=# explain select * from bt where k

Re: [HACKERS] Useless code in ExecInitModifyTable

2017-09-04 Thread Etsuro Fujita
On 2017/06/21 17:57, Amit Langote wrote: On 2017/06/21 16:59, Etsuro Fujita wrote: Commit d3cc37f1d801a6b5cad9bf179274a8d767f1ee50 added this to ExecInitModifyTable: + /* The root table RT index is at the head of the partitioned_rels list */ + if (node->partitioned_rels) + { +

Re: [HACKERS] CLUSTER command progress monitor

2017-09-04 Thread Tatsuro Yamada
On 2017/09/04 15:38, Michael Paquier wrote: On Thu, Aug 31, 2017 at 11:12 AM, Tatsuro Yamada wrote: Then I have questions. * Should we have separate views for them? Or should both be covered by the same view with some indication of which command (CLUSTER

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-09-04 Thread Alvaro Herrera
if (tuples > 0) { - if (tableinfo.relkind != RELKIND_PARTITIONED_TABLE) - printfPQExpBuffer(, _("Number of child tables: %d (Use \\d+ to list them.)"), tuples); -

Re: [HACKERS] Proposal: pg_rewind to skip config files

2017-09-04 Thread Michael Paquier
On Mon, Sep 4, 2017 at 5:53 PM, Chris Travers wrote: > In some experiments with pg_rewind and rep mgr I noticed that local testing > is complicated by the fact that pg_rewind appears to copy configuration > files from the source to target directory. > > I would propose

Re: [HACKERS] Proposal: pg_rewind to skip config files

2017-09-04 Thread Michael Paquier
On Mon, Sep 4, 2017 at 7:21 PM, Michael Paquier wrote: > A simple idea would be to pass as a parameter a regex on which we > check files to skip when scanning the directory of the target remotely > or locally. This needs to be used with care though, it would be easy >

Re: [HACKERS] Release Note changes

2017-09-04 Thread Magnus Hagander
On Mon, Sep 4, 2017 at 1:11 PM, Robert Haas wrote: > On Mon, Sep 4, 2017 at 4:49 AM, Simon Riggs wrote: > > Migration to Version 10 > > > > "A dump/restore using pg_dumpall, or use of pg_upgrade, is required > > for those wishing to migrate data

Re: [HACKERS] Release Note changes

2017-09-04 Thread Robert Haas
On Mon, Sep 4, 2017 at 7:14 AM, Magnus Hagander wrote: > I agree that singling it out there is probably not the best idea. But a > sentence/paragraph saying that there are third party replication solutions > that can solve the problem, along with linking to the page with the

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

2017-09-04 Thread Bossart, Nathan
On 9/3/17, 11:46 PM, "Michael Paquier" wrote: > I did not consider first that the list portion also needed to be > modified, perhaps because I am not coding that myself... So now that > it is becoming more complicated what about just using AutovacMemCxt? > This would

Re: [HACKERS] Secondary index access optimizations

2017-09-04 Thread Konstantin Knizhnik
On 04.09.2017 05:38, Amit Langote wrote: On 2017/09/02 12:44, Thomas Munro wrote: On Wed, Aug 16, 2017 at 9:23 PM, Konstantin Knizhnik wrote: postgres=# explain select * from bt where k between 1 and 2 and v = 100; QUERY PLAN

Re: [HACKERS] Parallel worker error

2017-09-04 Thread Amit Kapila
On Sat, Sep 2, 2017 at 12:21 PM, Noah Misch wrote: > On Thu, Aug 31, 2017 at 03:11:10PM -0400, Robert Haas wrote: >> On Wed, Aug 30, 2017 at 11:19 AM, Robert Haas wrote: >> > But since that's an established design fl^H^Hprinciple, maybe that >> > means

Re: [HACKERS] Release Note changes

2017-09-04 Thread Robert Haas
On Mon, Sep 4, 2017 at 4:49 AM, Simon Riggs wrote: > Migration to Version 10 > > "A dump/restore using pg_dumpall, or use of pg_upgrade, is required > for those wishing to migrate data from any previous release." > > This isn't true and is seriously misleading ... Fair

Re: [HACKERS] Secondary index access optimizations

2017-09-04 Thread Konstantin Knizhnik
On 04.09.2017 12:59, Amit Langote wrote: Hi Konstantin, On 2017/09/04 18:19, Konstantin Knizhnik wrote: On 04.09.2017 05:38, Amit Langote wrote: On 2017/09/02 12:44, Thomas Munro wrote: On Wed, Aug 16, 2017 at 9:23 PM, Konstantin Knizhnik wrote: postgres=#

Re: [HACKERS] CLUSTER command progress monitor

2017-09-04 Thread Michael Paquier
On Thu, Aug 31, 2017 at 11:12 AM, Tatsuro Yamada wrote: > Then I have questions. > > * Should we have separate views for them? Or should both be covered by the > same view with some indication of which command (CLUSTER or VACUUM FULL) > is actually

Re: [HACKERS] Minor code improvement to postgresGetForeignPlan

2017-09-04 Thread Tatsuro Yamada
Hi Fujita-san, > The patch looks good to me, so I'll mark this as Ready for Committer. Thanks for reviewing my patch. > (I'm not sure we should do the same thing to the function declaration in > other places such as fdwapi.h and the documentation for consistency, but if > so, I'd vote for

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-09-04 Thread Kyotaro HORIGUCHI
Hello, Thank you for reviewing this. At Mon, 28 Aug 2017 20:14:54 +0900, Michael Paquier wrote in > On Mon, Aug 28, 2017 at 8:02 PM, Kyotaro HORIGUCHI > wrote: > >

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-09-04 Thread Ashutosh Bapat
On Mon, Sep 4, 2017 at 10:34 AM, Amit Langote wrote: > Hi Ashutosh, > > On 2017/09/04 13:51, Ashutosh Bapat wrote: >> Hi, >> Thomas's application to track patches told me that this patch needs >> rebase. It also required some changes to the code. Here's the updated

[HACKERS] Proposal: pg_rewind to skip config files

2017-09-04 Thread Chris Travers
In some experiments with pg_rewind and rep mgr I noticed that local testing is complicated by the fact that pg_rewind appears to copy configuration files from the source to target directory. I would propose to make a modest patch to exclude postgresql.conf, pg_hba.conf, and pg_ident.conf from the

Re: [HACKERS] POC: Sharing record typmods between backends

2017-09-04 Thread Thomas Munro
Thanks for the review and commits so far. Here's a rebased, debugged and pgindented version of the remaining patches. I ran pgindent with --list-of-typedefs="SharedRecordTableKey,SharedRecordTableEntry,SharedTypmodTableEntry,SharedRecordTypmodRegistry,Session" to fix some weirdness around these

Re: [HACKERS] [PATCH] Assert that the correct locks are held when calling PageGetLSN()

2017-09-04 Thread Michael Paquier
On Fri, Sep 1, 2017 at 3:53 AM, Jacob Champion wrote: > The patch is really two pieces: add the assertion, and fix the callers > that would trip it. The latter part is still in progress, because I'm > running into some places where I'm not sure what the correct way > forward

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-09-04 Thread Andres Freund
Hi, On 2017-09-04 15:51:51 +0900, Kyotaro HORIGUCHI wrote: > SpinLockAcquire(>mutex); > + oldFlushPtr = walsnd->flush; > walsnd->write = writePtr; > walsnd->flush = flushPtr; > walsnd->apply = applyPtr; > @@ -1821,7 +1836,93 @@

Re: [HACKERS] initdb failure on Debian sid/mips64el in EventTriggerEndCompleteQuery

2017-09-04 Thread Christoph Berg
Re: Tom Lane 2017-08-13 <14677.1502638...@sss.pgh.pa.us> > Christoph Berg writes: > > Seems to be a gcc-7 problem affecting several packages on mips64el: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871514 > > Hm, unless there is a use of sigsetjmp earlier in that

[HACKERS] Release Note changes

2017-09-04 Thread Simon Riggs
Migration to Version 10 "A dump/restore using pg_dumpall, or use of pg_upgrade, is required for those wishing to migrate data from any previous release." This isn't true and is seriously misleading since pglogical and other proprietary tools exist that were designed specifically to allow this.

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-09-04 Thread Michael Paquier
On Mon, Sep 4, 2017 at 4:04 PM, Andres Freund wrote: > I've not read through the thread, but this seems like the wrong approach > to me. The receiving side should use a correct value, instead of putting > this complexity on the sender's side. Yes I agree with that. The

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-09-04 Thread i . kartyshov
Hello, thank you for your comments over main idea and code. On 13.03.2017 05:20, Thomas Munro wrote: 1) First, I'll restate my view of the syntax-vs-function question: I think an fmgr function is the wrong place to do this, because it doesn't work for our 2 higher isolation levels as

Re: [HACKERS] Release Note changes

2017-09-04 Thread Simon Riggs
On 4 September 2017 at 10:34, Andreas Joseph Krogh wrote: > I'd like at big red warning "Logical decoding doesn't support Large Objects" > in that case; > > "If upgrading from a 9.4 server or later, and you don't use Large Objects, > external utilities using logical decoding,

Re: [HACKERS] ALTER INDEX .. SET STATISTICS ... behaviour

2017-09-04 Thread Adrien Nayrat
On 08/30/2017 02:26 PM, Alexander Korotkov wrote: > Patch rebased to current master is attached. Hello, I reviewed this patch. It works as expected but I have few remarks : * There is a warning during compilation : gram.y: In function ‘base_yyparse’: gram.y:2090:6: warning: ISO C90 forbids

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-04 Thread Tom Lane
Michael Paquier writes: > Hmm. While this patch looks to me in a better shape than what Simon's > is proposing, thinking about > cah2-v61vxnentfj2v-zd+ma-g6kqmjgd5svxou3jbvdzqh0...@mail.gmail.com > which involved a migration Oracle->Postgres, I have been wondering if >

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

2017-09-04 Thread Ashutosh Bapat
On Mon, Sep 4, 2017 at 10:04 AM, Amit Langote wrote: > On 2017/09/04 12:38, Etsuro Fujita wrote: >> On 2017/09/02 4:10, Ashutosh Bapat wrote: >>> This rebase mainly changes patch 0001, which translates partition >>> hierarchy into inheritance hierarchy creating

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-09-04 Thread Ashutosh Bapat
On Mon, Sep 4, 2017 at 3:48 PM, Alvaro Herrera wrote: > > if (tuples > 0) > { > - if (tableinfo.relkind != > RELKIND_PARTITIONED_TABLE) > -

Re: [HACKERS] GnuTLS support

2017-09-04 Thread Bruce Momjian
On Fri, Sep 1, 2017 at 12:09:35PM -0400, Robert Haas wrote: > I think that what this shows is that the current set of GUCs is overly > OpenSSL-centric. We created a set of GUCs that are actually specific > to one particular implementation but named them as if they were > generic. My idea about

[HACKERS] 【ECPG】strncpy function does not set the end character '\0'

2017-09-04 Thread postgresql_2...@163.com
Hi When we reviewed the ecpg code,we found the array seem not have the end character('\0') after using the strncpy function. In the function ECPGnoticeReceiver, we use the stncpy function copy the sqlstate to sqlca->sqlstate. And the sqlca->sqlstate is defined as the size of 5, and the copy

Re: [HACKERS] obsolete code in pg_upgrade

2017-09-04 Thread Bruce Momjian
On Tue, Aug 22, 2017 at 08:28:15PM -0400, Peter Eisentraut wrote: > It seems to me that this code in pg_upgrade/check.c has been useless > since at least version 9.1: > > /* Is it 9.0 but without tablespace directories? */ > if (GET_MAJOR_VERSION(new_cluster.major_version) == 900 && >

Re: [HACKERS] Release Note changes

2017-09-04 Thread Tom Lane
Simon Riggs writes: > Which is why next year when upgrading from PG10 -> PG11 we will > mention it and that point not mention the other older solutions, which > were once our best. This is boilerplate text that we tend to copy-and-paste without thinking about it; if it's

Re: [HACKERS] Release Note changes

2017-09-04 Thread Simon Riggs
On 4 September 2017 at 12:39, Robert Haas wrote: > On Mon, Sep 4, 2017 at 7:14 AM, Magnus Hagander wrote: >> I agree that singling it out there is probably not the best idea. But a >> sentence/paragraph saying that there are third party replication

Re: [HACKERS] Release Note changes

2017-09-04 Thread Simon Riggs
On 4 September 2017 at 12:11, Robert Haas wrote: > > It's not really true that the only alternatives to pglogical are > proprietary. Really, one could use any logical replication solution, > and there have been multiple open source alternatives for a decade. True, but it

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-09-04 Thread i . kartyshov
I forget to include patch in last letter. Craig Ringer wrote 2017-08-15 05:00: That ship sailed a long time ago unfortunately, they're all over pg_stat_replication and pg_replication_slots and so on. They're already routinely used for monitoring replication lag in bytes, waiting for a peer to

Re: [HACKERS] GnuTLS support

2017-09-04 Thread David Fetter
On Fri, Sep 01, 2017 at 10:33:37PM +0200, Alvaro Herrera wrote: > Tom Lane wrote: > > Robert Haas writes: > > > On Thu, Aug 31, 2017 at 1:52 PM, Andreas Karlsson > > > wrote: > > > >> There are currently two failing SSL tests which at least to me seems

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-09-04 Thread Alexander Korotkov
On Mon, Sep 4, 2017 at 4:51 PM, Alex Ignatov wrote: > In this situation this parameter (max_standby_streaming_delay) wont help > because if you have subsequent statement on standby (following info is from > documentation and from our experience ): Thus, if one query has

Re: [HACKERS] pgbench tap tests & minor fixes.

2017-09-04 Thread Tom Lane
Fabien COELHO writes: > As for included bug fixes, I can do separate patches, but I think that it > is enough to first commit the pgbench files and then the tap-test files, > in that order. I'll see what committers say. Starting to look at this. I concur that the bug

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Fabien COELHO
Hello Tom, So I thought we were done bikeshedding the variable names for this feature, but as I was reviewing the patch with intent to commit, I noticed you hadn't updated helpVariables() to mention them. Indeed. Possibly you missed this because it doesn't mention VERSION either, but that

Re: [HACKERS] pgbench tap tests & minor fixes.

2017-09-04 Thread Fabien COELHO
Hello Tom, As for included bug fixes, I can do separate patches, but I think that it is enough to first commit the pgbench files and then the tap-test files, in that order. I'll see what committers say. Starting to look at this. I concur that the bug fixes ought to be committed separately,

Re: [HACKERS] pgbench tap tests & minor fixes.

2017-09-04 Thread Tom Lane
Nikolay Shaplov writes: > 2. Patch for -t/-R/-L case. > Current pgbench does not process -t/-R/-L case correctly. This was also fixed > in this patch. This portion of the patch seems uncontroversial, so I've pushed it, with some minor cosmetic adjustments (mostly comments).

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Tom Lane
Fabien COELHO writes: > I also like Daniel's idea to update formatting rules, eg following what is > done for environment variables and accepting that it won't fit in one page > anyway. Yeah. When you look at all three portions of the helpVariables output, it's clear that

Re: [HACKERS] pgbench - minor fix for meta command only scripts

2017-09-04 Thread Jeff Janes
On Mon, Sep 26, 2016 at 1:01 AM, Heikki Linnakangas wrote: > On 09/24/2016 12:45 PM, Fabien COELHO wrote: > >> >> Attached are some small changes to your version: >> >> I have added the sleep_until fix. >> >> I have fixed a bug introduced in the patch by changing && by || in the

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-09-04 Thread Fabien COELHO
I think we should go with Daniel's idea for all three parts. I'm okay with that, although probably it should be an independent patch. In the documentation, I do not think that both SERVER_VERSION_NAME and _NUM (or whatever their chosen name) deserve two independent explanations with heavy

Re: [HACKERS] JIT compiling expressions/deform + inlining prototype v2.0

2017-09-04 Thread Andres Freund
Hi, On 2017-09-04 20:01:03 +0300, Konstantin Knizhnik wrote: > > I previously had an early prototype of JITing [1] expression evaluation > > and tuple deforming. I've since then worked a lot on this. > > > > Here's an initial, not really pretty but functional, submission. This > > supports all

Re: [HACKERS] pgbench - minor fix for meta command only scripts

2017-09-04 Thread Fabien COELHO
Hello Jeff, I have fixed a bug introduced in the patch by changing && by || in the (min_sec > 0 && maxsock != -1) condition which was inducing errors with multi-threads & clients... Since this commit (12788ae49e1933f463bc5), if I use the --rate to throttle the transaction rate, it does get

Re: [HACKERS] pgbench - minor fix for meta command only scripts

2017-09-04 Thread Jeff Janes
On Mon, Sep 4, 2017 at 1:56 PM, Fabien COELHO wrote: > > Hello Jeff, > > I have fixed a bug introduced in the patch by changing && by || in the (min_sec > 0 && maxsock != -1) condition which was inducing errors with multi-threads & clients... >>> > Since this

Re: [HACKERS] pgbench tap tests & minor fixes.

2017-09-04 Thread Tom Lane
Fabien COELHO writes: >> * I do not think we need expr_scanner_chomp_substring. Of the three >> existing callers of expr_scanner_get_substring, one is doing a manual >> chomp afterwards, and the other two need chomps per your patch. > Ok. I thought that I would get a slap

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-09-04 Thread Alexander Korotkov
On Mon, Sep 4, 2017 at 2:04 PM, wrote: > Our clients complain about this issue and therefore I want to raise the > discussion and suggest several solutions to this problem: > > I. Why does PG use Fatal when Error is enough to release lock that rises > lock conflict? >

[HACKERS] pg_basebackup behavior on non-existent slot

2017-09-04 Thread Jeff Janes
If I tell pg_basebackup to use a non-existent slot, it immediately reports an error. And then it exits with an error, but only after streaming the entire database contents. If you are doing this interactively and are on the ball, of course, you can hit ctrl-C when you see the error message. I

Re: [HACKERS] pgbench tap tests & minor fixes.

2017-09-04 Thread Fabien COELHO
Anyway, done with the addition of a "chomp" parameter, leaving only the TAP test changes to consider. Ok, thanks. I'll set the CF entry back to "waiting on author" pending your revisions of those. See attached. Removed scalar/array ref hack, plenty [] added everywhere to match. Removed

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-09-04 Thread Masahiko Sawada
On Tue, Sep 5, 2017 at 2:33 AM, Fabien COELHO wrote: > > Hello Masahiko-san, > Currently TRUNCATE pgbench_accounts command is executed within a transaction started immediately before it. If we move it out of the transaction, the table data will be truncated

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

2017-09-04 Thread Michael Paquier
On Mon, Sep 4, 2017 at 11:47 PM, Bossart, Nathan wrote: > I've made this change in v14 of the main patch. > > In case others had opinions regarding the de-duplication patch, I've > attached that again as well. + /* +* Create the relation list in a long-lived memory

  1   2   >