Re: [HACKERS] Speedup twophase transactions

2017-03-17 Thread Michael Paquier
On Fri, Mar 17, 2017 at 5:00 PM, Nikhil Sontakke wrote: >> > >> > Ok, we can do that and then yes, RecoverPreparedTransaction() can just >> > have >> > one loop going through the shmem entries. BUT, we cannot ignore >> > "inredo"+"ondisk" entries. For such entries, we

Re: [HACKERS] pg_ls_waldir() & pg_ls_logdir()

2017-03-17 Thread Dave Page
On Thu, Mar 16, 2017 at 7:05 PM, Robert Haas wrote: > On Thu, Mar 16, 2017 at 6:09 AM, Dave Page wrote: >> Hmm, good point. Google seems to be saying there isn't one. Patch >> updated as you suggest (and I've added back in a function declaration >> that

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-17 Thread Fabien COELHO
Hello Corey & Tom, What is not done: - skipped slash commands still consume the rest of the line That last part is big, to quote Tom: * More generally, I do not think that the approach of having exec_command simply fall out immediately when in a false branch is going to work, because it

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

2017-03-17 Thread Kyotaro HORIGUCHI
Hello, At Mon, 13 Mar 2017 11:06:00 +1100, Venkata B Nagothi wrote in > On Tue, Jan 17, 2017 at 9:36 PM, Kyotaro HORIGUCHI < > horiguchi.kyot...@lab.ntt.co.jp> wrote: > > I managed to reproduce this. A

Re: [HACKERS] Speedup twophase transactions

2017-03-17 Thread Michael Paquier
On Fri, Mar 17, 2017 at 4:42 PM, Nikhil Sontakke wrote: >> > >> > I don't think this will work. We cannot replace pg_twophase with shmem >> > entries + WAL pointers. This is because we cannot expect to have WAL >> > entries >> > around for long running prepared queries

Re: [HACKERS] asynchronous execution

2017-03-17 Thread Kyotaro HORIGUCHI
At Thu, 16 Mar 2017 17:16:32 -0400, Corey Huinker wrote in

[HACKERS] Re: Authentication tests, and plain 'password' authentication with a SCRAM verifier

2017-03-17 Thread Heikki Linnakangas
On 03/14/2017 03:43 PM, Michael Paquier wrote: + /* +* The password looked like a SCRAM verifier, but could not be +* parsed. +*/ + elog(LOG, "invalid SCRAM verifier for user \"%s\"", username); This would be sent back to the client, no? I think that you

Re: [HACKERS] Monitoring roles patch

2017-03-17 Thread Dave Page
Hi On Thu, Mar 16, 2017 at 7:04 PM, Denish Patel wrote: > Hi Dave, > > The patch failed applied... > > patch -p1 < /home/vagrant/pg_monitor.diff > patching file contrib/pg_buffercache/Makefile > patching file contrib/pg_buffercache/pg_buffercache--1.2--1.3.sql >

Re: [HACKERS] [patch] reorder tablespaces in basebackup tar stream for backup_label

2017-03-17 Thread Michael Banck
Hi, Am Freitag, den 17.03.2017, 10:50 +0900 schrieb Michael Paquier: > The comment block format is incorrect. I would think as well that this > comment should say it is important to have the main tablespace listed > last it includes the WAL segments, and those need to contain all the > latest WAL

Re: [HACKERS] WAL Consistency checking for hash indexes

2017-03-17 Thread Amit Kapila
On Fri, Mar 17, 2017 at 12:30 PM, Ashutosh Sharma wrote: > On Fri, Mar 17, 2017 at 9:03 AM, Amit Kapila wrote: >> On Thu, Mar 16, 2017 at 1:15 PM, Ashutosh Sharma >> wrote: >>> Hi, >>> >>> Attached is the patch that allows

Re: [HACKERS] scram and \password

2017-03-17 Thread Heikki Linnakangas
On 03/17/2017 02:01 PM, Robert Haas wrote: On Thu, Mar 16, 2017 at 11:38 PM, Michael Paquier wrote: At least this has the merit of making \password simpler from psql without a kind of --method option: if the backend is 9.6 or older, just generate a MD5-hash, and

[HACKERS] Re: [BUGS] Problem in using pgbench's --connect(-C) and --rate=rate(-R rate) options together.

2017-03-17 Thread David Steele
On 3/17/17 2:08 AM, Fabien COELHO wrote: > > Hello David, > >>> Repost from bugs. >> >> This patch does not apply at cccbdde: > > Indeed. It should not. The fix is for the 9.6 branch. The issue has been > fixed by some heavy but very welcome restructuring in master. Whoops, sorry about that!

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-17 Thread Amit Kapila
On Fri, Mar 17, 2017 at 12:27 PM, Ashutosh Sharma wrote: > On Fri, Mar 17, 2017 at 8:20 AM, Amit Kapila wrote: > > As I said in my previous e-mail, I think you need >> to record clearing of this flag in WAL record XLOG_HASH_DELETE as you >> are not

Re: [HACKERS] BRIN cost estimate

2017-03-17 Thread Emre Hasegeli
> 1. > > + Assert(nnumbers == 1); > > I think its a bad idea to Assert() this. The stat tuple can come from > a plugin which could do anything. Seems like if we need to be certain > of that then it should be an elog(ERROR), maybe mention that we > expected a 1 element array, but got elements.

Re: [HACKERS] Radix tree for character conversion

2017-03-17 Thread Heikki Linnakangas
On 03/17/2017 07:19 AM, Kyotaro HORIGUCHI wrote: At Mon, 13 Mar 2017 21:07:39 +0200, Heikki Linnakangas wrote in Hmm. A somewhat different approach might be more suitable for testing across versions, though. We could modify the

Re: [HACKERS] UPDATE of partition key

2017-03-17 Thread Amit Khandekar
I haven't yet handled all points, but meanwhile, some of the important points are discussed below ... On 6 March 2017 at 15:11, Amit Langote wrote: > >>> But that starts to sound less attractive when one realizes that >>> that will occur for every row that wants to

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-17 Thread Daniel Verite
Tom Lane wrote: > OT_WHOLE_LINE is not what you want because that results in verbatim > copying, without variable expansion or anything But if we want to implement "\if defined :foo" in the future isn't it just what we need? Also we could leave open the option to accept an SQL

[HACKERS] Re: Authentication tests, and plain 'password' authentication with a SCRAM verifier

2017-03-17 Thread Michael Paquier
On Fri, Mar 17, 2017 at 6:40 PM, Heikki Linnakangas wrote: > Committed, thanks. Thanks for the commit. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Two phase commit in ECPG

2017-03-17 Thread Kuntal Ghosh
On Fri, Mar 17, 2017 at 4:34 PM, Masahiko Sawada wrote: > On Fri, Mar 17, 2017 at 12:17 PM, Kuntal Ghosh > wrote: >> On Tue, Mar 14, 2017 at 1:35 AM, Michael Meskes >> wrote: Previous 002 patch lacked to add

Re: [HACKERS] [patch] reorder tablespaces in basebackup tar stream for backup_label

2017-03-17 Thread Michael Paquier
On Fri, Mar 17, 2017 at 7:18 PM, Michael Banck wrote: > Hi, > > Am Freitag, den 17.03.2017, 10:50 +0900 schrieb Michael Paquier: >> The comment block format is incorrect. I would think as well that this >> comment should say it is important to have the main tablespace

Re: [HACKERS] increasing the default WAL segment size

2017-03-17 Thread Robert Haas
On Fri, Mar 17, 2017 at 2:08 AM, Beena Emerson wrote: > The option was intended to only accept values in MB as the original config > --with-wal-segsize option, unfortunately, the patch does not throw error as > in the config option when the units are specified. Yeah,

Re: [HACKERS] [POC] hash partitioning

2017-03-17 Thread Yugo Nagata
On Tue, 14 Mar 2017 10:08:14 -0400 David Steele wrote: > Please post an explanation for the delay and a schedule for the new > patch. If no patch or explanation is posted by 2017-03-17 AoE I will > mark this submission "Returned with Feedback". I am sorry for my late

Re: [HACKERS] scram and \password

2017-03-17 Thread Robert Haas
On Thu, Mar 16, 2017 at 11:38 PM, Michael Paquier wrote: > On Thu, Mar 16, 2017 at 10:52 PM, Heikki Linnakangas wrote: >> On 03/14/2017 11:14 PM, Tom Lane wrote: >>> >>> In short, I don't think that argument refutes my position that "md5" >>> in

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-17 Thread Erik Rijkers
On 2017-03-17 02:28, Corey Huinker wrote: Attached is the latest work. Not everything is done yet. I post it because 0001.if_endif.v23.diff This patch does not compile for me (gcc 6.3.0): command.c:38:25: fatal error: conditional.h: No such file or directory #include "conditional.h"

Re: [HACKERS] Two phase commit in ECPG

2017-03-17 Thread Masahiko Sawada
On Fri, Mar 17, 2017 at 12:17 PM, Kuntal Ghosh wrote: > On Tue, Mar 14, 2017 at 1:35 AM, Michael Meskes wrote: >>> Previous 002 patch lacked to add describing PREPARE TRANSACTION. >>> Attached updated 002 patch. >> >> I just committed both

Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional

2017-03-17 Thread David Steele
On 3/17/17 4:18 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tsunakawa, >> Takayuki >> I made this ready for committer. The patch applied except for catversion.h, >> the patch content looks good, and the

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-17 Thread Tom Lane
Fabien COELHO writes: > ISTM that I've tried to suggest to work around that complexity by: > - document that \if-related commands should only occur at line start > (and extend to eol). > - detect and complain when this is not the case. I think this is a lousy

Re: [HACKERS] [PATCH] Remove defunct and unnecessary link

2017-03-17 Thread Robert Haas
On Thu, Mar 16, 2017 at 6:30 PM, David Christensen wrote: > The HA docs reference a “glossary” link which is no longer accessible, nor is > it likely to be useful in general to link off-site IMHO. This simple patch > removes this link. Committed and back-patched. Thanks.

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-17 Thread David Steele
On 3/15/17 1:56 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of David Steele >> Sure, but having the private key may allow them to get new data from the >> server as well as the data from the backup. > > You are

[HACKERS] Guidelines for GSoC student proposals

2017-03-17 Thread Kevin Grittner
I've found various sources that give hints about what a student proposal should look like, but nothing I could just give as a link, so I pulled together what I could find, tempered by my own ideas and opinions. I suggest that we send the below, or something like it to each student who expresses

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2017-03-17 Thread Robert Haas
On Thu, Mar 16, 2017 at 10:21 PM, Michael Paquier wrote: > On Fri, Mar 17, 2017 at 11:17 AM, Robert Haas wrote: >> I understand that the point of renaming pg_clog to pg_xact is that >> pg_clog contains the dreaded letters l-o-g, which we

Re: [HACKERS] scram and \password

2017-03-17 Thread Robert Haas
On Fri, Mar 17, 2017 at 8:32 AM, Heikki Linnakangas wrote: > It would make sense to have \password obey password_encryption GUC. Then > \password and ALTER USER would do the same thing, which would be less > surprising. Although it's also a bit weird for a GUC to affect

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-17 Thread Tom Lane
"Daniel Verite" writes: > Tom Lane wrote: >> OT_WHOLE_LINE is not what you want because that results in verbatim >> copying, without variable expansion or anything > But if we want to implement "\if defined :foo" in the future > isn't it just what we need? I don't

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-17 Thread David Steele
On 3/15/17 3:00 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of David Steele >>> But it might be worth thinking about whether we want to encourage >>> people to do manual chmod's at all; that's fairly easy to get

Re: [HACKERS] wait events for disk I/O

2017-03-17 Thread Rushabh Lathia
Thanks Robert for the review. On Thu, Mar 16, 2017 at 8:05 PM, Robert Haas wrote: > On Thu, Mar 16, 2017 at 8:28 AM, Rahila Syed > wrote: > > Thank you for the updated patch. > > > > I have applied and tested it on latest sources and the patch

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-03-17 Thread David Steele
On 3/17/17 3:58 AM, Kyotaro HORIGUCHI wrote: > At Mon, 13 Mar 2017 10:42:05 -0400, David Steele wrote > in <1e8297fd-f7f2-feab-848d-5121e45c8...@pgmasters.net> >> It has been a while since this thread has received any comments or a new >> patch. The general consensus seems

Re: [HACKERS] [PATCH] ALTER DEFAULT PRIVILEGES with GRANT/REVOKE ON SCHEMAS

2017-03-17 Thread David Steele
On 3/13/17 11:15 AM, David Steele wrote: > Hi Matheus, > > On 3/2/17 8:27 AM, David Steele wrote: >> On 1/18/17 7:18 PM, Petr Jelinek wrote: >>> >>> The patch looks good, the only thing I am missing is tab completion >>> support for psql. >> >> It looks like this patch is still waiting on an

Re: [HACKERS] scram and \password

2017-03-17 Thread Tom Lane
Robert Haas writes: > On Fri, Mar 17, 2017 at 8:32 AM, Heikki Linnakangas wrote: >> It would make sense to have \password obey password_encryption GUC. Then >> \password and ALTER USER would do the same thing, which would be less >> surprising. Although

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2017-03-17 Thread Michael Paquier
On Fri, Mar 17, 2017 at 10:58 PM, Robert Haas wrote: > Fine! I've committed the pg_clog renaming, but I'd really like to > draw the line here. I'm not going to commit the pg_subtrans -> > pg_subxact naming and am -1 on anyone else doing so. I think that > having the

<    1   2