Re: [HACKERS] Index created in BEFORE trigger not updated during INSERT

2017-06-03 Thread Michael Paquier
On Sun, Jun 4, 2017 at 7:23 AM, Tom Lane wrote: > I'm unsure whether to back-patch or not; the main argument for not doing > so is that if any extensions are calling DefineIndex() directly, this > would be an API break for them. Given what a weird case this is, I'm not > sure

Re: [HACKERS] Why does logical replication launcher set application_name?

2017-06-03 Thread Michael Paquier
On Sat, Jun 3, 2017 at 4:33 PM, Kuntal Ghosh wrote: > On Sat, Jun 3, 2017 at 2:14 AM, Petr Jelinek > wrote: >> However, I am not sure about the bgw_name_extra. I think I would have >> preferred keeping full bgw_name field which would be

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-06-02 Thread Michael Paquier
On Fri, Jun 2, 2017 at 2:21 PM, Noah Misch <n...@leadboat.com> wrote: > On Tue, May 30, 2017 at 11:13:37AM -0700, Michael Paquier wrote: >> On Tue, May 30, 2017 at 11:09 AM, Peter Eisentraut >> <peter.eisentr...@2ndquadrant.com> wrote: >> > I don't think th

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

2017-06-01 Thread Michael Paquier
On Fri, Jun 2, 2017 at 10:08 AM, Stephen Frost wrote: > What I find somewhat objectionable is the notion that if we don't have 5 > different TLS/SSL implementations supported in PG and that we've tested > that channel binding works correctly among all combinations of all of >

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-06-01 Thread Michael Paquier
On Fri, Jun 2, 2017 at 9:29 AM, Andres Freund <and...@anarazel.de> wrote: > On 2017-06-02 08:38:51 +0900, Michael Paquier wrote: >> On Fri, Jun 2, 2017 at 7:05 AM, Andres Freund <and...@anarazel.de> wrote: >> > I'm a unhappy how this is reusing SIGINT for WalSndLastC

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-06-01 Thread Michael Paquier
On Fri, Jun 2, 2017 at 7:05 AM, Andres Freund wrote: > I'm a unhappy how this is reusing SIGINT for WalSndLastCycleHandler. > Normally INT is used cancel interrupts, and since walsender is now also > working as a normal backend, this overlap is bad. Even for plain > walsender

Re: [HACKERS] TAP: allow overriding PostgresNode in get_new_node

2017-06-01 Thread Michael Paquier
On Wed, May 31, 2017 at 7:18 PM, Craig Ringer wrote: > Note that you can achieve the same effect w/o patching > PostgresNode.pm, albeit in a somewhat ugly manner, by re-blessing the > returned object. > > sub get_new_mywhatever_node { > my $self =

Re: [HACKERS] Error while creating subscription when server is running in single user mode

2017-06-01 Thread Michael Paquier
On Wed, May 31, 2017 at 10:49 PM, Dilip Kumar <dilipbal...@gmail.com> wrote: > On Wed, May 31, 2017 at 2:20 PM, Michael Paquier > <michael.paqu...@gmail.com> wrote: >> Yeah, see 0e0f43d6 for example. A simple fix is to look at >> IsUnderPostmaster when creating, alter

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

2017-05-31 Thread Michael Paquier
On Tue, May 30, 2017 at 6:50 PM, Álvaro Hernández Tortosa wrote: > Actually this Python patch seems to ultimately rely on the same OpenSSL > functions as your implementation. Yup. My point is that even if those APIs are undocumented, I think that they are not going to

Re: [HACKERS] Re: [GENERAL] pg_basebackup error: replication slot "pg_basebackup_2194" already exists

2017-05-31 Thread Michael Paquier
On Wed, May 31, 2017 at 11:18 AM, Andres Freund wrote: > On 2017-05-31 18:22:18 +0200, Magnus Hagander wrote: >> However, the client can't access the pid of the server as it is now, >> and its the client that has to create the name. > > I don't think that's actually true?

Re: [HACKERS] Error while creating subscription when server is running in single user mode

2017-05-31 Thread Michael Paquier
On Wed, May 31, 2017 at 7:01 AM, Dilip Kumar wrote: > On Wed, May 31, 2017 at 7:54 AM, tushar wrote: >> centos@centos-cpula bin]$ ./postgres --single postgres -D m1data >> PostgreSQL stand-alone backend 10beta1 >> backend> create subscription

Re: [HACKERS] Re: [GENERAL] pg_basebackup error: replication slot "pg_basebackup_2194" already exists

2017-05-31 Thread Michael Paquier
On Wed, May 31, 2017 at 9:22 AM, Magnus Hagander wrote: > Moving this one over to -hackers to discuss the fix, as this is clearly an > issue. > > Right now, pg_basebackup will use the pid of the *client* process to > generate it's ephemeral slot name. Per this report that

Re: [HACKERS] TAP backpatching policy

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 6:12 PM, Craig Ringer wrote: > Thoughts? Backpatch new TAP methods, etc, into back branches routinely? FWIW, I'd love to see a committer helping into getting this facility back-patched at least to 9.5. The least I can do is a commitment as a

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

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 5:59 PM, Robert Haas wrote: > That sounds like undue optimism to me. Unless somebody's tested that > Michael's proposed implementation, which uses undocumented OpenSSL > APIs, actually interoperates properly with a SCRAM + channel binding >

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 6:14 PM, Craig Ringer wrote: > Attached is a small patch to teach pg_config how to output a --version-num > > With Pg 10, parsing versions got more annoying. Especially with > "10beta1", "9.6beta2" etc into the mix. It makes no sense to force > tools

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 11:09 AM, Peter Eisentraut wrote: > I don't think this is my item. Most of the behavior is old, and > pg_stat_get_wal_receiver() is from commit > b1a9bad9e744857291c7d5516080527da8219854. > > I would appreciate if another committer can

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

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 8:14 AM, Stephen Frost wrote: > Work has been done in that area already, as well as for LibNSS support. > > I've not had a chance to closely look over the proposed approach here, > but generally speaking, we need to be looking for a standard way to >

Re: [HACKERS] Bug when dumping "empty" operator classes

2017-05-29 Thread Michael Paquier
On Fri, May 26, 2017 at 8:14 AM, Daniel Gustafsson wrote: >> On 26 May 2017, at 17:08, Tom Lane wrote: >> I'll commit and back-patch this without a test case. Possibly Frost will >> be excited enough about it to add something to the pg_dump TAP tests, >> but

Re: [HACKERS] pg_resetwal is broken if run from v10 against older version of PG data directory

2017-05-29 Thread Michael Paquier
On Mon, May 29, 2017 at 10:02 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Michael Paquier <michael.paqu...@gmail.com> writes: >> On Mon, May 29, 2017 at 9:00 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >>> So we need to prevent this, not try to make it wo

Re: [HACKERS] pg_resetwal is broken if run from v10 against older version of PG data directory

2017-05-29 Thread Michael Paquier
On Mon, May 29, 2017 at 9:00 AM, Tom Lane wrote: > So we need to prevent this, not try to make it work. I don't think > we can insist on a version match in pg_control, because part of the > point of pg_resetxlog/pg_resetwal is to recover if pg_control is > unreadable. But I

Re: [HACKERS] pg_resetwal is broken if run from v10 against older version of PG data directory

2017-05-29 Thread Michael Paquier
On Mon, May 29, 2017 at 3:19 AM, Amit Kapila wrote: > I think this happens due to commit > f82ec32ac30ae7e3ec7c84067192535b2ff8ec0e which renames pg_xlog to > pg_wal. It does take care of making some of the modules like > pg_basebackup to understand both old and new

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

2017-05-27 Thread Michael Paquier
On Sat, May 27, 2017 at 5:59 PM, Álvaro Hernández Tortosa <a...@8kdata.com> wrote: > On 25/05/17 17:17, Michael Paquier wrote: >> Please find attached a patch to add support for channel binding for >> SCRAM, to mitigate MITM attacks using this protocol. Per RFC5802 >> (

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-05-27 Thread Michael Paquier
On Fri, May 26, 2017 at 4:47 PM, Peter Eisentraut <peter.eisentr...@2ndquadrant.com> wrote: > On 5/26/17 14:16, Michael Paquier wrote: >> So, now that the last round of minor releases has happened and that >> some dust has settled on this patch, shouldn't there be a backpat

Re: [HACKERS] Broken hint bits (freeze)

2017-05-27 Thread Michael Paquier
On Sat, May 27, 2017 at 12:56 PM, Andres Freund wrote: > On 2017-05-27 19:48:24 +0300, Vladimir Borodin wrote: >> Well, actually clean shutdown of master with exit code 0 from `pg_ctl >> stop -m fast` guarantees that all WAL has been replicated to standby. > > It does not. It

Re: [HACKERS] Extra Vietnamese unaccent rules

2017-05-26 Thread Michael Paquier
On Fri, May 26, 2017 at 5:48 PM, Thomas Munro wrote: > Unicode has two ways to represent characters with accents: either with > composed codepoints like "é" or decomposed codepoints where you say > "e" and then "´". The field "00E2 0301" is the decomposed form of >

Re: [HACKERS] Broken hint bits (freeze)

2017-05-26 Thread Michael Paquier
On Fri, May 26, 2017 at 2:39 PM, Amit Kapila wrote: > Yeah, I think this is quite suspicious. This seems to indicate that > not all WAL records are replicated before the switchover. What is the > value of "synchronous_commit" you are using? I think you somehow need >

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-05-26 Thread Michael Paquier
On Sat, May 6, 2017 at 6:40 AM, Michael Paquier <michael.paqu...@gmail.com> wrote: > Agreed. Just adding an ERROR message in XLogInsert() is not going to > help much as this leads also to PANIC for critical sections :( > So a patch really needs to be a no-op for all WAL-related oper

Re: retry shm attach for windows (WAS: Re: [HACKERS] OK, so culicidae is *still* broken)

2017-05-26 Thread Michael Paquier
On Fri, May 26, 2017 at 8:20 AM, Amit Kapila wrote: > I think the real question here is, shall we backpatch this fix or we > want to do this just in Head or we want to consider it as a new > feature for PostgreSQL-11. I think it should be fixed in Head and the > change

[HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-25 Thread Michael Paquier
Hi all, Please find attached a patch to add support for channel binding for SCRAM, to mitigate MITM attacks using this protocol. Per RFC5802 (https://tools.ietf.org/html/rfc5802), servers supporting channel binding need to add support for tls-unique, and this is what this patch does. As defined

Re: [HACKERS] Server ignores contents of SASLInitialResponse

2017-05-25 Thread Michael Paquier
On Thu, May 25, 2017 at 10:52 AM, Michael Paquier <michael.paqu...@gmail.com> wrote: > Actually, I don't think that we are completely done here. Using the > patch of upthread to enforce a failure on SASLInitialResponse, I see > that connecting without SSL causes the following error

Re: [HACKERS] Server ignores contents of SASLInitialResponse

2017-05-25 Thread Michael Paquier
On Thu, May 25, 2017 at 9:32 AM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Thu, May 25, 2017 at 8:51 AM, Heikki Linnakangas <hlinn...@iki.fi> wrote: >> On 05/24/2017 11:33 PM, Michael Paquier wrote: >>> I have noticed today that the server i

Re: [HACKERS] Server ignores contents of SASLInitialResponse

2017-05-25 Thread Michael Paquier
On Thu, May 25, 2017 at 8:51 AM, Heikki Linnakangas <hlinn...@iki.fi> wrote: > On 05/24/2017 11:33 PM, Michael Paquier wrote: >> I have noticed today that the server ignores completely the contents >> of SASLInitialResponse. ... Attached is a patch to fix the problem. >

[HACKERS] Commit fests created for PG11 development

2017-05-24 Thread Michael Paquier
Hi all, Following the conclusions of the developer meeting whose minutes are here: https://wiki.postgresql.org/wiki/PgCon_2017_Developer_Meeting The commit fest schedule has been decided as the same as 2016-2017, with four commit fest entries, planned for one month each: - 2017-09 - 2017-11 -

[HACKERS] Server ignores contents of SASLInitialResponse

2017-05-24 Thread Michael Paquier
Hi all, I have noticed today that the server ignores completely the contents of SASLInitialResponse. For example with the patch attached called scram-trick-server: diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index f4397afc64..8fe1c8edfb 100644 ---

Re: retry shm attach for windows (WAS: Re: [HACKERS] OK, so culicidae is *still* broken)

2017-05-24 Thread Michael Paquier
On Thu, May 25, 2017 at 11:34 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Noah Misch >> Ten feels low to me. The value should be be low enough so users don't give >> up and

Re: [HACKERS] Error-like LOG when connecting with SSL for password authentication

2017-05-24 Thread Michael Paquier
On Tue, May 23, 2017 at 6:26 AM, Heikki Linnakangas wrote: > Yeah. The be_tls_read() change looks OK to me. > > Can SSL_ERROR_ZERO_RETURN also happen in a write? I suppose it can, but > returning 0 from secure_write() seems iffy. It seems to me that it could be the case, the man

Re: retry shm attach for windows (WAS: Re: [HACKERS] OK, so culicidae is *still* broken)

2017-05-24 Thread Michael Paquier
On Tue, May 23, 2017 at 8:14 AM, Amit Kapila wrote: > So it seems both you and Tom are leaning towards some sort of retry > mechanism for shm reattach on Windows. I also think that is a viable > option to negate the impact of ASLR. Attached patch does that. Note >

Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)

2017-05-23 Thread Michael Paquier
On Tue, May 23, 2017 at 6:42 AM, Mahi Gurram wrote: > I'm building In-Memory index extension for Postgres, for which i'm trying to > use DSA. But ended with some issues, as it is not allowing me to create > DSA(Dynamic Shared Area) in _PG_init function. > > Please refer

Re: [HACKERS] Error-like LOG when connecting with SSL for password authentication

2017-05-23 Thread Michael Paquier
On Tue, May 23, 2017 at 6:36 AM, Heikki Linnakangas <hlinn...@iki.fi> wrote: > On 05/22/2017 10:11 PM, Vaishnavi Prabakaran wrote: >> >> On Mon, May 22, 2017 at 5:10 PM, Michael Paquier >> <michael.paqu...@gmail.com> >> wrote: >> >>> If the p

Re: [HACKERS] Some thoughts about SCRAM implementation

2017-05-22 Thread Michael Paquier
On Mon, Apr 10, 2017 at 6:39 PM, Álvaro Hernández Tortosa wrote: > - I think channel binding support should be added. SCRAM brings security > improvements over md5 and other simpler digest algorithms. But where it > really shines is together with channel binding. This is the only

Re: [HACKERS] Improve logical decoding error message (was wal_level > WAL_LEVEL_LOGICAL)

2017-05-22 Thread Michael Paquier
On Tue, May 23, 2017 at 8:08 AM, Neha Khatri wrote: > The Logical Decoding example in the documentation says: > > "Before you can use logical decoding, you must set wal_level to logical > and max_replication_slots to at least 1." > > But above error message is not exactly

[HACKERS] Error-like LOG when connecting with SSL for password authentication

2017-05-22 Thread Michael Paquier
Hi all, When attempting to connect using password authentication through SSL, the backend will complain in its log with the following entry before calling sendAuthRequest(), which asks the client for a password: LOG: could not receive data from client: Connection reset by peer After a short

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-20 Thread Michael Paquier
On Fri, May 19, 2017 at 3:01 PM, Masahiko Sawada wrote: > Also, as Horiguchi-san pointed out earlier, walreceiver seems need the > similar fix. Actually, now that I look at it, ready_to_display should as well be protected by the lock of the WAL receiver, so it is

[HACKERS] Making replication commands case-insensitive

2017-05-20 Thread Michael Paquier
Hi all, $subject has been raised in a recent thread here: https://www.postgresql.org/message-id/CAB7nPqTmym5t-X6hvMF_P-KRc=ndXtbQCTiU=nhs_jvl7x1...@mail.gmail.com The idea is to make the replication protocol a bit more flexible, in a way similar to what 5c837dd has done, but for repl_scanner.l.

Re: [HACKERS] [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.

2017-05-19 Thread Michael Paquier
On Sat, May 20, 2017 at 5:32 AM, Tom Lane wrote: > We'd probably be better off to implement case-insensitivity the hard way. > There is a reason why none of our other flex scanners use this switch. Do you think that it would be better to list the letter list for each keyword

Re: [HACKERS] [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.

2017-05-18 Thread Michael Paquier
On Fri, May 19, 2017 at 1:16 PM, Higuchi, Daisuke wrote: > The reason of this problem is that sending 'show transaction_read_only' is > failed. > 'show' must be in uppercase letters because the streaming replication > protocol only accepts capital letters. > In

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

2017-05-18 Thread Michael Paquier
On Fri, May 19, 2017 at 12:17 PM, Bossart, Nathan wrote: > Just in case it was missed among the discussion, I’d like to point out that > v5 of the patch includes the “ERROR if ANALYZE not specified” change. As long as I don't forget... +VACUUM vactst (i); Looking at the

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-18 Thread Michael Paquier
On Fri, May 19, 2017 at 11:01 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Peter Eisentraut >> The problem is that if we decide to change the behavior mid-beta, then we'll >>

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-18 Thread Michael Paquier
On Thu, May 18, 2017 at 1:43 PM, Thomas Munro <thomas.mu...@enterprisedb.com> wrote: > On Thu, May 11, 2017 at 1:48 PM, Michael Paquier > <michael.paqu...@gmail.com> wrote: >> I had my eyes on the WAL sender code this morning, and I have noticed >> that walsender.

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

2017-05-18 Thread Michael Paquier
On Fri, May 19, 2017 at 10:00 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Michael Paquier <michael.paqu...@gmail.com> writes: >> On Fri, May 19, 2017 at 9:06 AM, Michael Paquier >> <michael.paqu...@gmail.com> wrote: >>> I am fine with an ERROR if

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-18 Thread Michael Paquier
On Thu, May 18, 2017 at 11:30 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Thu, May 18, 2017 at 7:06 AM, Michael Paquier > <michael.paqu...@gmail.com> wrote: >> FWIW, I am of the opinion to not have an implementation based on any >> SQLSTATE codes, as well

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

2017-05-18 Thread Michael Paquier
On Fri, May 19, 2017 at 9:06 AM, Michael Paquier <michael.paqu...@gmail.com> wrote: > I am fine with an ERROR if a column list is specified without ANALYZE > listed in the options. But that should happen as well for the case > where only one relation is listed. Perhaps this c

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

2017-05-18 Thread Michael Paquier
On Fri, May 19, 2017 at 12:03 AM, Tom Lane wrote: > Robert Haas writes: >> Ugh, really? Are we sure that the current behavior is anything other >> than a bug? Point was raised already upthread by me ince, which is what lead me to the reasoning of my

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-18 Thread Michael Paquier
On Thu, May 18, 2017 at 5:05 PM, Tsunakawa, Takayuki wrote: > So, how about trying connection to the next host when the class code is > neither 28, 3D, nor 42? > > Honestly, I'm not happy with this approach, for a maintenance reason that > others are worried

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

2017-05-18 Thread Michael Paquier
On Thu, May 18, 2017 at 2:59 PM, Masahiko Sawada wrote: > It seems to me that it's not good idea to forcibly set ANALYZE in > spite of ANALYZE option is not specified. One reason is that it would > make us difficult to grep it from such as server log. I think It's > better

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-17 Thread Michael Paquier
On Thu, May 18, 2017 at 12:07 PM, Tsunakawa, Takayuki wrote: > From: Tom Lane [mailto:t...@sss.pgh.pa.us] >> Maybe add this to the list of open issues to reconsider mid-beta? > > Done. I'll examine whether we can use SQLSTATE. Does JDBC use something like that to

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-17 Thread Michael Paquier
On Wed, May 17, 2017 at 12:14 AM, Robert Haas wrote: > Well, it's probably worth changing for consistency, but I'm not sure > that it rises to the level of "a very bad idea". It actually seems > almost entirely harmless. Spuriously setting the needreload flag on a >

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

2017-05-17 Thread Michael Paquier
On Thu, May 18, 2017 at 12:06 AM, Bossart, Nathan wrote: > I agree with you here, too. I stopped short of allowing customers to > explicitly provide per-table options, so the example you provided wouldn’t > work here. This is more applicable for something like the

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

2017-05-17 Thread Michael Paquier
On Fri, Mar 31, 2017 at 9:58 PM, Ashutosh Bapat wrote: > Then the question is why not to allow savepoints as well? For that we > have to fix transaction block state machine. I agree with this argument. I have been looking at the patch, and what it does is

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-17 Thread Michael Paquier
On Tue, May 16, 2017 at 11:26 PM, Ildus Kurbangaliev wrote: > On Tue, 16 May 2017 21:36:11 +0900 > Etsuro Fujita wrote: >> On 2017/05/16 21:11, Ashutosh Bapat wrote: >> > On Tue, May 16, 2017 at 5:35 PM, Ildus Kurbangaliev >> >

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

2017-05-17 Thread Michael Paquier
On Wed, May 17, 2017 at 7:56 AM, Bossart, Nathan wrote: > I think this issue already exists, as this comment in get_rel_oids(…) seems > to indicate: > > /* > * Since we don't take a lock here, the relation might be gone, or the > * RangeVar might no longer

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-16 Thread Michael Paquier
On Wed, May 17, 2017 at 11:49 AM, Tsunakawa, Takayuki <tsunakawa.ta...@jp.fujitsu.com> wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael Paquier >> pqWait is internal to libpq, so we are free to set up what w

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-16 Thread Michael Paquier
On Wed, May 17, 2017 at 12:47 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Mon, May 15, 2017 at 9:59 PM, Michael Paquier > <michael.paqu...@gmail.com> wrote: >> + * >> + * Returns -1 on failure, 0 if the socket is readable/writable, 1 if >> it time

Re: [HACKERS] synchronous_commit option is not visible after pressing TAB

2017-05-16 Thread Michael Paquier
On Tue, May 16, 2017 at 8:18 PM, tushar wrote: > While creating subscription - if we press TAB button to see the available > parameters , synchronous_commit parameter is not visible. > > postgres=# CREATE SUBSCRIPTION sub123 CONNECTION 'dbname=postgres port=5000' >

Re: [HACKERS] [PATCH v2] Progress command to monitor progression of long running SQL queries

2017-05-16 Thread Michael Paquier
On Sat, May 13, 2017 at 10:53 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Wed, May 10, 2017 at 10:05 PM, Michael Paquier > <michael.paqu...@gmail.com> wrote: >> Regarding the patch, this is way to close to the progress facility >> already in

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

2017-05-16 Thread Michael Paquier
On Fri, May 12, 2017 at 1:06 PM, Bossart, Nathan <bossa...@amazon.com> wrote: > On 5/11/17, 7:20 PM, "Michael Paquier" <michael.paqu...@gmail.com> wrote: >> It seems to me that it would have been less invasive to loop through >> vacuum() for each relation.

Re: [HACKERS] src/test/ssl/t/001_ssltests.pl should not tromp on file permissions

2017-05-15 Thread Michael Paquier
On Tue, May 16, 2017 at 7:05 AM, Tom Lane wrote: > I got tripped up while building the 10beta1 tarballs by the fact > that src/test/ssl/ssl/client.key had permissions 0600 in my git > checkout. After a fair amount of head-scratching, I figured out > that this must have been a

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-15 Thread Michael Paquier
On Tue, May 16, 2017 at 3:13 AM, Tom Lane wrote: > FWIW, I think the position most of us were taking is that this feature > is meant to retry transport-level connection failures, not cases where > we successfully make a connection to a server and then it rejects our > login

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-05-14 Thread Michael Paquier
On Mon, May 15, 2017 at 2:04 PM, Dilip Kumar wrote: > On Sun, May 14, 2017 at 9:54 PM, Dilip Kumar wrote: >> After your fix, now tupleid is invalid which is expected, but seems >> like we need to do something more. As per the comments seems like it

Re: [HACKERS] Duplicate usage of tablespace location?

2017-05-14 Thread Michael Paquier
On Thu, May 11, 2017 at 1:09 PM, Kyotaro HORIGUCHI wrote: > If we can accept multiple server versions share a tablespace > directory, pg_basebackup also can allow that situation. The > attached patch does that. Similary to the server code, it > correctly fails if

Re: [HACKERS] Bug with pg_basebackup and 'shared' tablespace

2017-05-14 Thread Michael Paquier
On Tue, May 2, 2017 at 2:28 AM, Pierre Ducroquet wrote: > I didn't have much time to spend on that issue until today, and I found a > way to solve it that seems acceptable to me. > > The biggest drawback will be that if the backup is interrupted, previous > tablespaces

[HACKERS] Typos in pg_basebackup.c

2017-05-14 Thread Michael Paquier
Hi all, Found $subject while working on the area. A patch is attached. Thanks, -- Michael basebackup-typo.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-14 Thread Michael Paquier
On Fri, May 12, 2017 at 10:44 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Michael Paquier <michael.paqu...@gmail.com> writes: >> On Fri, May 12, 2017 at 1:28 PM, Tsunakawa, Takayuki >> <tsunakawa.ta...@jp.fujitsu.com> wrote: >>> Likewise, when the firs

Re: [HACKERS] Addition of pg_dump --no-publications

2017-05-12 Thread Michael Paquier
On Fri, May 12, 2017 at 10:19 PM, Peter Eisentraut <peter.eisentr...@2ndquadrant.com> wrote: > On 5/11/17 21:59, Michael Paquier wrote: >> On Thu, May 11, 2017 at 3:19 PM, Michael Paquier >> <michael.paqu...@gmail.com> wrote: >>> I imagine that pg_dump -s wou

Re: [HACKERS] PROVE_FLAGS

2017-05-12 Thread Michael Paquier
On Fri, May 12, 2017 at 9:05 PM, Andrew Dunstan wrote: > Does anyone object to me backpatching this? It seems to me kinda crazy > to have --verbose hardcoded on the back branches and not on the dev branch. +1. A maximum of consistency with the test code when

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-11 Thread Michael Paquier
On Fri, May 12, 2017 at 1:28 PM, Tsunakawa, Takayuki wrote: > Likewise, when the first host has already reached max_connections, libpq > doesn't attempt the connection aginst later hosts. It seems to me that the feature is behaving as wanted. Or in short attempt

Re: [HACKERS] PG 10 release notes

2017-05-11 Thread Michael Paquier
On Mon, May 8, 2017 at 10:50 PM, Bruce Momjian wrote: > [other stuff] Bruce, the release notes do not mention yet that support for cleartext passwords is removed. This has been done recently by Heikki in eb61136d. This has as consequence that CREATE ROLE PASSWORD UNENCRYPTED

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

2017-05-11 Thread Michael Paquier
On Fri, May 12, 2017 at 9:47 AM, Bossart, Nathan wrote: > Attached is a more complete first attempt at adding this functionality. I > added two node types: one for parsing the “relation and columns” list in the > grammar, and one for holding the relation information we

Re: [HACKERS] Addition of pg_dump --no-publications

2017-05-11 Thread Michael Paquier
On Thu, May 11, 2017 at 3:19 PM, Michael Paquier <michael.paqu...@gmail.com> wrote: > I imagine that pg_dump -s would be the basic operation that users > would do first before creating a subcription on a secondary node, but > what I find surprising is that publications are dumpe

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-05-11 Thread Michael Paquier
On Wed, May 10, 2017 at 11:57 AM, Masahiko Sawada wrote: > Barring any objections, I'll add these two issues to open item. It seems to me that those open items have not been added yet to the list. If I am following correctly, they could be defined as follows: - Dropping

[HACKERS] Addition of pg_dump --no-publications

2017-05-11 Thread Michael Paquier
Hi all, I imagine that pg_dump -s would be the basic operation that users would do first before creating a subcription on a secondary node, but what I find surprising is that publications are dumped by default. I don't find confusing that those are actually included by default to be consistent

Re: [HACKERS] logical replication deranged sender

2017-05-10 Thread Michael Paquier
On Wed, May 10, 2017 at 3:06 AM, Petr Jelinek wrote: > Okay, then it's the same issue Masahiko Sawada reported in nearby > thread, or at least has same cause. This report is here:

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

2017-05-10 Thread Michael Paquier
On Thu, May 11, 2017 at 11:56 AM, Tom Lane wrote: > It would be hard to reject at the grammar level, and not very friendly > either because you'd only get "syntax error". We could certainly make > the runtime code throw an error if you gave a column list without saying >

Re: [HACKERS] SCRAM in the PG 10 release notes

2017-05-10 Thread Michael Paquier
On Thu, May 11, 2017 at 11:50 AM, Bruce Momjian wrote: > I have added this as an open item because we will have to wait to see > where we are with driver support as the release gets closer. As Postgres ODBC now has a hard dependency with libpq, no actions is taken from there.

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

2017-05-10 Thread Michael Paquier
On Thu, May 11, 2017 at 6:40 AM, Tom Lane wrote: > "Bossart, Nathan" writes: >> Currently, VACUUM commands allow you to specify one table or all of the >> tables in the current database to vacuum. I’ve recently found myself >> wishing I could specify

Re: [HACKERS] [PATCH v2] Progress command to monitor progression of long running SQL queries

2017-05-10 Thread Michael Paquier
On Thu, May 11, 2017 at 1:40 AM, Remi Colinet wrote: > This is version 2 of the new command name PROGRESS which I wrote in order to > monitor long running SQL queries in a Postgres backend process. It would be a good idea to add this patch to the next commit fest if you

[HACKERS] Race conditions with WAL sender PID lookups

2017-05-10 Thread Michael Paquier
Hi all, I had my eyes on the WAL sender code this morning, and I have noticed that walsender.c is not completely consistent with the PID lookups it does in walsender.c. In two code paths, the PID value is checked without holding the WAL sender spin lock (WalSndRqstFileReload and

Re: [HACKERS] Removal of plaintext password type references

2017-05-10 Thread Michael Paquier
On Wed, May 10, 2017 at 10:22 PM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Wed, May 10, 2017 at 10:01 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Heikki Linnakangas <hlinn...@iki.fi> writes: >>> Also note that changing the signature check_pa

Re: [HACKERS] Should pg_current_wal_location() become pg_current_wal_lsn()

2017-05-10 Thread Michael Paquier
On Thu, May 11, 2017 at 9:15 AM, Bruce Momjian wrote: > On Wed, May 10, 2017 at 01:09:36PM -0700, Joe Conway wrote: >> On 05/10/2017 12:22 PM, Tom Lane wrote: >> > Robert Haas writes: >> >> On Wed, May 10, 2017 at 1:13 PM, Tom Lane

Re: Fwd: Re: [HACKERS] MSVC odd TAP test problem

2017-05-10 Thread Michael Paquier
On Thu, May 11, 2017 at 7:29 AM, Andrew Dunstan wrote: > This isn't going to work. If you look at the code in IPC/Run.pm you see > that the coup_d_grace signal is only used after it has first sent the > hardcoded SIGTERM. It might be tempting to play with using

Re: [HACKERS] Removal of plaintext password type references

2017-05-10 Thread Michael Paquier
On Wed, May 10, 2017 at 10:01 PM, Tom Lane wrote: > Heikki Linnakangas writes: >> Also note that changing the signature check_password_hook_type would >> break any external modules that use the hook. Removing >> PASSWORD_TYPE_PLAINTEXT will do that too,

Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-10 Thread Michael Paquier
On Wed, May 10, 2017 at 2:09 PM, Peter Eisentraut wrote: > I think I have more clarity about the different, overlapping issues: > > 1. Concurrent ALTER SEQUENCE causes "tuple concurrently updated" >error, caused by updates to pg_sequence catalog. This can be

Re: [HACKERS] Removal of plaintext password type references

2017-05-09 Thread Michael Paquier
On Wed, May 10, 2017 at 10:51 AM, Vaishnavi Prabakaran wrote: > Following recent removal of support to store password in plain text, > modified the code to > > 1. Remove "PASSWORD_TYPE_PLAINTEXT" macro > 2. Instead of using "get_password_type" to retrieve the

Re: [HACKERS] MSVC odd TAP test problem

2017-05-09 Thread Michael Paquier
On Wed, May 10, 2017 at 2:11 AM, Andrew Dunstan wrote: > (After extensive trial and error) Turns out it's not quite that, it's > the kill_kill stuff. I think for now we should just disable it on the > platform. That means not running tests 7 and 8 of the

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-09 Thread Michael Paquier
On Wed, May 10, 2017 at 12:00 AM, Peter Eisentraut wrote: > On 5/9/17 04:54, Petr Jelinek wrote: >>> I think that it would be nice to fix that even before beta, so >>> attached is a patch to add --no-subscriptions to pg_dump, pg_dumpall >>> and pg_restore. >> >>

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-05-08 Thread Michael Paquier
On Sat, May 6, 2017 at 12:01 AM, Peter Eisentraut wrote: > On 5/2/17 21:44, Noah Misch wrote: >>> I wonder if we should have an --no-subscriptions option, now that they >>> are dumped by default, just like we have --no-blobs, --no-owner, >>> --no-password,

Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-07 Thread Michael Paquier
On Mon, May 8, 2017 at 8:43 AM, Andres Freund wrote: > Moving discussion to -hackers, this isn't really a bug, it's an > architectural issue with the new in-tree approach. > > Short recap: With the patch applied in [1] ff, sequences partially > behave transactional (because

Re: [HACKERS] Change GetLastImportantRecPtr's definition? (wasSkip checkpoints, archiving on idle systems.)

2017-05-07 Thread Michael Paquier
(catching up here) On Sun, May 7, 2017 at 9:01 AM, Andres Freund wrote: > Turns out this isn't the better fix, because the checkpoint code > compares with the actual record LSN (rather than the end+1 that > XLogInsert() returns). We'd start having to do more bookkeeping or

Re: [HACKERS] logical replication and PANIC during shutdown checkpoint in publisher

2017-05-06 Thread Michael Paquier
On Fri, May 5, 2017 at 11:50 PM, Peter Eisentraut <peter.eisentr...@2ndquadrant.com> wrote: > On 5/5/17 01:26, Michael Paquier wrote: >> The only code path doing HOT-pruning and generating WAL is >> heap_page_prune(). Do you think that we need to worry about FPWs as &g

Re: [HACKERS] [patch] Build pgoutput with MSVC

2017-05-05 Thread Michael Paquier
On Sat, May 6, 2017 at 7:07 AM, MauMau wrote: > From: Magnus Hagander > If that's all that's required, I'll just go ahead and commit it right > away, including the clean.bat. > > I think the problem with clean.bat isn't cleaning up pgoutput.dll -- > that one goes in a

<    2   3   4   5   6   7   8   9   10   11   >