Re: Efficient output for integer types

2019-09-17 Thread David Fetter
On Wed, Sep 18, 2019 at 05:42:01AM +0200, David Fetter wrote: > On Tue, Sep 17, 2019 at 09:01:57AM +0200, David Fetter wrote: > > On Tue, Sep 17, 2019 at 08:55:05AM +0200, David Fetter wrote: > > > On Sun, Sep 15, 2019 at 09:18:49AM +0200, David Fetter wrote: > > > > Folks, > > > > > > > > Please

Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Fabien COELHO
Hello Erikjan, [pgbench-init-partitioned-9.patch] Turns out this patch needed a dos2unix treatment. It's easy to do but it takes time to figure it out (I'm dumb). I for one would be happy to receive patches not so encumbered :) AFAICR this is usually because your mailer does not

Re: [DOC] Document auto vacuum interruption

2019-09-17 Thread Amit Kapila
On Tue, Sep 17, 2019 at 5:48 PM James Coleman wrote: > > On Tue, Sep 17, 2019 at 2:21 AM Amit Kapila wrote: > > > > > > Let me know what you think of attached? I think we can back-patch > > this patch. What do you think? Does anyone else have an opinion on > > this patch especially if we see

Re: scorpionfly needs more semaphores

2019-09-17 Thread jungle boogie
Thus said Tom Lane on Wed, 18 Sep 2019 00:33:19 -0400 Thomas Munro writes: We're seeing occasional failures like this: running bootstrap script ... 2019-09-13 12:11:26.882 PDT [64926] FATAL: could not create semaphores: No space left on device 2019-09-13 12:11:26.882 PDT [64926] DETAIL:

Re: scorpionfly needs more semaphores

2019-09-17 Thread Tom Lane
Thomas Munro writes: > We're seeing occasional failures like this: > running bootstrap script ... 2019-09-13 12:11:26.882 PDT [64926] > FATAL: could not create semaphores: No space left on device > 2019-09-13 12:11:26.882 PDT [64926] DETAIL: Failed system call was > semget(5728001, 17, 03600).

Re: dropdb --force

2019-09-17 Thread Pavel Stehule
st 18. 9. 2019 v 5:59 odesílatel vignesh C napsal: > On Wed, Sep 18, 2019 at 8:30 AM Pavel Stehule > wrote: > > > > > Hi Pavel, > > One Comment: > In the documentation we say drop database will fail after 60 seconds > > FORCE > > > Attempt to terminate all existing

Re: range test for hash index?

2019-09-17 Thread Amit Kapila
On Mon, Sep 16, 2019 at 11:24 PM Paul A Jungwirth wrote: > > On Mon, Sep 16, 2019 at 5:28 AM Amit Kapila wrote: > > I don't see this function on the master branch. Is this function name > > correct? Are you looking at some different branch? > > Sorry about that! You're right, I was on my

Re: dropdb --force

2019-09-17 Thread vignesh C
On Wed, Sep 18, 2019 at 8:30 AM Pavel Stehule wrote: > > Hi Pavel, One Comment: In the documentation we say drop database will fail after 60 seconds FORCE Attempt to terminate all existing connections to the target database. This will fail, if current

Re: Efficient output for integer types

2019-09-17 Thread David Fetter
On Tue, Sep 17, 2019 at 09:01:57AM +0200, David Fetter wrote: > On Tue, Sep 17, 2019 at 08:55:05AM +0200, David Fetter wrote: > > On Sun, Sep 15, 2019 at 09:18:49AM +0200, David Fetter wrote: > > > Folks, > > > > > > Please find attached a couple of patches intended to $subject. > > > > > > This

Re: dropdb --force

2019-09-17 Thread Pavel Stehule
st 18. 9. 2019 v 4:57 odesílatel Pavel Stehule napsal: > > > st 18. 9. 2019 v 4:53 odesílatel Ryan Lambert > napsal: > >> Hi Pavel, >> I took a quick look through the patch, I'll try to build and test it >> tomorrow. >> >> >> --- a/src/include/nodes/parsenodes.h >> +++

Re: dropdb --force

2019-09-17 Thread Pavel Stehule
st 18. 9. 2019 v 4:53 odesílatel Ryan Lambert napsal: > Hi Pavel, > I took a quick look through the patch, I'll try to build and test it > tomorrow. > > > --- a/src/include/nodes/parsenodes.h > +++ b/src/include/nodes/parsenodes.h > @@ -3145,6 +3145,7 @@ typedef struct DropdbStmt > NodeTag type;

Re: dropdb --force

2019-09-17 Thread Ryan Lambert
Hi Pavel, I took a quick look through the patch, I'll try to build and test it tomorrow. --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -3145,6 +3145,7 @@ typedef struct DropdbStmt NodeTag type; char *dbname; /* database to drop */ bool missing_ok; /* skip error

Re: [HACKERS] CLUSTER command progress monitor

2019-09-17 Thread Michael Paquier
On Tue, Sep 17, 2019 at 10:50:22PM -0300, Alvaro Herrera wrote: > On 2019-Sep-18, Michael Paquier wrote: >> So, with the clock ticking and the release getting close by, what do >> we do for this set of issues? REINDEX, CREATE INDEX and CLUSTER all >> try to build indexes and the current

Re: Define jsonpath functions as stable

2019-09-17 Thread Jonathan S. Katz
On 9/17/19 10:00 PM, Chapman Flack wrote: > On 09/17/19 21:13, Jonathan S. Katz wrote: > >> to), which describes being able to use

Re: Define jsonpath functions as stable

2019-09-17 Thread Chapman Flack
On 09/17/19 21:13, Jonathan S. Katz wrote: > to), which describes being able to use

Re: [HACKERS] CLUSTER command progress monitor

2019-09-17 Thread Alvaro Herrera
On 2019-Sep-18, Michael Paquier wrote: > So, with the clock ticking and the release getting close by, what do > we do for this set of issues? REINDEX, CREATE INDEX and CLUSTER all > try to build indexes and the current infrastructure is not really > adapted to hold all that. Robert, Alvaro and

Re: pg_rewind docs correction

2019-09-17 Thread Michael Paquier
On Tue, Sep 17, 2019 at 08:38:18AM -0400, James Coleman wrote: > I don't agree that that's a valid equivalency. I myself spent a lot of > time trying to understand how this could possibly be true a while > back, and even looked at source code to be certain. I've asked other > people and found the

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2019-09-17 Thread Michael Paquier
On Tue, Sep 17, 2019 at 01:06:18PM +0900, Michael Paquier wrote: > On Tue, Sep 17, 2019 at 09:23:45AM +0530, Amit Kapila wrote: >> If you want to use the same size array, then you might want to just >> memset the previous array rather than first freeing it and then again >> allocating it. This is

Re: Compiler warnings with MinGW

2019-09-17 Thread Michael Paquier
On Tue, Sep 17, 2019 at 12:00:39PM +0200, Peter Eisentraut wrote: > committed Thanks, Peter. -- Michael signature.asc Description: PGP signature

Re: [HACKERS] CLUSTER command progress monitor

2019-09-17 Thread Michael Paquier
On Sat, Sep 14, 2019 at 11:45:47AM +0900, Michael Paquier wrote: > I have provided a short summary of the two issues on the open item > page (https://wiki.postgresql.org/wiki/PostgreSQL_12_Open_Items) as > the open item was too much evasive. Here is a copy-paste for the > archives of what I

PostgreSQL 12 RC1 + GA Dates

2019-09-17 Thread Michael Paquier
Hi all, Based on the current status of the open items and where we are at in the release cycle, the date for the first release candidate of PostgreSQL 12 will be 2019-09-26. If all goes well with RC1, the PostgreSQL 12.0 GA release will be 2019-10-03. This is subject to change if we find any

Re: refactoring - share str2*int64 functions

2019-09-17 Thread Michael Paquier
On Tue, Sep 17, 2019 at 11:29:13AM +0900, Michael Paquier wrote: > In order to unify the parsing interface and put all the conversion > routines in a single place, I still think that the patch has value so > I would still keep it (with a fix for the queryId parsing of course), > but there is much

Re: Define jsonpath functions as stable

2019-09-17 Thread Jonathan S. Katz
On 9/17/19 6:40 PM, Tom Lane wrote: > "Jonathan S. Katz" writes: >> v2 attached. Thanks! > > I whacked this around some (well, quite a bit actually); So I see :) Thanks. > notably, > I thought we'd better describe things that are in our engine but > not XQuery, as well as vice-versa. Yeah,

Re: subscriptionCheck failures on nightjar

2019-09-17 Thread Michael Paquier
On Tue, Sep 17, 2019 at 09:45:10PM +0200, Tomas Vondra wrote: > FWIW I agree with Andres that there probably is an actual bug. The file > should not just disappear like this, it's clearly unexpected so the > PANIC does not seem entirely inappropriate. Agreed. > I've tried reproducing the issue

scorpionfly needs more semaphores

2019-09-17 Thread Thomas Munro
Hi, We're seeing occasional failures like this: running bootstrap script ... 2019-09-13 12:11:26.882 PDT [64926] FATAL: could not create semaphores: No space left on device 2019-09-13 12:11:26.882 PDT [64926] DETAIL: Failed system call was semget(5728001, 17, 03600). I think you should switch

Re: Define jsonpath functions as stable

2019-09-17 Thread Tom Lane
"Jonathan S. Katz" writes: > v2 attached. Thanks! I whacked this around some (well, quite a bit actually); notably, I thought we'd better describe things that are in our engine but not XQuery, as well as vice-versa. After a re-read of the XQuery spec, it seems to me that the character entry

Re: Attempt to consolidate reading of XLOG page

2019-09-17 Thread Alvaro Herrera
I was confused by the struct name XLogSegment -- the struct is used to represent a WAL segment while it's kept open, rather than just a WAL segment in abstract. Also, now that we've renamed everything to use the term WAL, it seems wrong to use the name XLog for new structs. I propose the name

Re: some PostgreSQL 12 release notes comments

2019-09-17 Thread Jonathan S. Katz
On 9/17/19 4:10 PM, Peter Eisentraut wrote: > On 2019-09-17 21:55, Jonathan S. Katz wrote: >>> * Encrypted TCP/IP connections using GSSAPI encryption >> >> +1, though I would s/GSSAPI encryption/ with s/GSSAPI authentcation/ > > But you're not encrypting the communication using GSSAPI

Re: some PostgreSQL 12 release notes comments

2019-09-17 Thread Tom Lane
Peter Eisentraut writes: > * Add GSSAPI encryption support (Robbie Harwood, Stephen Frost) > This allows TCP/IP connections to be encrypted when using GSSAPI > authentication without having to set up a separate encryption facility > like SSL. Hmm, does that imply that you don't have to

Re: another look at macOS SIP

2019-09-17 Thread Tom Lane
Peter Eisentraut writes: > On 2019-09-17 21:43, Tom Lane wrote: >> Yeah, that's what I was suggesting. "Use another copy of Perl" doesn't >> seem like an acceptable answer, or at least it's hardly better than >> "turn off SIP". > In my mind, the Perl aspect of this is the most trivial part of

Re: Allow an alias to be attached directly to a JOIN ... USING

2019-09-17 Thread Peter Eisentraut
On 2019-09-17 19:37, Alvaro Herrera wrote: > On 2019-Aug-01, Thomas Munro wrote: > >> Indeed, that seems like a problem, and it's a good question. You can >> see this on unpatched master with SELECT x.filler FROM >> (pgbench_tellers AS t JOIN b USING (bid)) AS x. > > I'm not sure I understand

Re: another look at macOS SIP

2019-09-17 Thread Peter Eisentraut
On 2019-09-17 21:43, Tom Lane wrote: > Yeah, that's what I was suggesting. "Use another copy of Perl" doesn't > seem like an acceptable answer, or at least it's hardly better than > "turn off SIP". In my mind, the Perl aspect of this is the most trivial part of the problem. "brew install perl"

Re: ERROR: multixact X from before cutoff Y found to be still running

2019-09-17 Thread Bossart, Nathan
On 9/6/19, 10:26 AM, "Robert Haas" wrote: > On Thu, Sep 5, 2019 at 4:08 PM Bossart, Nathan wrote: >> Right, the v2 patch will effectively ramp-down the freezemin as your >> freeze_max_age gets smaller, while the v1 patch will set the effective >> freezemin to zero as soon as your multixact age

Re: some PostgreSQL 12 release notes comments

2019-09-17 Thread Peter Eisentraut
On 2019-09-17 21:55, Jonathan S. Katz wrote: >> * Encrypted TCP/IP connections using GSSAPI encryption > > +1, though I would s/GSSAPI encryption/ with s/GSSAPI authentcation/ But you're not encrypting the communication using GSSAPI authentication, you're encrypting it using GSSAPI encryption.

Re: Small const correctness patch

2019-09-17 Thread Peter Eisentraut
On 2019-08-08 08:46, Mark G wrote: > Please find attached a trivial patch making a few arrays const (in > addition to the data they point to). committed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

[WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from a REFCURSOR

2019-09-17 Thread Dent John
Hi folks,Prompted originally by a post by Roman Pekar [1], I wanted to share a revised version of a patch that allows REFCURSOR results to be consumed as data in a regular SQL query as well as my thoughts on how to improve the area as a whole.In order to be clear about the purpose and how I see it

Re: [HACKERS] Restricting maximum keep segments by repslots

2019-09-17 Thread Alvaro Herrera
Hello I have a couple of API-level reservation about this patch series. Firstly, "behind" when used as a noun refers to buttocks. Therefore, the ReplicationSlotsEnumerateBehinds function name seems funny (I think when used as a preposition you wouldn't put it in plural). I don't suggest a

Re: some PostgreSQL 12 release notes comments

2019-09-17 Thread Jonathan S. Katz
On 9/17/19 1:09 PM, Peter Eisentraut wrote: >> * Client- and server-side encryption for authentication using GSSAPI > > This is on the wire encryption, so I don't know why it says client-side > and server-side. Proposal: > > * Encrypted TCP/IP connections using GSSAPI encryption +1, though I

Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Erikjan Rijkers
On 2019-09-17 20:49, Fabien COELHO wrote: Attached v9: [pgbench-init-partitioned-9.patch] Turns out this patch needed a dos2unix treatment. It's easy to do but it takes time to figure it out (I'm dumb). I for one would be happy to receive patches not so encumbered :) thanks, Erik

Re: subscriptionCheck failures on nightjar

2019-09-17 Thread Tomas Vondra
On Tue, Sep 17, 2019 at 12:39:33PM -0400, Tom Lane wrote: Robert Haas writes: On Mon, Aug 26, 2019 at 9:29 AM Tomas Vondra wrote: This is one of the remaining open items, and we don't seem to be moving forward with it :-( Why exactly is this an open item, anyway? The reason it's still

Re: another look at macOS SIP

2019-09-17 Thread Tom Lane
Andres Freund writes: > On 2019-09-10 19:14:19 +0200, Peter Eisentraut wrote: >> There is a minor second issue, namely that /usr/bin/perl also filters >> out DYLD_* environment variables. This can be worked around again by >> using a third-party installation of Perl. > Hm, could we just have

Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Fabien COELHO
Attached v9: - remove the PART_UNKNOWN and use partitions = -1 to tell that there is an error, and partitions >= 1 to print info - use search_path to find at most one pgbench_accounts It still uses left join because I still think that it is appropriate. I added a lateral to avoid

Re: Implementing Incremental View Maintenance

2019-09-17 Thread Paul Draper
Have you had any thoughts for more than two joined tables? Either there needs to be an quadratic number of joins, or intermediate join results need to be stored and reused. On Tue, Sep 17, 2019 at 8:50 AM Yugo Nagata wrote: > Hi Paul, > > Thank you for your suggestion. > > On Sun, 15 Sep 2019

Re: Psql patch to show access methods info

2019-09-17 Thread Alvaro Herrera
It seems strange that there's a way to display AMs, and a way to display ops and procs in an opfamily; but there's no way to list what opfamilies exist (possibly given an AM as pattern). Should we add that too? We had \dAf in the original submission, but that seems to have lost along the way,

Re: Define jsonpath functions as stable

2019-09-17 Thread Jonathan S. Katz
On 9/17/19 12:09 PM, Erik Rijkers wrote: > On 2019-09-17 17:38, Jonathan S. Katz wrote: >> [regex.patch] Thanks for the review! > "Several other parts of the SQL standard > also define LIKE_REGEX equivalents that refer > to this implementation, including the > SQL/JSON path like_regex filter." >

Re: another look at macOS SIP

2019-09-17 Thread Andres Freund
Hi, On 2019-09-10 19:14:19 +0200, Peter Eisentraut wrote: > I think the way forward here is to get rid of all uses of system() for > calling between PostgreSQL programs. There are only a handful of those, > and we already have well-tested replacement code like spawn_process() in > pg_regress.c

Re: block-level incremental backup

2019-09-17 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Tue, Sep 17, 2019 at 12:09 PM Stephen Frost wrote: > > We need to be sure that we can detect if the WAL level has ever been set > > to minimal between a full and an incremental and, if so, either refuse > > to run the incremental, or

Re: Allow an alias to be attached directly to a JOIN ... USING

2019-09-17 Thread Alvaro Herrera
On 2019-Aug-01, Thomas Munro wrote: > Indeed, that seems like a problem, and it's a good question. You can > see this on unpatched master with SELECT x.filler FROM > (pgbench_tellers AS t JOIN b USING (bid)) AS x. I'm not sure I understand why that problem is a blocker for this patch. --

some PostgreSQL 12 release notes comments

2019-09-17 Thread Peter Eisentraut
> * Client- and server-side encryption for authentication using GSSAPI This is on the wire encryption, so I don't know why it says client-side and server-side. Proposal: * Encrypted TCP/IP connections using GSSAPI encryption in the major features section, and later * Add GSSAPI encryption

Re: Leakproofness of texteq()/textne()

2019-09-17 Thread Tom Lane
Peter Eisentraut writes: > On 2019-09-16 06:24, Tom Lane wrote: >> So it seems that the consensus is that it's okay to mark these >> functions leakproof, because if any of the errors they throw >> are truly reachable for other than data-corruption reasons, >> we would wish to try to prevent such

Re: block-level incremental backup

2019-09-17 Thread Robert Haas
On Tue, Sep 17, 2019 at 12:09 PM Stephen Frost wrote: > We need to be sure that we can detect if the WAL level has ever been set > to minimal between a full and an incremental and, if so, either refuse > to run the incremental, or promote it to a full, or make it a > checksum-based incremental

strong memory leak in plpgsql from handled rollback and lazy cast

2019-09-17 Thread Pavel Stehule
Hi When I tested some hypothesis I wrote buggy code. It was surprise how fast I lost all free memory do $$ begin for i in 1..300 loop begin -- do some error if i then end if; exception when others then -- do nothing end; end loop; end; $$; problem is

Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

2019-09-17 Thread Anastasia Lubennikova
16.09.2019 21:58, Peter Geoghegan wrote: On Mon, Sep 16, 2019 at 8:48 AM Anastasia Lubennikova wrote: I tested patch with nbtree_wal_test, and found out that the real issue is not the dedup WAL records themselves, but the full page writes that they trigger. Here are test results (config is

Re: subscriptionCheck failures on nightjar

2019-09-17 Thread Tom Lane
Robert Haas writes: > On Mon, Aug 26, 2019 at 9:29 AM Tomas Vondra > wrote: >> This is one of the remaining open items, and we don't seem to be moving >> forward with it :-( > Why exactly is this an open item, anyway? The reason it's still here is that Andres expressed a concern that there

Re: [PATCH][PROPOSAL] Add enum releation option type

2019-09-17 Thread Alvaro Herrera
I decided I didn't dislike that patch all that much anyway, so I cleaned it up a little bit and here's v8. The add_enum_reloption stuff is still broken. Please fix it and resubmit. I'm marking this Waiting on Author now. Thanks, -- Álvaro Herrerahttps://www.2ndQuadrant.com/

Re: Define jsonpath functions as stable

2019-09-17 Thread Erik Rijkers
On 2019-09-17 17:38, Jonathan S. Katz wrote: On 9/16/19 6:39 PM, Jonathan S. Katz wrote: [regex.patch] A few things/typos caught my eye: 1. 'implementation' seems the wrong word in sentence: "Several other parts of the SQL standard also define LIKE_REGEX equivalents that refer to this

Re: block-level incremental backup

2019-09-17 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Sep 16, 2019 at 3:38 PM Stephen Frost wrote: > > As discussed nearby, not everything that needs to be included in the > > backup is actually going to be in the WAL though, right? How would that > > ever be able to handle the case

pg_upgrade check fails on Solaris 10

2019-09-17 Thread Marina Polyakova
Hello, hackers! We got an error for pg_upgrade check on the branch REL_11_STABLE (commit 40ad4202513c72f5c1beeb03e26dfbc8890770c0) on Solaris 10 because IIUC the argument to the sed command is not enclosed in quotation marks (see [1]): $ gmake -C src/bin/pg_upgrade/ check <...> MAKE=gmake

Re: subscriptionCheck failures on nightjar

2019-09-17 Thread Robert Haas
On Mon, Aug 26, 2019 at 9:29 AM Tomas Vondra wrote: > This is one of the remaining open items, and we don't seem to be moving > forward with it :-( Why exactly is this an open item, anyway? I don't find any discussion on the thread which makes a clear argument that this problem originated with

Re: logical decoding : exceeded maxAllocatedDescs for .spill files

2019-09-17 Thread Andres Freund
Hi, On 2019-09-14 14:34:21 -0400, Tom Lane wrote: > Amit Khandekar writes: > > On Fri, 13 Sep 2019 at 22:01, Robert Haas wrote: > >> On Fri, Sep 13, 2019 at 12:14 PM Tom Lane wrote: > >>> Again, though, the advice that's been given here is that we should > >>> fix logical decoding to use the

Re: Define jsonpath functions as stable

2019-09-17 Thread Jonathan S. Katz
On 9/16/19 6:39 PM, Jonathan S. Katz wrote: > My main question is "where" -- I'm thinking somewhere in the JSON > path[2] section. After reading your email 3 times, I may have enough > knowledge to attempt some documentation on the regexp in JSON path. Here is said attempt to document. Notes: -

Re: Nondeterministic collations vs. text_pattern_ops

2019-09-17 Thread Tom Lane
Peter Eisentraut writes: > On 2019-09-17 01:13, Tom Lane wrote: >> Whilst poking at the leakproofness-of-texteq issue, I realized >> that there's an independent problem caused by the nondeterminism >> patch. To wit, that the text_pattern_ops btree opclass uses >> texteq as its equality operator,

Re: patch: psql - enforce constant width of last column

2019-09-17 Thread Pavel Stehule
út 17. 9. 2019 v 17:06 odesílatel Ahsan Hadi napsal: > Hi Pavel, > > I have been trying to reproduce the case of badly displaying last columns > of a query result-set. I played around with the legal values for psql > border variable but not able to find a case where last columns are badly >

Re: Feature request: binary NOTIFY

2019-09-17 Thread Pavel Stehule
út 17. 9. 2019 v 16:10 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > út 17. 9. 2019 v 10:01 odesílatel Mitar napsal: > >> I might have missed prior discussions about this, but I wonder if it > >> would be possible to support binary payloads for NOTIFY/LISTEN? Again > >> and again I

Re: patch: psql - enforce constant width of last column

2019-09-17 Thread Ahsan Hadi
Hi Pavel, I have been trying to reproduce the case of badly displaying last columns of a query result-set. I played around with the legal values for psql border variable but not able to find a case where last columns are badly displayed. Can you please share an example that I can use to reproduce

Re: block-level incremental backup

2019-09-17 Thread Robert Haas
On Mon, Sep 16, 2019 at 3:38 PM Stephen Frost wrote: > As discussed nearby, not everything that needs to be included in the > backup is actually going to be in the WAL though, right? How would that > ever be able to handle the case where someone starts the server under > wal_level = logical,

Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Amit Kapila
On Tue, Sep 17, 2019 at 6:38 PM Fabien COELHO wrote: > > > >> It is used at one place where we can set PART_NONE without much loss. > >> Having lesser invalid values makes code easier to follow. > > > > Looking more closely at this case: > > + else if (PQntuples(res) != 1) > > + { > > + /* unsure

Re: Feature request: binary NOTIFY

2019-09-17 Thread Tom Lane
Pavel Stehule writes: > út 17. 9. 2019 v 10:01 odesílatel Mitar napsal: >> I might have missed prior discussions about this, but I wonder if it >> would be possible to support binary payloads for NOTIFY/LISTEN? Again >> and again I find it very limiting with just text (have to base64 >> encode

Re: [proposal] de-TOAST'ing using a iterator

2019-09-17 Thread Tomas Vondra
On Mon, Sep 16, 2019 at 06:22:51PM -0300, Alvaro Herrera wrote: On 2019-Sep-10, Binguo Bao wrote: +/* + * Support for de-TOASTing toasted value iteratively. "need" is a pointer + * between the beginning and end of iterator's ToastBuffer. The marco + * de-TOAST all bytes before "need" into

Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Fabien COELHO
Hello Amit, Why can't we change it as attached? I think that your version works, but I do not like much the condition for the normal case which is implicitely assumed. The solution I took has 3 clear-cut cases: 1 error against a server without partition support, detect multiple

Re: range test for hash index?

2019-09-17 Thread Mahendra Singh
Hello, I've done some code coverage testing by running make check-world. It doesn't show any difference in the test coverage. The patch looks good to me. -- Thanks & Regards, Mahendra Thalor EnterpriseDB: http://www.enterprisedb.com

Re: ICU for global collation

2019-09-17 Thread Daniel Verite
Hi, When trying databases defined with ICU locales, I see that backends that serve such databases seem to have their LC_CTYPE inherited from the environment (as opposed to a per-database fixed value). That's a problem for the backend code that depends on libc functions that themselves depend on

Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Fabien COELHO
Hello Amit, One more comment: +typedef enum { PART_NONE, PART_RANGE, PART_HASH, PART_UNKNOWN } + partition_method_t; See, if we can eliminate PART_UNKNOWN. I'm not very happy with this one, but I wanted to differentiate "we do know that it is not partitioned" from "we do not know if it

Re: pg_rewind docs correction

2019-09-17 Thread James Coleman
On Tue, Sep 17, 2019 at 3:51 AM Michael Paquier wrote: > > On Sun, Sep 15, 2019 at 10:36:04AM -0400, James Coleman wrote: > > On Sun, Sep 15, 2019 at 10:25 AM Michael Paquier > > wrote: > >> +The rewind operation is not expected to result in a consistent data > >> +directory state

Re: [DOC] Document auto vacuum interruption

2019-09-17 Thread James Coleman
On Tue, Sep 17, 2019 at 2:21 AM Amit Kapila wrote: > > On Fri, Sep 13, 2019 at 11:59 PM James Coleman wrote: > > > > On Sat, Aug 31, 2019 at 10:51 PM Amit Kapila > > wrote: > > > > > > > Updated patch attached. I changed the wording to be about conflicting > > locks rather than a single lock

Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Amit Kapila
On Tue, Sep 17, 2019 at 4:24 PM Amit Kapila wrote: > > On Sat, Sep 14, 2019 at 6:35 PM Fabien COELHO wrote: > > One more comment: > +typedef enum { PART_NONE, PART_RANGE, PART_HASH, PART_UNKNOWN } > + partition_method_t; > > See, if we can eliminate PART_UNKNOWN. I don't see much use of same.

Re: progress report for ANALYZE

2019-09-17 Thread vignesh C
On Thu, Sep 5, 2019 at 2:31 AM Alvaro Herrera wrote: > > There were some minor problems in v5 -- bogus Docbook as well as > outdated rules.out, small "git diff --check" complaint about whitespace. > This v6 (on today's master) fixes those, no other changes. > + + The command is

Re: dropdb --force

2019-09-17 Thread Pavel Stehule
Hi I started work on this patch. I changed syntax to DROP DATABASE [ ( FORCE , ..) ] [IF EXISTS ...] and now I try to fix all other points from Tom's list út 17. 9. 2019 v 12:15 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > [ drop-database-force-20190708.patch ] > > I took a brief

Re: Support for CALL statement in ecpg

2019-09-17 Thread Ashutosh Sharma
On Tue, Sep 17, 2019 at 1:06 PM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > I don't find this patch in any commit fest. Seems like a good addition. > Thanks for the consideration. Will add an entry for it in the commit fest. -- With Regards, Ashutosh Sharma

About copy to view

2019-09-17 Thread Jinhua Luo
Hi, Why view needs instead of trigger to be the target of "copy to"? With default view rule, the insert would be successful, so it should also works for copy. The reason to ask this question is I need to "copy to" the view using "replica" session role. But instead of trigger on view could not be

pause recovery if pitr target not reached

2019-09-17 Thread Leif Gunnar Erlandsen
This patch allows PostgreSQL to pause recovery before PITR target is reached if recovery_target_time is specified. Missing WAL's could then be restored from backup and applied on next restart. Today PostgreSQL opens the database in read/write on a new timeline even when PITR tareg is not

Re: psql - improve test coverage from 41% to 88%

2019-09-17 Thread vignesh C
On Thu, Sep 12, 2019 at 4:49 PM Fabien COELHO wrote: > > > >> Here is a v5. > > > Few more in icommand_checks subroutine: > > Few unwanted code can be removed. > > Indeed, more debug and test code. > > Attached v6 fixes these, and I checked for remaining scrubs without > finding any. > Few

Re: Zedstore - compressed in-core columnar storage

2019-09-17 Thread Ashutosh Sharma
On Thu, Aug 29, 2019 at 5:39 PM Heikki Linnakangas wrote: > > On 29/08/2019 14:30, Ashutosh Sharma wrote: > > > > On Wed, Aug 28, 2019 at 5:30 AM Alexandra Wang > > wrote: > > > > You are correct that we currently go through each item in the leaf > > page that >

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2019-09-17 Thread Surafel Temesgen
Hi Alexey Here are a few comment On Sat, Aug 31, 2019 at 11:54 PM wrote: > Hi hackers, > > > Anyway, new patch, which adds SET TABLESPACE to REINDEX is attached and > this functionality seems really useful, so I will be very appreciate if > someone will take a look on it. > * There are NOWAIT

Re: pgbench - allow to create partitioned tables

2019-09-17 Thread Amit Kapila
On Sat, Sep 14, 2019 at 6:35 PM Fabien COELHO wrote: > I'm ensuring that there is always a one line answer, whether it is > partitioned or not. Maybe the count(*) should be count(something in p) to > get 0 instead of 1 on non partitioned tables, though, but this is hidden > in

Re: Psql patch to show access methods info

2019-09-17 Thread vignesh C
On Sat, Sep 14, 2019 at 1:45 PM Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > > On Sat, Sep 14, 2019 at 10:39 AM Alexander Korotkov > wrote: > > On Sat, Sep 14, 2019 at 12:36 AM Alvaro Herrera > > wrote: > > > On 2019-Aug-06, Alexander Korotkov wrote: > > > > > > > Revised patch is

Re: Implementing Incremental View Maintenance

2019-09-17 Thread Yugo Nagata
Hi Paul, Thank you for your suggestion. On Sun, 15 Sep 2019 11:52:22 -0600 Paul Draper wrote: > As I understand it, the current patch performs immediate IVM using AFTER > STATEMENT trigger transition tables. > > However, multiple tables can be modified *before* AFTER STATEMENT triggers > are

Re: Compiler warnings with MinGW

2019-09-17 Thread Peter Eisentraut
On 2019-09-09 14:24, Magnus Hagander wrote: > On Sat, Sep 7, 2019 at 4:58 AM Michael Paquier > wrote: > > On Sat, Sep 07, 2019 at 12:11:25AM +0200, Peter Eisentraut wrote: > > I'm not sure exactly what the upstream of mingw is these days, but I > > think

Re: block-level incremental backup

2019-09-17 Thread Amit Kapila
On Mon, Sep 16, 2019 at 7:00 PM Robert Haas wrote: > > On Mon, Sep 16, 2019 at 4:31 AM Amit Kapila wrote: > > This seems to be a blocking problem for the LSN based design. > > Well, only the simplest version of it, I think. > > > Can we think of using creation time for file? Basically, if the

Re: block-level incremental backup

2019-09-17 Thread Amit Kapila
On Mon, Sep 16, 2019 at 11:09 PM Stephen Frost wrote: > > Greetings, > > * Robert Haas (robertmh...@gmail.com) wrote: > > On Mon, Sep 16, 2019 at 9:30 AM Robert Haas wrote: > > > > Isn't some operations where at the end we directly call heap_sync > > > > without writing WAL will have a similar

Re: using explicit_bzero

2019-09-17 Thread Peter Eisentraut
On 2019-09-09 17:18, Andres Freund wrote: > I think all this implementation actually guarantees is that bzero2 is > read, but not that the copy is not elided. In practice that's *probably* > good enough, but a compiler could just check whether bzero_p points to > memset. Are you saying that the

Re: Pulling up direct-correlated ANY_SUBLINK

2019-09-17 Thread Richard Guo
On Thu, Sep 12, 2019 at 11:35 PM Antonin Houska wrote: > Richard Guo wrote: > > > On Wed, Sep 11, 2019 at 3:25 PM Antonin Houska > > wrote: > > > > > > Nevertheless, I don't know how to overcome the problems that I > > mentioned > > upthread. > > > > > > Do you mean the problem

Re: Nondeterministic collations vs. text_pattern_ops

2019-09-17 Thread Peter Eisentraut
On 2019-09-17 01:13, Tom Lane wrote: > Whilst poking at the leakproofness-of-texteq issue, I realized > that there's an independent problem caused by the nondeterminism > patch. To wit, that the text_pattern_ops btree opclass uses > texteq as its equality operator, even though that operator is >

Re: Feature request: binary NOTIFY

2019-09-17 Thread Pavel Stehule
Hi út 17. 9. 2019 v 10:01 odesílatel Mitar napsal: > Hi! > > I might have missed prior discussions about this, but I wonder if it > would be possible to support binary payloads for NOTIFY/LISTEN? Again > and again I find it very limiting with just text (have to base64 > encode data, or convert

Feature request: binary NOTIFY

2019-09-17 Thread Mitar
Hi! I might have missed prior discussions about this, but I wonder if it would be possible to support binary payloads for NOTIFY/LISTEN? Again and again I find it very limiting with just text (have to base64 encode data, or convert it to JSON). Mitar -- http://mitar.tnode.com/

Re: pg_rewind docs correction

2019-09-17 Thread Michael Paquier
On Sun, Sep 15, 2019 at 10:36:04AM -0400, James Coleman wrote: > On Sun, Sep 15, 2019 at 10:25 AM Michael Paquier wrote: >> +The rewind operation is not expected to result in a consistent data >> +directory state either internally to the node or with respect to the >> rest >> +of the

Re: [PATCH] Improve performance of NOTIFY over many databases (v2)

2019-09-17 Thread Martijn van Oosterhout
Hoi Tom, On Mon, 16 Sep 2019 at 15:33, Tom Lane wrote: > > Martijn van Oosterhout writes: > > I think I like the idea of having SignalBackend do the waking up a > > slow backend but I'm not enthused by the "lets wake up (at once) > > everyone that is behind". That's one of the issues I was

Re: Support for CALL statement in ecpg

2019-09-17 Thread Peter Eisentraut
I don't find this patch in any commit fest. Seems like a good addition. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Leakproofness of texteq()/textne()

2019-09-17 Thread Peter Eisentraut
On 2019-09-16 06:24, Tom Lane wrote: > So it seems that the consensus is that it's okay to mark these > functions leakproof, because if any of the errors they throw > are truly reachable for other than data-corruption reasons, > we would wish to try to prevent such errors. (Maybe through >

Re: Add "password_protocol" connection parameter to libpq

2019-09-17 Thread Michael Paquier
On Sat, Sep 14, 2019 at 08:42:53AM -0700, Jeff Davis wrote: > On Fri, 2019-09-06 at 16:05 +0900, Michael Paquier wrote: >> Actually, it looks that the handling of channel_bound is incorrect. >> If the server sends AUTH_REQ_SASL and libpq processes it, then the >> flag gets already set. Now let's

  1   2   >