Re: [HACKERS] Walsender timeouts and large transactions

2017-11-16 Thread Kyotaro HORIGUCHI
Ouch.. I'd doubly mistaked. > I found that the patch is the latest one and will look this > soon. Sorry for the ignorance. Thats...wrong. Sorry. There's no new patch since the Reboer's comment. I think this is just a bug fix and needs no more argument on its functionality. (and might ought to b

Speed up the removal of WAL files

2017-11-16 Thread Tsunakawa, Takayuki
Hello, The attached patch speeds up the removal of WAL files in the old timelines. I'll add this to the next CF. BACKGROUND == We need to meet a severe availability requirement of a potential customer. They will use synchronous streaming repli

Re: Add PGDLLIMPORT lines to some variables

2017-11-16 Thread Pavel Stehule
Hi 2017-11-16 23:59 GMT+01:00 Brian Cloutier : > Hello hackers, > > I'm porting Citus to Windows and found that we use some variables which PG > doesn't export; here is a patch which adds PGDLLIMPORT declarations to > those variables. This is unfortunately required on Windows for extensions > to

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-16 Thread Ashutosh Bapat
On Thu, Nov 16, 2017 at 6:02 AM, David Rowley wrote: > On 16 November 2017 at 05:57, Konstantin Knizhnik > wrote: >> The main problem IMHO is that there are a lot of different threads and >> patches related with this topic:( >> And it is very difficult to combine all of them together to achieve t

default range partition and constraint exclusion

2017-11-16 Thread Amit Langote
Hi. While working on the patch for partition pruning for declarative partitioned tables, I noticed that default range partition will fail to be included in a plan in certain cases due to pruning by constraint exclusion. Consider a multi-column range-partitioned table: create table mc2p (a int, b

Re: [HACKERS] [PATCH] A hook for session start

2017-11-16 Thread Ashutosh Sharma
On Fri, Nov 17, 2017 at 9:08 AM, Fabrízio de Royes Mello wrote: > Hi all, > > Attached new version of the patch fixing issues about installcheck and some > assertions reported before (based on Michael Paquier code): > The assertion failure which i reported earlier -[1] is fixed with v11 patch. FY

Re: [HACKERS] Remove duplicate setting in test/recovery/Makefile

2017-11-16 Thread Masahiko Sawada
On Fri, Nov 17, 2017 at 5:36 AM, Robert Haas wrote: > On Thu, Nov 16, 2017 at 7:15 AM, Masahiko Sawada > wrote: >> Thank you. I've added this to the next CF so as not to forget. > > Committed. > Thank you. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source

Re: [HACKERS] Walsender timeouts and large transactions

2017-11-16 Thread Kyotaro HORIGUCHI
Hello, At Fri, 17 Nov 2017 13:24:08 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20171117.132408.85564852.horiguchi.kyot...@lab.ntt.co.jp> > > Well, even the CHECK_FOR_INTERRUPTS() can be called unconditionally yes. > > It just seems like it's needless call as we'll call both in for

Re: [HACKERS] Walsender timeouts and large transactions

2017-11-16 Thread Kyotaro HORIGUCHI
Hello, At Fri, 3 Nov 2017 15:54:09 +0100, Petr Jelinek wrote in > Hi, > > thanks for checking. > > On 02/11/17 10:00, Robert Haas wrote: > > On Wed, Nov 1, 2017 at 8:19 PM, Petr Jelinek > > wrote: > >> sorry for the delay but I didn't have much time in past weeks to follow > >> this thread.

Re: [HACKERS] Improve catcache/syscache performance.

2017-11-16 Thread Michael Paquier
On Fri, Nov 17, 2017 at 1:13 PM, Kyotaro HORIGUCHI wrote: > At Fri, 13 Oct 2017 14:36:45 -0700, Andres Freund wrote > in <20171013213645.fuolk62xaedj3...@alap3.anarazel.de> >> Pushed after making the adaptions you suggested, pgindenting, and fixing >> one bug (cstring lookups + datumCopy() = not

Re: [HACKERS] Improve catcache/syscache performance.

2017-11-16 Thread Kyotaro HORIGUCHI
Hello, At Fri, 13 Oct 2017 14:36:45 -0700, Andres Freund wrote in <20171013213645.fuolk62xaedj3...@alap3.anarazel.de> > Pushed after making the adaptions you suggested, pgindenting, and fixing > one bug (cstring lookups + datumCopy() = not good). > > Greetings, > > Andres Freund The folloing

Re: _WINSOCK_DEPRECATED_NO_WARNINGS

2017-11-16 Thread Tom Lane
Glen Knowles writes: > On Thu, Nov 16, 2017 at 8:37 AM, Tom Lane wrote: >> but evidently it chose the wrong cutoff for when to enable that >> symbol, because woodlouse is (or claims to be) running VS2013. > It's actually checking the wrong thing, the problem is the version of the > Windows SDK,

Re: [HACKERS] [PATCH] A hook for session start

2017-11-16 Thread Fabrízio de Royes Mello
Hi all, Attached new version of the patch fixing issues about installcheck and some assertions reported before (based on Michael Paquier code): https://www.postgresql.org/message-id/flat/30479.1510800078%40sss.pgh.pa.us#30479.1510800...@sss.pgh.pa.us https://www.postgresql.org/message-id/flat/201

Re: _WINSOCK_DEPRECATED_NO_WARNINGS

2017-11-16 Thread Glen Knowles
On Thu, Nov 16, 2017 at 8:37 AM, Tom Lane wrote: > * Also for VS2015, add a define that stops compiler complaints about > * using the old Winsock API. > */ > #if defined(_MSC_VER) && _MSC_VER >= 1900 > #define _WINSOCK_DEPRECATED_NO_WARNINGS > > but evidently it chose the wrong cutoff for whe

Re: [HACKERS] Refactoring identifier checks to consistently use strcmp

2017-11-16 Thread Michael Paquier
On Tue, Sep 5, 2017 at 5:34 PM, Daniel Gustafsson wrote: >> On 17 Aug 2017, at 11:08, Daniel Gustafsson wrote: >>> On 16 Aug 2017, at 17:51, Tom Lane wrote: >>> My thought is that if we are looking at words that have been through the >>> parser, then it should *always* be plain strcmp; we should

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-16 Thread Michael Paquier
On Thu, Nov 16, 2017 at 8:17 PM, Masahiko Sawada wrote: > On Thu, Nov 16, 2017 at 1:11 PM, Michael Paquier > wrote: >> + /* >> +* Quick exit if session is not keeping around a non-exclusive backup >> +* already started. >> +*/ >> + if (sessionBackupState != SESSION_BACKUP_NON_EXCL

Re: [HACKERS] Transaction control in procedures

2017-11-16 Thread Merlin Moncure
On Thu, Nov 16, 2017 at 5:35 PM, Simon Riggs wrote: > On 14 November 2017 at 13:09, Peter Eisentraut > wrote: > >>> *) Will pg_cancel_backend() cancel the currently executing statement >>> or the procedure? (I guess probably the procedure but I'm curious) >> >> Same as the way it currently works.

Re: [HACKERS] Parallel Hash take II

2017-11-16 Thread Andres Freund
Hi, On 2017-11-15 14:09:13 -0500, Robert Haas wrote: > On Wed, Nov 15, 2017 at 1:35 PM, Andres Freund wrote: > > But this does bug me, and I think it's what made me pause here to make a > > bad joke. The way that parallelism treats work_mem makes it even more > > useless of a config knob than it

Re: [HACKERS] Transaction control in procedures

2017-11-16 Thread Simon Riggs
On 14 November 2017 at 13:09, Peter Eisentraut wrote: >> *) Will pg_cancel_backend() cancel the currently executing statement >> or the procedure? (I guess probably the procedure but I'm curious) > > Same as the way it currently works. It will raise an exception, which > will travel up the stack

Re: [HACKERS] Transaction control in procedures

2017-11-16 Thread Simon Riggs
On 15 November 2017 at 16:36, Peter Eisentraut wrote: > On 11/8/17 18:48, Simon Riggs wrote: >> What would happen if some of the INSERTs failed? Where would control >> go to? (Maybe this is just "no change" in this particular proc) > > An exception is raised and unless the exception is caught (dep

Re: pspg - psql pager

2017-11-16 Thread Merlin Moncure
On Thu, Nov 16, 2017 at 11:04 AM, Pavel Stehule wrote: > 2017-11-16 16:40 GMT+01:00 Aaron W. Swenson : >> I likes it. I likes it a lot. >> >> And, you’ve got a PR on GitHub from me. >> >> It’s available on Gentoo now! This would be great package for inclusion in pgdg packaging as well. Dependenci

Re: Transaction control in procedures

2017-11-16 Thread Merlin Moncure
On Thu, Nov 16, 2017 at 12:36 PM, Peter Eisentraut wrote: > On 11/16/17 07:04, legrand legrand wrote: >> We are just opening the "close cursors on/at commit" specification ;o) >> >> - MS SQL server: cursor_close_on_commit >> - Firebird: close_cursors_at_commit >> - DB2: "with hold" syntax >> - ..

Add PGDLLIMPORT lines to some variables

2017-11-16 Thread Brian Cloutier
Hello hackers, I'm porting Citus to Windows and found that we use some variables which PG doesn't export; here is a patch which adds PGDLLIMPORT declarations to those variables. This is unfortunately required on Windows for extensions to be able to use those variables, and appears to already have

Re: [HACKERS] SERIALIZABLE on standby servers

2017-11-16 Thread Simon Riggs
On 19 January 2017 at 16:16, Thomas Munro wrote: > On Wed, Nov 16, 2016 at 9:26 AM, Thomas Munro > wrote: >> On Tue, Nov 8, 2016 at 5:56 PM, Thomas Munro >> wrote: >> [..] Another solution >> could be to have recovery on the standby detect tokens (CSNs >> incremented by PreCommit_CheckForSerial

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-16 Thread Peter Geoghegan
On Thu, Nov 16, 2017 at 2:16 PM, Jeff Janes wrote: > The only reference to super-exclusive lock in src/backend/access/gin/README, > that I can find, is about posting trees, not pending lists. Can you quote > or give line numbers of the section you are referring to? That's the section I was refer

Re: ./configure fails for --host=i686-w64-mingw32 on Ubuntu

2017-11-16 Thread Tom Lane
Pavel Golub writes: > Following instructions on Wiki > https://wiki.postgresql.org/wiki/Building_With_MinGW I was trying to > cross compile PostgreSQL 10.1 from a Linux box (Ubuntu 16.04). But it > always fails on configure step. I tried two different systems, results > are the same. > $ ./con

Re: [HACKERS] SERIALIZABLE on standby servers

2017-11-16 Thread Simon Riggs
On 7 November 2016 at 23:56, Thomas Munro wrote: > The patch works by teaching the standby how to do somethings similar > to what SERIALIZABLE READ ONLY DEFERRABLE does on the primary server, > with some help from the primary server in the form of extra > information in the WAL. This is going in

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-16 Thread Jeff Janes
On Mon, Nov 13, 2017 at 8:08 PM, Peter Geoghegan wrote: > On Mon, Nov 13, 2017 at 6:56 PM, Masahiko Sawada > wrote: > >/* > > * We would like to prevent concurrent cleanup process. For that we > will > > * lock metapage in exclusive mode using LockPage() call. Nobody other > > *

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

2017-11-16 Thread Michael Paquier
On Thu, Nov 16, 2017 at 10:47 PM, Peter Eisentraut wrote: > Pushed 0001, will continue with 0002. Thanks! -- Michael

Re: bgwriter_lru_maxpages range in postgresql.conf

2017-11-16 Thread Jeff Janes
On Thu, Nov 16, 2017 at 11:10 AM, Robert Haas wrote: > On Thu, Nov 16, 2017 at 1:26 PM, Jeff Janes wrote: > > (My earlier post has been stuck in infinite moderation due to the use of > a > > common 6 letter abbreviation for configuration, so I will try again > without > > it) > > > > With v10, c

Re: [HACKERS] [PATCH] Generic type subscripting

2017-11-16 Thread Dmitry Dolgov
> On 16 November 2017 at 12:40, Arthur Zakirov wrote: > > Actually it is not only way to return isnull information. What i've meant is that it's the only way if we want to keep the function signature. Actually I would prefer this (container, internal) -> extracted value over this (I assume

Re: Schedule for migration to pglister

2017-11-16 Thread Magnus Hagander
On Thu, Nov 16, 2017 at 4:51 PM, Justin Clift wrote: > On 2017-11-16 15:34, Stephen Frost wrote: > >> Magnus, all, >> >> * Magnus Hagander (mag...@hagander.net) wrote: >> >>> mbox access should now be restored, and as Stephen says, now handled by >>> the >>> Date in the message. Let me know if th

Re: Rewriting PL/Python's typeio code

2017-11-16 Thread Tom Lane
I wrote: > Anthony Bykov writes: >> 1. In file plpy_exec.c there is a typo on line 347: >> "... We use the result and resultin[should be here "g"?] variables... > No, "resultin" is the name of the variable. Maybe that wasn't a good > choice of name, though --- do you have a better idea? After s

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-16 Thread Peter Geoghegan
On Thu, Nov 16, 2017 at 12:49 PM, Peter Geoghegan wrote: > But there is only ever one page locked, the meta-page. And, it's > always an ExclusiveLock. I don't see much use for deadlock avoidance. I meant deadlock detection. -- Peter Geoghegan

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-16 Thread Peter Geoghegan
On Thu, Nov 16, 2017 at 12:44 PM, Robert Haas wrote: > I would like to get rid of that LockPage() call, for sure, because > it's problematic in terms of allowing writes in parallel mode. > However, I think the reason here is the same as why the hash AM used > to use them. If you use a buffer lock

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-16 Thread Robert Haas
On Mon, Nov 13, 2017 at 8:48 PM, Peter Geoghegan wrote: > One thing that really bothers me about commit e2c79e14 is that > LockPage() is called, not LockBuffer(). GIN had no LockPage() calls > before that commit, and is now the only code in the entire system that > calls LockPage()/ConditionalLock

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Andres Freund
Hi, On 2017-11-16 15:27:59 -0500, Tom Lane wrote: > Andres Freund writes: > > On November 16, 2017 11:44:52 AM PST, Tom Lane wrote: > >> Yeah, there's no mechanism like that now, but there could be. > > > Right, but it doesn't sound that hard to introduce. Basically there'd need > > to be a Wi

Re: [HACKERS] Remove duplicate setting in test/recovery/Makefile

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 7:15 AM, Masahiko Sawada wrote: > Thank you. I've added this to the next CF so as not to forget. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-16 Thread Peter Geoghegan
On Thu, Nov 16, 2017 at 12:29 PM, Robert Haas wrote: > I am also clear on what the consequences of this bug are. It seems > like it could harm insert performance by making us wait when we > shouldn't, but can it cause corruption? That I'm not sure about. If > there's already a cleanup of the pe

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 7:08 AM, Masahiko Sawada wrote: > Agreed, that's better. Attached updated patch. > Also I've added this to the next CF so as not to forget. Committed and back-patched. While I'm fairly sure this is a correct fix, post-commit review from someone who knows GIN better than I

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Tom Lane
Andres Freund writes: > On November 16, 2017 11:44:52 AM PST, Tom Lane wrote: >> Yeah, there's no mechanism like that now, but there could be. > Right, but it doesn't sound that hard to introduce. Basically there'd need to > be a WithParamValue node, that first evaluates parameters and then ex

Re: [HACKERS] Issues with logical replication

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 2:41 PM, Andres Freund wrote: >> To me, it seems like SnapBuildWaitSnapshot() is fundamentally >> misdesigned > > Maybe I'm confused, but why is it fundamentally misdesigned? It's not > such an absurd idea to wait for an xid in a WAL record. I get that > there's a race con

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Andres Freund
On November 16, 2017 11:44:52 AM PST, Tom Lane wrote: >Andres Freund writes: >> Well, it's not a question of cost of the function now? Imagine >> SELECT inlineable(something()); >> if you have 10 references for the parameter inside inlineable(). Then >> currently something() would be evalua

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Tom Lane
Andres Freund writes: > Well, it's not a question of cost of the function now? Imagine > SELECT inlineable(something()); > if you have 10 references for the parameter inside inlineable(). Then > currently something() would be evaluated 10 times. Which'd quite > possibly be bad. Right. I kind

Re: [HACKERS] Issues with logical replication

2017-11-16 Thread Andres Freund
On 2017-11-16 10:36:40 -0500, Robert Haas wrote: > On Wed, Nov 15, 2017 at 8:20 PM, Stas Kelvich > wrote: > > I did a sketch of first approach just to confirm that it solves the problem. > > But there I hold ProcArrayLock during update of flag. Since only reader is > > GetRunningTransactionData i

Re: Typo in comment

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 6:53 AM, Etsuro Fujita wrote: > Here is a patch for fixing a comment typo: s/datum1/datums1/. Thanks, committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: bgwriter_lru_maxpages range in postgresql.conf

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 1:26 PM, Jeff Janes wrote: > (My earlier post has been stuck in infinite moderation due to the use of a > common 6 letter abbreviation for configuration, so I will try again without > it) > > With v10, commit 14ca9abfbe4643408a, the upper limit on > bgwriter_lru_maxpages wa

Re: Transaction control in procedures

2017-11-16 Thread Peter Eisentraut
On 11/16/17 07:04, legrand legrand wrote: > We are just opening the  "close cursors on/at commit" specification ;o) > > - MS SQL server: cursor_close_on_commit > - Firebird: close_cursors_at_commit > - DB2: "with hold" syntax > - ... > > I think it a plus to support keeping opened cursors at comm

bgwriter_lru_maxpages range in postgresql.conf

2017-11-16 Thread Jeff Janes
(My earlier post has been stuck in infinite moderation due to the use of a common 6 letter abbreviation for configuration, so I will try again without it) With v10, commit 14ca9abfbe4643408a, the upper limit on bgwriter_lru_maxpages was changed from 1000 to INT_MAX / 2, but the postgresql.conf.sa

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Andres Freund
Hi, On 2017-11-16 09:37:29 -0800, Paul Ramsey wrote: > On Thu, Nov 9, 2017 at 12:11 PM, Paul Ramsey > wrote: > > > All, > > > > As we try and make PostGIS more "parallel sensitive" we have been added > > costs to our functions, so that their relative CPU cost is more accurately > > reflected in

Re: [HACKERS] Inconsistencies between pg_settings and postgresql.conf

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 6:08 AM, Adrian Escoms wrote: > It makes sense, so I attach the new diff without these lines. Thanks. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

GetTupleForTrigger could use a header comment

2017-11-16 Thread Robert Haas
GetTupleForTrigger seems to be a fairly important part of the trigger machinery, yet it has no header comment. I think it should, although I don't understand it well enough at this point to write one. Right now, one is left to guess at the overall purpose of the function and the meanings of the a

Re: pgsql: Disable installcheck tests for test_session_hooks

2017-11-16 Thread Fabrízio de Royes Mello
On Thu, Nov 16, 2017 at 2:21 PM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > > > On 11/16/2017 09:14 AM, Ashutosh Sharma wrote: > >> > >> Just sending an updated patch to cope with the fact that this module > >> does not need to define the EXTENSION and DATA fields, and does not > >

Re: Inlining functions with "expensive" parameters

2017-11-16 Thread Paul Ramsey
On Thu, Nov 9, 2017 at 12:11 PM, Paul Ramsey wrote: > All, > > As we try and make PostGIS more "parallel sensitive" we have been added > costs to our functions, so that their relative CPU cost is more accurately > reflected in parallel plans. > > This has resulted in an odd side effect: some of o

Re: [HACKERS] Proposal: generic WAL compression

2017-11-16 Thread Antonin Houska
Oleg Ivanov wrote: > In order to overcome that issue, I would like to propose the patch, which > provides possibility to use another approach of the WAL record > construction. After having spent several hours reviewing this patch I dare to send the following comments: * writeToPtr() and readFr

Re: [HACKERS] parallelize queries containing initplans

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 5:23 AM, Kuntal Ghosh wrote: > I've tested the above-mentioned scenario with this patch and it is > working fine. Also, I've created a text column named 'vartext', > inserted some random length texts(max length 100) and tweaked the > above query as follows: > select ten,cou

Re: pgsql: Add hooks for session start and session end

2017-11-16 Thread Fabrízio de Royes Mello
On Thu, Nov 16, 2017 at 3:00 PM, Fabrízio de Royes Mello < fabriziome...@gmail.com> wrote: > > > > On Wed, Nov 15, 2017 at 11:26 PM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > > > > > On 11/15/2017 05:07 PM, Michael Paquier wrote: > > > On Thu, Nov 16, 2017 at 6:53 AM, Andrew Dunst

Re: pspg - psql pager

2017-11-16 Thread Pavel Stehule
2017-11-16 16:40 GMT+01:00 Aaron W. Swenson : > On 2017-11-15 10:41, Pavel Stehule wrote: > > Hi > > > > I finished new pager, that can be interesting for postgresql expert > users. > > > > It demonstrate some possibilities of TUI and I hope it shows some > possible > > directions of future possib

Re: pgsql: Add hooks for session start and session end

2017-11-16 Thread Fabrízio de Royes Mello
On Wed, Nov 15, 2017 at 11:26 PM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > > On 11/15/2017 05:07 PM, Michael Paquier wrote: > > On Thu, Nov 16, 2017 at 6:53 AM, Andrew Dunstan > > wrote: > >> On 11/15/2017 04:30 PM, Tom Lane wrote: > >>> Andrew Dunstan writes: > On 11/15/2

Re: Treating work_mem as a shared resource (Was: Parallel Hash take II)

2017-11-16 Thread Serge Rielau
I have been pondering how to deal with work_mem for a couple of months myself and had very similar thoughts. As far as I can tell the problem goes beyond work_mem though: 1. There are several hash operations such as set-ops, hashed subplans, and hash aggregates which today are not spilling at al

_WINSOCK_DEPRECATED_NO_WARNINGS

2017-11-16 Thread Tom Lane
Checking the buildfarm to see if ed9b3606d broke anything, I notice that woodlouse is producing stacks of warnings like this: src/port/thread.c(134): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API wa

Re: pgsql: Disable installcheck tests for test_session_hooks

2017-11-16 Thread Andrew Dunstan
On 11/16/2017 09:14 AM, Ashutosh Sharma wrote: >> >> Just sending an updated patch to cope with the fact that this module >> does not need to define the EXTENSION and DATA fields, and does not >> need a sql and a control file.. > While running make check with 'session_hook_makefile_v2.patch' > ap

Re: [HACKERS] A weird bit in pg_upgrade/exec.c

2017-11-16 Thread Tom Lane
a.akent...@postgrespro.ru writes: > I see this bug is now fixed in pg_upgrade/exec.c => check_bin_dir(). > There's another bit exactly like that in check_data_dir() though. Oh, so there is ... and looking around, that seems to have been copied-and-pasted out of check_cluster_versions(), without a

Re: Schedule for migration to pglister

2017-11-16 Thread Justin Clift
On 2017-11-16 15:34, Stephen Frost wrote: Magnus, all, * Magnus Hagander (mag...@hagander.net) wrote: mbox access should now be restored, and as Stephen says, now handled by the Date in the message. Let me know if there are any issues with the new ones. (They're now generated by the same code

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 3:32 AM, Peter Moser wrote: > Thank you for your feedback. We'll have a look at this and come back to you. Another thing to think about is that even though the CURRENT implementation just rewrites the relevant constructs as SQL, in the future somebody might want to do some

Re: pspg - psql pager

2017-11-16 Thread Aaron W. Swenson
On 2017-11-15 10:41, Pavel Stehule wrote: > Hi > > I finished new pager, that can be interesting for postgresql expert users. > > It demonstrate some possibilities of TUI and I hope it shows some possible > directions of future possibilities of psql. > > It is available as rpm from our repositor

Re: Further simplification of c.h's #include section

2017-11-16 Thread Tom Lane
David Rowley writes: > On 16 November 2017 at 15:52, Tom Lane wrote: >> Anybody want to test this manually, or shall we just throw it into the >> buildfarm and see what blows up? > I don't have any cygwin around, but it compiles fine with the Visual > Studios 2012 toolchain. Thanks for testing!

Re: [HACKERS] Issues with logical replication

2017-11-16 Thread Robert Haas
On Wed, Nov 15, 2017 at 8:20 PM, Stas Kelvich wrote: > I did a sketch of first approach just to confirm that it solves the problem. > But there I hold ProcArrayLock during update of flag. Since only reader is > GetRunningTransactionData it possible to have a custom lock there. In > this case GetRu

Re: Schedule for migration to pglister

2017-11-16 Thread Stephen Frost
Magnus, all, * Magnus Hagander (mag...@hagander.net) wrote: > mbox access should now be restored, and as Stephen says, now handled by the > Date in the message. Let me know if there are any issues with the new ones. > (They're now generated by the same code as the per-thread ones). And just fyi,

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-16 Thread Robert Haas
On Thu, Nov 16, 2017 at 10:23 AM, Ants Aasma wrote: > For the Gather Merge driven by Parallel Index Scan case it seems to me > that the correct queue size is one that can store two index pages > worth of tuples. Additional space will always help buffer any > performance variations, but there shoul

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-16 Thread Ants Aasma
On Thu, Nov 16, 2017 at 6:42 AM, Robert Haas wrote: > The problem here is that we have no idea how big the queue needs to > be. The workers will always be happy to generate tuples faster than > the leader can read them, if that's possible, but it will only > sometimes help performance to let them

Re: Schedule for migration to pglister

2017-11-16 Thread Magnus Hagander
On Wed, Nov 15, 2017 at 5:05 PM, Noah Misch wrote: > On Wed, Nov 15, 2017 at 09:18:31AM -0500, Stephen Frost wrote: > > * Noah Misch (n...@leadboat.com) wrote: > > > When each list migrated, its mbox archives stopped receiving new > messages: > > > > This was actually anticipated, though we had b

pgMail 1.4 Released!

2017-11-16 Thread Branden R. Williams
Greetings all! Just a quick note to let you know I have updated and released a new version of pgMail for the community. The last time I posted to this list was in 2001, but not too much has changed! This little package gets tons of downloads and seems to be very helpful for those who want to be

Re: [HACKERS] Custom compression methods

2017-11-16 Thread Ildar Musin
Hi Ildus, On 14.11.2017 16:23, Ildus Kurbangaliev wrote: On Thu, 2 Nov 2017 15:28:36 +0300 Ildus Kurbangaliev wrote: On Tue, 12 Sep 2017 17:55:05 +0300 Ildus Kurbangaliev wrote: Attached rebased version of the patch. Added support of pg_dump, the code was simplified, and a separate cache

Re: [COMMITTERS] pgsql: Add hash partitioning.

2017-11-16 Thread amul sul
Thanks, Michael & Robert for your suggestions, and apologize for delayed response On Tue, Nov 14, 2017 at 6:02 AM, Michael Paquier wrote: > On Tue, Nov 14, 2017 at 3:59 AM, Robert Haas wrote: >> On Mon, Nov 13, 2017 at 3:24 AM, amul sul wrote: >>> Updated patch attached -- Adjusted code comment

Re: pgsql: Disable installcheck tests for test_session_hooks

2017-11-16 Thread Ashutosh Sharma
Hi Michael, On Thu, Nov 16, 2017 at 6:44 PM, Michael Paquier wrote: > > On Thu, Nov 16, 2017 at 3:45 PM, Michael Paquier > wrote: > > On Thu, Nov 16, 2017 at 11:41 AM, Tom Lane wrote: > >> Andrew Dunstan writes: > >>> Disable installcheck tests for test_session_hooks > >> > >> This seems not q

Re: test_session_hooks--1.0.sql file in 'test_session_hooks' needs correction

2017-11-16 Thread Ashutosh Sharma
On Thu, Nov 16, 2017 at 6:47 PM, Michael Paquier wrote: > On Thu, Nov 16, 2017 at 7:49 PM, Ashutosh Sharma > wrote: > > The test_session_hooks--1.0.sql file in the newly added > 'test_session_hooks' > > module suggests to load the extension named 'test_hook_session' instead > of > > 'test_sessio

Re: [HACKERS] Transaction control in procedures

2017-11-16 Thread Merlin Moncure
On Wed, Nov 15, 2017 at 3:42 PM, Peter Eisentraut wrote: > On 11/15/17 09:54, Merlin Moncure wrote: >> ... I noticed that: >> *) now() did not advance with commit and, >> *) xact_start via pg_stat_activity did not advance >> >> Shouldn't both of those advance with the in-loop COMMIT? > > I think y

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

2017-11-16 Thread Peter Eisentraut
On 11/14/17 03:55, Michael Paquier wrote: > On Tue, Oct 10, 2017 at 10:12 PM, Michael Paquier > wrote: >> Attached is a new patch set with the comments from above. On top of >> that, I have changed a couple of things: >> - 0001 is unchanged, still the same refactoring for the SSL tests. >> - 0002

Re: test_session_hooks--1.0.sql file in 'test_session_hooks' needs correction

2017-11-16 Thread Michael Paquier
On Thu, Nov 16, 2017 at 7:49 PM, Ashutosh Sharma wrote: > The test_session_hooks--1.0.sql file in the newly added 'test_session_hooks' > module suggests to load the extension named 'test_hook_session' instead of > 'test_session_hooks' and i think it needs to be corrected. Here are the > contents

Re: pgsql: Disable installcheck tests for test_session_hooks

2017-11-16 Thread Michael Paquier
On Thu, Nov 16, 2017 at 3:45 PM, Michael Paquier wrote: > On Thu, Nov 16, 2017 at 11:41 AM, Tom Lane wrote: >> Andrew Dunstan writes: >>> Disable installcheck tests for test_session_hooks >> >> This seems not quite right; it's causing warnings like this: >> >> $ make -s clean >> Makefile:25: war

RE: Re: User defined data types in Logical Replication

2017-11-16 Thread Huong Dangminh
Sawada-san, Thanks for your response. # And sorry again because I could not reply to your gmail # address from my environment due to security restriction. > >> We are getting the bellow error while trying use Logical Replication > >> with user defined data types in a C program (when call elog fu

Re: no library dependency in Makefile?

2017-11-16 Thread 高增琦
LDFLAGS in the example changed to: ''' override LDFLAGS := $(call expand_stlibs,$(STLIBS)) $(libpq_pgport) $(LDFLAGS) ''' 2017-11-16 20:50 GMT+08:00 高增琦 : > Is this a problem or not? > > > A simple fix: > 1. add a STLIBS variable in Makefiles as normal prerequisite >

Re: no library dependency in Makefile?

2017-11-16 Thread 高增琦
Is this a problem or not? A simple fix: 1. add a STLIBS variable in Makefiles as normal prerequisite 2. using GNU make's function to generate '-Lxxx -lxxx' for items in STLIBS For example: libpgfeutils.a in psql's Makefile:

Re: Further simplification of c.h's #include section

2017-11-16 Thread David Rowley
On 16 November 2017 at 19:14, Michael Paquier wrote: > On Thu, Nov 16, 2017 at 2:23 PM, David Rowley > wrote: >> I do get some warnings: >> >> (ClCompile target) -> >> src/test/modules/test_session_hooks/test_session_hooks.c(112): warning >> C4113: 'void (__cdecl *)()' differs in parameter list

Re: [HACKERS] Remove duplicate setting in test/recovery/Makefile

2017-11-16 Thread Masahiko Sawada
On Wed, Nov 8, 2017 at 10:46 AM, Michael Paquier wrote: > On Wed, Nov 8, 2017 at 10:38 AM, Masahiko Sawada > wrote: >> Hi, >> >> I found that EXTRA_INSTALL is doubly set at both top and bottom of the >> src/test/recovery/Makefile. Is it necessary? >> >> Attached patch fixes this. > > Indeed, the

Re: [HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-16 Thread Masahiko Sawada
On Thu, Nov 16, 2017 at 11:24 AM, Robert Haas wrote: > On Mon, Nov 13, 2017 at 3:25 AM, Masahiko Sawada > wrote: >> In ginInsertCleanup(), we lock the GIN meta page by LockPage and could >> wait for the concurrent cleaning up process if stats == NULL. And the >> source code comment says that thi

Re: [HACKERS] A weird bit in pg_upgrade/exec.c

2017-11-16 Thread a . akenteva
Tom Lane writes: Yeah, the way it is now seems outright broken. It will try to do get_bin_version on the new cluster before having done validate_exec there, violating its own comment. I think we should change this as a bug fix, independently of whatever else you had in mind to do here. I see

RE: Transaction control in procedures

2017-11-16 Thread legrand legrand
We are just opening the "close cursors on/at commit" specification ;o) - MS SQL server: cursor_close_on_commit - Firebird: close_cursors_at_commit - DB2: "with hold" syntax - ... I think it a plus to support keeping opened cursors at commit time, but impacts have to be checked in details ... Or

Typo in comment

2017-11-16 Thread Etsuro Fujita
Hi, Here is a patch for fixing a comment typo: s/datum1/datums1/. Best regards, Etsuro Fujita diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index 07fdf66..fa69995 100644 --- a/src/backend/catalog/partition.c +++ b/src/backend/catalog/partition.c @@ -2601,7 +2601,7

Re: [HACKERS] Issues with logical replication

2017-11-16 Thread Stas Kelvich
> On 15 Nov 2017, at 23:09, Robert Haas wrote: > > Ouch. This seems like a bug that needs to be fixed, but do you think > it's related to to Petr's proposed fix to set es_output_cid? That fix > looks reasonable, since we shouldn't try to lock tuples without a > valid CommandId. > > Now, havin

Re: [HACKERS] [PATCH] Generic type subscripting

2017-11-16 Thread Arthur Zakirov
On Wed, Nov 15, 2017 at 11:02:59PM +0100, Dmitry Dolgov wrote: > On the second thought, no, looks like I'm wrong and it should be like this. > The > reason is that any `fetch` function should be in form > > (container, internal) -> extracted value > > which means that we need to return an ext

Re: [HACKERS] Dynamic result sets from procedures

2017-11-16 Thread Daniel Verite
Peter Eisentraut wrote: > There is also one need error that needs further investigation. I've looked at this bit in the regression tests about \gexec: --- a/src/test/regress/expected/psql.out +++ b/src/test/regress/expected/psql.out @@ -232,11 +232,7 @@ union all select 'drop table gexe

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-16 Thread Masahiko Sawada
On Thu, Nov 16, 2017 at 1:11 PM, Michael Paquier wrote: > On Thu, Nov 16, 2017 at 10:57 AM, Masahiko Sawada > wrote: >> Agreed. Attached the updated patch, please review it. Thank you for the comment. > + /* > +* Quick exit if session is not keeping around a non-exclusive backup > +*

Re: [HACKERS] Inconsistencies between pg_settings and postgresql.conf

2017-11-16 Thread Adrian Escoms
Hi, It makes sense, so I attach the new diff without these lines. Thank you, Regards Adrián Escoms On Wed, Nov 15, 2017 at 10:30 PM, Robert Haas wrote: > On Wed, Sep 13, 2017 at 11:50 AM, Adrian Escoms > wrote: > > I realized that the parameter 'shared_preload_libraries' used to belong > to

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-11-16 Thread Thomas Munro
On Tue, Sep 19, 2017 at 12:39 AM, Oliver Ford wrote: > Attached is v2 of src, tests and docs. Doc patch is unchanged from v1. Since commit ef73a816, this patch causes make check to fail: too many parallel tests (more than 20) in schedule file "./parallel_schedule" -- Thomas Munro http://www.en

test_session_hooks--1.0.sql file in 'test_session_hooks' needs correction

2017-11-16 Thread Ashutosh Sharma
Hi All, The test_session_hooks--1.0.sql file in the newly added 'test_session_hooks' module suggests to load the extension named 'test_hook_session' instead of 'test_session_hooks' and i think it needs to be corrected. Here are the contents available in test_session_hooks--1.0.sql file. [ashu@lo

Re: [HACKERS] More stats about skipped vacuums

2017-11-16 Thread Kyotaro HORIGUCHI
Thank you for reviewing this. At Wed, 15 Nov 2017 16:13:01 +0900, Michael Paquier wrote in > pg_stat_get_mod_since_analyze(C.oid) AS n_mod_since_analyze, > + pg_stat_get_vacuum_necessity(C.oid) AS vacuum_required, > pg_stat_get_last_vacuum_time(C.oid) as last

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

2017-11-16 Thread Ideriha, Takeshi
Hi I’m sorry but I haven’t updated this patch for a half year. At the CF in last March I got some feedback and it takes some time for me to update my patch. So I closed this patch as ‘Returned with Feedback’. I’d like to update my patch and challenge CF again. Thank you very much for those who i

Re: [HACKERS] parallelize queries containing initplans

2017-11-16 Thread Kuntal Ghosh
On Thu, Nov 16, 2017 at 3:34 PM, Amit Kapila wrote: > On Wed, Nov 15, 2017 at 12:25 AM, Robert Haas wrote: >> On Tue, Nov 14, 2017 at 11:00 AM, Tom Lane wrote: >>> Yeah, I'm sure it is. I have a vague recollection that there might be >>> existing regression test cases exercising such things, th

  1   2   >