Re: [HACKERS] PATCH: index-only scans with partial indexes

2016-02-27 Thread Michael Paquier
On Sat, Feb 27, 2016 at 1:08 AM, Robert Haas wrote: > On Fri, Feb 26, 2016 at 6:16 PM, Michael Paquier > wrote: >> On Fri, Feb 26, 2016 at 4:18 PM, Kyotaro HORIGUCHI >> wrote: >>> I marked this as "ready for commiter" and tried to add me as the >>>

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-27 Thread Michael Paquier
On Sat, Feb 27, 2016 at 3:52 PM, Kartyshov Ivan wrote: > On 27.02.2016 03:07, Andres Freund wrote >> >> How does it help with any of that? > > Maybe i wasn't too accurate in terms, because I newbie, but: > We can get information about xlog, using big amout of support function > (pg_current_xlog_lo

Re: [HACKERS] [PATCH] fix DROP OPERATOR to reset links to itself on commutator and negator

2016-02-27 Thread Michael Paquier
On Sat, Feb 27, 2016 at 12:46 AM, Roma Sokolov wrote: > Should this patch be added to CommitFest? Yes please. -- 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] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-02-27 Thread Michael Paquier
On Mon, Feb 22, 2016 at 9:39 AM, Thom Brown wrote: > On 21 February 2016 at 23:18, Thomas Munro > wrote: > The replay_lag is particularly cool. Didn't think it was possible to > glean this information on the primary, but the timings are correct in > my tests. > > +1 for this patch. Looks like t

Re: [HACKERS] proposal: get oldest LSN - function

2016-02-28 Thread Michael Paquier
On Sun, Feb 28, 2016 at 4:40 PM, Kartyshov Ivan wrote: > It will not satisfy our purposes and our administrators for three reasons. > 1) DBA set me task to get the oldest number that present in WAL, not last Yeah I got that. > 2) Surely we can choose the oldest segment from list "pg_ls_dir('pg_xl

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-02-28 Thread Michael Paquier
On Sun, Feb 28, 2016 at 9:33 AM, Joe Conway wrote: > On 02/21/2016 05:30 AM, Michael Paquier wrote: >> Looking again at this thread I guess that this is consensus, based on >> the proposal from Josh and seeing no other ideas around. Another idea >> would be to group all t

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-28 Thread Michael Paquier
On Sat, Feb 27, 2016 at 7:37 AM, Michael Paquier wrote: > Date of first message of this thread: Mon, 2 Dec 2013 15:40:41 +0900 > Date of this message: Fri, 26 Feb 2016 16:30:08 -0300 > This has been a long trip. Thanks a lot to all involved. Many people > have reviewed and helped o

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-28 Thread Michael Paquier
On Sun, Feb 28, 2016 at 10:41 PM, Michael Paquier wrote: > On Sat, Feb 27, 2016 at 7:37 AM, Michael Paquier wrote: >> Date of first message of this thread: Mon, 2 Dec 2013 15:40:41 +0900 >> Date of this message: Fri, 26 Feb 2016 16:30:08 -0300 >> This has been a long trip

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-28 Thread Michael Paquier
On Sun, Feb 28, 2016 at 11:22 PM, Craig Ringer wrote: > On 27 February 2016 at 06:37, Michael Paquier > wrote: >> >> On Sat, Feb 27, 2016 at 4:30 AM, Alvaro Herrera >> wrote: >> > Craig Ringer wrote: >> >> Should be committed ASAP IMO. >> >

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-02-28 Thread Michael Paquier
On Mon, Feb 29, 2016 at 3:50 AM, Joe Conway wrote: > If there are no other complaints or comments, I will commit the attached > sometime this coming week (the the requisite catversion bump). Thanks for the updated patch, I have nothing else to say on my side. The new version has fixed the MSVC bu

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-28 Thread Michael Paquier
On Mon, Feb 29, 2016 at 7:40 AM, Michael Paquier wrote: > The buildfarm does not have infrastructure to test that yet.. I need > to craft a patch for the client-side code and send it to Andrew. Will > try to do so today. For those interested, here is where things are going to happ

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-02-28 Thread Michael Paquier
On Wed, Feb 24, 2016 at 2:40 PM, Michael Paquier wrote: > This has the merit to be clear, thanks for the input. Whatever the > approach taken at the end we have two candidates: > - Extend XLogInsert() with an extra argument for flags (Andres) > - Introduce XLogInsertExtended wit

Re: [HACKERS] pg_ctl promote wait

2016-02-28 Thread Michael Paquier
On Mon, Feb 29, 2016 at 10:30 AM, Peter Eisentraut wrote: > On 2/19/16 3:09 PM, Tom Lane wrote: >> I see no need for an additional mechanism. Just watch pg_control until >> you see DB_IN_PRODUCTION state there, then switch over to the same >> connection probing that "pg_ctl start -w" uses. > > He

Re: [HACKERS] pg_ctl promote wait

2016-02-28 Thread Michael Paquier
On Mon, Feb 29, 2016 at 4:28 PM, Michael Paquier wrote: > I would suggest using > $node_standby->poll_query_until('SELECT pg_is_in_recovery()') to > validate the end of the test. Meh. SELECT NOT pg_is_in_recovery(). This will wait until the query returns true. -- Michae

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-02-29 Thread Michael Paquier
On Mon, Feb 29, 2016 at 6:05 PM, Thomas Munro wrote: > "All changes made by the transaction become visible to others ..." -- > which others? But I backed out, that succinct account of COMMIT is 20 > years old, and in any case visibility is tied to committing, not > specifically to the COMMIT comm

Re: [HACKERS] WIP: Access method extendability

2016-02-29 Thread Michael Paquier
On Mon, Feb 29, 2016 at 7:42 PM, Alexander Korotkov wrote: > On Fri, Feb 19, 2016 at 4:08 AM, Michael Paquier > wrote: >> This is basically a copy of RewindTest.pm. This is far from generic. >> If this patch gets committed first I would suggest to wait for the >> more-gen

Re: [HACKERS] Compilation broken when OPTIMIZER_DEBUG is set

2016-02-29 Thread Michael Paquier
On Mon, Feb 29, 2016 at 8:44 PM, salvador fandino wrote: > gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement > -Wendif-labels -Wmissing-format-attribute -Wformat-security > -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O0 > -DOPTIMIZER_DEBUG -I../../../../

Re: [HACKERS][REVIEW]: Password identifiers, protocol aging and SCRAM protocol

2016-02-29 Thread Michael Paquier
On Mon, Feb 29, 2016 at 8:43 PM, Valery Popov wrote: > vpopov@vpopov-Ubuntu:~/Projects/pwdtest/postgresql$ git branch Thanks for the input! > 0001-Add-facility-to-store-multiple-password-verifiers.patch:2547: trailing > whitespace. > warning: 1 line adds whitespace errors. > 0003-Add-pg_auth_ver

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-29 Thread Michael Paquier
On Tue, Mar 1, 2016 at 6:25 AM, Alvaro Herrera wrote: > Michael Paquier wrote: > >> 9) I have no logical explanation to explain why I am seeing all those >> things now. > > Happens all the time ... > > Pushed, thanks. Thanks. I am going to patch by buildfarm scripts

[HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-02-29 Thread Michael Paquier
*not* return an error and treat the COPY start message at the next loop of ParseInput(), though by looking at what is in-core things can be handled properly. Thoughts? I have registered that in the CF app, and a patch is attached. -- Michael From df931f39efb9e7fd50108345ebeb53a098d0dc29 Mon Sep 17

Re: [HACKERS] remove wal_level archive

2016-02-29 Thread Michael Paquier
On Tue, Mar 1, 2016 at 10:02 AM, Peter Eisentraut wrote: > On 2/8/16 7:34 AM, Michael Paquier wrote: >> - if (ControlFile->wal_level < WAL_LEVEL_HOT_STANDBY) >> + if (ControlFile->wal_level < WAL_LEVEL_REPLICA) >> Upthread it was mentio

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-29 Thread Michael Paquier
On Tue, Mar 1, 2016 at 11:28 AM, Michael Paquier wrote: > On Tue, Mar 1, 2016 at 6:25 AM, Alvaro Herrera > wrote: >> Michael Paquier wrote: >> >>> 9) I have no logical explanation to explain why I am seeing all those >>> things now. >> >&g

Re: [HACKERS] Publish autovacuum informations

2016-02-29 Thread Michael Paquier
On Tue, Mar 1, 2016 at 4:38 AM, Julien Rouhaud wrote: > On 29/02/2016 20:20, Fabrízio de Royes Mello wrote: >> >> On Mon, Feb 29, 2016 at 3:04 PM, Julien Rouhaud >> mailto:julien.rouh...@dalibo.com>> wrote: >>> >>> On 04/06/2015 22:10, Guillaume Lelarge wrote: >>> > 2015-01-05 17:44 GMT+01:00 Guil

Re: [HACKERS] snapshot too old, configured by time

2016-02-29 Thread Michael Paquier
On Tue, Mar 1, 2016 at 9:35 AM, Andres Freund wrote: > On 2016-02-29 18:30:27 -0600, Kevin Grittner wrote: >> Basically, a connection needs to remain open and interleave >> commands with other connections, which the isolation tester does >> just fine; but it needs to do that using a custom postgre

Re: [HACKERS] Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-03-01 Thread Michael Paquier
On Tue, Mar 1, 2016 at 5:13 PM, Kyotaro HORIGUCHI wrote: > 0001-Change-behavior-... > > Changes of PostmasterNode.pm and TestLib.pm to add some > features and change a behavior. + # Preserve temporary directory for this test if failure + $File::Temp::KEEP_ALL = 1 unless Test::More->builde

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-03-01 Thread Michael Paquier
On Sat, Feb 27, 2016 at 1:02 AM, Alvaro Herrera wrote: > Michael Paquier wrote: > >> Attached are rebased patches, split into 3 parts doing the following: >> - 0001, fix default configuration of MSVC builds ignoring TAP tests > > BTW you keep submitting this one and I ke

[HACKERS] Equivalent of --enable-tap-tests in MSVC scripts

2016-03-01 Thread Michael Paquier
Hi all, As of now the MSVC scripts control if TAP tests are enabled or not using a boolean flag as $config->{tap_tests}. However, this flag is just taken into account in vcregress.pl, with the following issues: 1) config_default.pl does not list tap_tests, so it is unclear to users to enable them.

[HACKERS] Addition of extra commit fest entry to park future patches

2016-03-01 Thread Michael Paquier
Hi all, I guess that commit fest 2016-03 is going to begin soon, at which point nobody will be able to add new patches because 1) already closed CF don't accept them. 2) A CF currently running neither. I propose to create an extra CF, called "Future" or similar where people will be able to park th

Re: [HACKERS] 2016-03 Commitfest Manager

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 6:15 AM, David Steele wrote: > On 3/1/16 3:04 PM, Tom Lane wrote: >> David Steele writes: >>> I volunteered a while back to be the CFM and I haven't seen any other >>> volunteers or objections to my offer. >> >>> I am still ready, eager, and willing! >> >> I haven't heard a

Re: [HACKERS] Addition of extra commit fest entry to park future patches

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 5:46 AM, Magnus Hagander wrote: > Yes, it's trivial to rename. That's the only advantage of our ugly url > scheme which uses the surrogate key in the url instead of the actual name of > the CF :) 2016-09 has been created then: https://commitfest.postgresql.org/10/ People, f

Re: [HACKERS] 2016-03 Commitfest Manager

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 7:22 AM, Michael Paquier wrote: > On Wed, Mar 2, 2016 at 6:15 AM, David Steele wrote: >> On 3/1/16 3:04 PM, Tom Lane wrote: >>> David Steele writes: >>>> I volunteered a while back to be the CFM and I haven't seen any other >&g

Re: [HACKERS] Equivalent of --enable-tap-tests in MSVC scripts

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 12:40 AM, Andrew Dunstan wrote: > On 03/01/2016 08:00 AM, Michael Paquier wrote: >> As of now the MSVC scripts control if TAP tests are enabled or not >> using a boolean flag as $config->{tap_tests}. However, this flag is >> just taken into account i

Re: [HACKERS] 2016-03 Commitfest Manager

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 11:25 AM, David Steele wrote: > Agreed. I see you created the new CF so no reason to keep it open. OK. Done. May the force to manage all those patches be with you, manager. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 1:33 PM, Tom Lane wrote: > Craig Ringer writes: >> This upset buildfarm members running prehistoric Perl versions because >> is_passing was added after 5.8.8. > > Sir, RHEL6 is not prehistoric ... and this is failing on my server too. > I'm not sure when "is_passing" was ad

[HACKERS] Recovery test failure for recovery_min_apply_delay on hamster

2016-03-01 Thread Michael Paquier
Hi all, I have enabled yesterday the recovery test suite on hamster, and we did not have to wait long before seeing the first failure on it, the machine being slow as hell so it is quite good at catching race conditions: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hamster&dt=2016-03-01%

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 2:18 PM, Alvaro Herrera wrote: > Tom Lane wrote: >> I wrote: >> > Can't use string ("Test::Builder") as a HASH ref while "strict refs" in >> > use at /usr/share/perl5/Test/Builder.pm line 1798. >> >> > The referenced line number is the end of the file, >> >> Oh, scratch tha

Re: [HACKERS]WIP: Covering + unique indexes.

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 2:10 AM, Anastasia Lubennikova wrote: > 01.03.2016 19:55, Anastasia Lubennikova: >> It is not the final version, because it breaks pg_dump for previous >> versions. I need some help from hackers here. >> pgdump. line 5466 >> if (fout->remoteVersion >= 90400) >> >> What does

Re: [HACKERS] Publish autovacuum informations

2016-03-01 Thread Michael Paquier
On Tue, Mar 1, 2016 at 11:37 PM, Julien Rouhaud wrote: > I'm not sure what are the fancy things that Michael had in mind with > exposing the private structure. Michael, was it something like having > the ability to change some of these data through an extension? I was referring to you here :) I h

Re: [HACKERS] 2016-03 Commitfest Manager

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 2:53 PM, David Fetter wrote: > On Wed, Mar 02, 2016 at 10:49:01AM +0900, Michael Paquier wrote: >> On Wed, Mar 2, 2016 at 7:22 AM, Michael Paquier >> wrote: >> > On Wed, Mar 2, 2016 at 6:15 AM, David Steele wrote: >> >> On 3/1/16 3

Re: [HACKERS] Incorrect error message in InitializeSessionUserId

2016-03-01 Thread Michael Paquier
On Tue, Mar 1, 2016 at 10:21 PM, Dmitriy Sarafannikov wrote: > I have found incorrect error message in InitializeSessionUserId function > if you try to connect to database by role Oid (for example > BackgroundWorkerInitializeConnectionByOid). > If role have no permissions to login, you will see er

Re: [HACKERS][REVIEW]: Password identifiers, protocol aging and SCRAM protocol

2016-03-01 Thread Michael Paquier
On Wed, Mar 2, 2016 at 4:05 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > [...] Thanks for the review. > The default value contains "scram". Shouldn't be here also: > >>Specifies a comma-separated list of supported password formats by >>the server. Supported formats are curre

Re: [HACKERS][REVIEW]: Password identifiers, protocol aging and SCRAM protocol

2016-03-02 Thread Michael Paquier
On Wed, Mar 2, 2016 at 5:43 PM, Valery Popov wrote: > >>> >>> db_user_namespace causes the client's and >>> server's user name representation to differ. >>> Authentication checks are always done with the server's user name >>> so authentication methods must

Re: Commitfest Bug (was: [HACKERS] Re: Reusing abbreviated keys during second pass of ordered [set] aggregates)

2016-03-02 Thread Michael Paquier
On Wed, Mar 2, 2016 at 9:19 PM, Magnus Hagander wrote: > Needs Review -> Needs Review > Waiting on Author -> Refuse moving > Ready for committer -> Ready for Committer > Committed -> refuse moving > Moved to next cf -> refuse moving (if it's already set like this, it would > probably be a bug) > R

Re: [HACKERS] pg_dump / copy bugs with "big lines" ?

2016-03-02 Thread Michael Paquier
On Thu, Mar 3, 2016 at 12:47 AM, Alvaro Herrera wrote: > Well, the CopyData message has an Int32 field for the message length. > I don't know the FE/BE protocol very well but I suppose each row > corresponds to one CopyData message, or perhaps each column corresponds > to one CopyData message. In

Re: [HACKERS] The plan for FDW-based sharding

2016-03-02 Thread Michael Paquier
On Wed, Mar 2, 2016 at 6:54 PM, Alexander Korotkov wrote: > If FDWs existed then Postgres XC/XL were being developed then I believe they > would try to build full-featured prototype of FDW based sharding. If this > prototype succeed then we could make a full roadmap. Speaking here with my XC hat,

Re: [HACKERS] Issue with NULLS LAST, with postgres_fdw sort pushdown

2016-03-02 Thread Michael Paquier
On Wed, Mar 2, 2016 at 7:04 PM, Rajkumar Raghuwanshi wrote: > On Wed, Mar 2, 2016 at 2:35 PM, Ashutosh Bapat > wrote: >> >> Thanks Rajkumar for your report. Let me know if the attached patch fixes >> the issue. if (pathkey->pk_nulls_first) appendStringInfoString(buf, " NULL

Re: [HACKERS] extend pgbench expressions with functions

2016-03-02 Thread Michael Paquier
On Wed, Mar 2, 2016 at 3:10 AM, Robert Haas wrote: > On Wed, Feb 17, 2016 at 3:22 AM, Fabien COELHO wrote: >> Indeed. My gcc 4.8.4 with --Wall does not show the warning, too bad. >> >> Attached is the fixed patch for the array method. > > Committed with a few tweaks, including running pgindent ov

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-02 Thread Michael Paquier
On Thu, Mar 3, 2016 at 2:20 PM, Craig Ringer wrote: > On the Perl 5.8.8 test env I've set up now, per > > http://www.postgresql.org/message-id/camsr+ygr6pu-guyp-ft98xwxasc9n6j-awzaqxvw_+p3rtc...@mail.gmail.com > > master currently fails with > > t/004_timeline_switch."remove_tree" is not expor

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-03-02 Thread Michael Paquier
On Tue, Mar 1, 2016 at 11:53 AM, Thomas Munro wrote: > On Tue, Mar 1, 2016 at 2:46 PM, Amit Langote > wrote: >> >> Hi, >> >> On 2016/02/29 18:05, Thomas Munro wrote: >>> On Mon, Feb 29, 2016 at 9:05 PM, Amit Langote wrote: + servers. A transaction that is run with causal_reads

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-03-02 Thread Michael Paquier
On Thu, Mar 3, 2016 at 3:34 PM, Michael Paquier wrote: > That's one of my concerns about this patch now: it is trying to do too > much. I think that there is definitely a need for both things: > applications may be fine to pay the lagging price when remote_apply is > used by no

Re: [HACKERS] Re: redo failed in physical streaming replication while stopping the master server

2016-03-02 Thread Michael Paquier
On Wed, Mar 2, 2016 at 4:25 PM, wcting wrote: > /* > * If at page start, we must skip over the page header. But > we can't > * do that until we've read in the page, since the header > size is > * variable. > */ > > i don't know t

Re: [HACKERS] Re: redo failed in physical streaming replication while stopping the master server

2016-03-03 Thread Michael Paquier
On Thu, Mar 3, 2016 at 6:58 PM, lannis wrote: > So in the replay scenario, before we read the page from wal segment file, > using the specical RecPtr which point to the next page header address, can > we predicat the page header is a long or short? I am not sure I am getting what you are looking

Re: [HACKERS] [NOVICE] WHERE clause not used when index is used

2016-03-03 Thread Michael Paquier
On Thu, Mar 3, 2016 at 7:49 PM, Tobias Florek wrote: >> > > Reverted patch in HEAD and 9.5 >> > >> > Is there an ETA? >> > >> >> I just committed the fix to the repo. > > Sorry for being unclear, is there an ETA for a new point-release? Nothing concrete yet. -- Michael -- Sent via pgsql-hacke

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-03 Thread Michael Paquier
On Thu, Mar 3, 2016 at 4:11 PM, Craig Ringer wrote: > The first three are simple fixes that should go in without fuss: > > 001 fixes the above 5.8.8 compat issue. > 002 fixes another minor whoopsie, a syntax error in > src/test/recovery/t/003_recovery_targets.pl that never got noticed because > e

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-03 Thread Michael Paquier
On Thu, Mar 3, 2016 at 10:18 PM, Aleksander Alekseev wrote: > I didn't checked your patch in detail yet but here is a thought I would > like to share. > > In my experience usually it takes number of rewrites before patch will > be accepted. To make sure that after every rewrite your patch still >

[HACKERS] VS 2015 support in src/tools/msvc

2016-03-03 Thread Michael Paquier
Hi all, Microsoft provides a set of VMs that one can use for testing and Windows 10 is in the set: https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/ I have grabbed one and installed the community version of Visual Studio 2015 so I think that I am going to be able to compile Postgres

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-03 Thread Michael Paquier
On Fri, Mar 4, 2016 at 7:21 AM, Petr Jelinek wrote: > Well the source code does not compile on MSVC2015, the perl changes needed > are really tiny, there is some code that needs changes to work with 2015, > particularly in the locale code-page detection area so it's definitely not > just build sys

Re: [HACKERS] Incorrect error message in InitializeSessionUserId

2016-03-03 Thread Michael Paquier
On Fri, Mar 4, 2016 at 10:45 AM, Haribabu Kommi wrote: > On Wed, Mar 2, 2016 at 12:21 AM, Dmitriy Sarafannikov > wrote: >> Hi all, >> >> I have found incorrect error message in InitializeSessionUserId function >> if you try to connect to database by role Oid (for example >> BackgroundWorkerInitia

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-03 Thread Michael Paquier
On Fri, Mar 4, 2016 at 8:22 AM, Craig Ringer wrote: > On 4 March 2016 at 05:08, Alvaro Herrera wrote: >> Patches 0004 and 0007 remain. > > For readers who're not following closely that's the filtering support for > RecursiveCopy and the support for taking filesystem-level backups in > PostgresNod

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-03 Thread Michael Paquier
On Fri, Mar 4, 2016 at 12:59 AM, Aleksander Alekseev wrote: >> The easiest way to perform tests with this patch is to take a debugger >> and enforce the malloc'd pointers to NULL in the code paths. > > I see. Still I don't think it's an excuse to not provide clear steps to > reproduce an issue. As

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-03 Thread Michael Paquier
On Fri, Mar 4, 2016 at 4:06 AM, Andres Freund wrote: > Hi, Thanks for the review. >> +/* >> + * rename_safe -- rename of a file, making it on-disk persistent >> + * >> + * This routine ensures that a rename file persists in case of a crash by >> using >> + * fsync on the old and new files befor

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-03 Thread Michael Paquier
On Fri, Mar 4, 2016 at 9:36 AM, Michael Paquier wrote: > Yeah, that's my first impression as well. We should not need any APIs > changes and the changes would be limited to if extra blocks with > _MSC_VER, if that would occur then I definitely agree that patching > only HEAD

Re: [HACKERS] Greeting for coming back, and where is PostgreSQL going

2016-03-04 Thread Michael Paquier
On Fri, Mar 4, 2016 at 8:20 PM, MauMau wrote: > Long time no see. I'm back. This is a good surprise. > Although you may not remember me, I was certainly here more than a year ago, > submitting tiny patches for bug fixes and trivial functionalities, and > reviewing/testing patches from others.

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-04 Thread Michael Paquier
On Fri, Mar 4, 2016 at 3:54 PM, Michael Paquier wrote: > I still need to dig into that in more details. For the time being the > patch attached is useful IMO to plug in VS 2015 with the existing > infrastructure. So if anybody has a Windows environment, feel free to > play with it

Re: [HACKERS] Equivalent of --enable-tap-tests in MSVC scripts

2016-03-04 Thread Michael Paquier
On Sat, Mar 5, 2016 at 1:16 AM, Craig Ringer wrote: > On 5 March 2016 at 00:10, Alvaro Herrera wrote: >> >> Craig Ringer wrote: >> >> > If it's the result of perltidy changing its mind about the formatting as >> > a >> > result of this change I guess we have to eyeroll and live with it. >> > perl

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-04 Thread Michael Paquier
On Sat, Mar 5, 2016 at 12:08 AM, Alvaro Herrera wrote: > Michael Paquier wrote: > >> - 0001, as mentioned by Petr upthread, psed is removed from the core >> distribution of Perl in 5.22, so when installing ActivePerl it is not >> possible to create probes.h, and the code c

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-04 Thread Michael Paquier
On Sat, Mar 5, 2016 at 1:23 AM, Robert Haas wrote: > On Fri, Mar 4, 2016 at 11:09 AM, Tom Lane wrote: >> Alvaro Herrera writes: >>> I would like to have a patch for this finalized today, so that we can >>> apply to master before or during the weekend; with it in the tree for >>> about a week we

Re: [HACKERS] Publish autovacuum informations

2016-03-04 Thread Michael Paquier
On Sat, Mar 5, 2016 at 6:52 AM, Julien Rouhaud wrote: > Very good suggestion. > > I think the most productive way to work on this is to start a wiki page > to summarize what's the available information, what we should store and > how to represent it. > > I'll update this thread as soon as I'll hav

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-04 Thread Michael Paquier
On Sat, Mar 5, 2016 at 7:35 AM, Andres Freund wrote: > On 2016-03-04 14:51:50 +0900, Michael Paquier wrote: >> On Fri, Mar 4, 2016 at 4:06 AM, Andres Freund wrote: >> > I don't think we want any stat()s here. I'd much, much rather check open >> > for ENOEN

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-04 Thread Michael Paquier
On Sat, Mar 5, 2016 at 7:37 AM, Andres Freund wrote: > On 2016-03-05 07:29:35 +0900, Michael Paquier wrote: >> OK. I could produce that by tonight my time, not before unfortunately. > > I'm switching to this patch, after pushing the pending logical decoding > fixes.

Re: [HACKERS] Publish autovacuum informations

2016-03-04 Thread Michael Paquier
On Sat, Mar 5, 2016 at 9:21 AM, Julien Rouhaud wrote: > On 04/03/2016 23:34, Michael Paquier wrote: >> New design discussions are a little bit late for 9.6 I am afraid :( >> Perhaps we should consider this patch as returned with feedback for >> the time being? The hook appr

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-04 Thread Michael Paquier
On Sat, Mar 5, 2016 at 1:41 PM, Petr Jelinek wrote: > On 04/03/16 15:23, Michael Paquier wrote: >> OK, attached are a set of patches that allowed me to compile Postgres >> using VS2015, in more details: >> - 0001, as mentioned by Petr upthread, psed is removed from the co

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-05 Thread Michael Paquier
On Sat, Mar 5, 2016 at 7:47 AM, Andres Freund wrote: > On 2016-03-05 07:43:00 +0900, Michael Paquier wrote: >> On Sat, Mar 5, 2016 at 7:35 AM, Andres Freund wrote: >> > On 2016-03-04 14:51:50 +0900, Michael Paquier wrote: >> >> On Fri, Mar 4, 2016 at 4:06 AM, Andr

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-05 Thread Michael Paquier
On Sat, Mar 5, 2016 at 11:34 PM, Andrew Dunstan wrote: > Here is a translation into perl of the sed script, courtesy of the s2p > incarnation of psed: > The sed script appears to have been stable for a long time, so I don't think > we need to

Re: [HACKERS] Greeting for coming back, and where is PostgreSQL going

2016-03-07 Thread Michael Paquier
On Sun, Mar 6, 2016 at 2:28 PM, MauMau wrote: > I'm relieved to know that community people use Emacs for editing SGML/XML. > My main editor on Linux is Emacs. Yes, I'm using emacs too for sgml editing. This proves to be quick handy at the end. -- Michael -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Fix handling of invalid sockets returned by PQsocket()

2016-03-07 Thread Michael Paquier
On Sun, Mar 6, 2016 at 12:52 PM, Alvaro Herrera wrote: > Peter Eisentraut wrote: >> On 2/17/16 10:52 PM, Michael Paquier wrote: >> > On Thu, Feb 18, 2016 at 1:58 AM, Alvaro Herrera >> > wrote: >> >> Michael Paquier wrote: >> >>> Hi all, >

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-07 Thread Michael Paquier
On Sun, Mar 6, 2016 at 5:55 AM, Andrew Dunstan wrote: > On 03/05/2016 01:31 PM, Michael Paquier wrote: >> On Sat, Mar 5, 2016 at 11:34 PM, Andrew Dunstan >> wrote: >>> >>> Here is a translation into perl of the sed script, courtesy of the s2p >>> incarna

Re: [HACKERS] How can we expand PostgreSQL ecosystem?

2016-03-07 Thread Michael Paquier
On Mon, Mar 7, 2016 at 9:25 PM, Craig Ringer wrote: > pg_rewind will help a lot there if it proves robust enough - FWIW, some of my colleagues are doing a lot of QE/QA on a HA solution based on pg_rewind, and it is proving to be quite stable for the moment, they are having a hard time breaking it

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-07 Thread Michael Paquier
On Mon, Mar 7, 2016 at 3:38 PM, Andres Freund wrote: > On 2016-03-05 19:54:05 -0800, Andres Freund wrote: >> I started working on this; delayed by taking longer than planned on the >> logical decoding stuff (quite a bit complicated by >> e1a11d93111ff3fba7a91f3f2ac0b0aca16909a8). I'm not very hap

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-07 Thread Michael Paquier
On Tue, Mar 8, 2016 at 12:18 PM, Andres Freund wrote: > On 2016-03-08 12:01:18 +0900, Michael Paquier wrote: >> I have spent a couple of hours looking at that in details, and the >> patch is neat. > > Cool. Doing some more polishing right now. Will be back with an upda

Re: [HACKERS] Badly designed error reporting code in controldata_utils.c

2016-03-07 Thread Michael Paquier
On Mon, Mar 7, 2016 at 10:26 AM, Andres Freund wrote: > FWIW I'm considering implementing elog/ereport properly for the > frontend. We've grown several hacks around that not being present, and > I think those by now have a higher aggregate complexity than a proper > implementation would have. Th

Re: [HACKERS] Badly designed error reporting code in controldata_utils.c

2016-03-07 Thread Michael Paquier
On Tue, Mar 8, 2016 at 1:51 PM, Andres Freund wrote: > On 2016-03-08 13:45:25 +0900, Michael Paquier wrote: >> On Mon, Mar 7, 2016 at 10:26 AM, Andres Freund wrote: >> > FWIW I'm considering implementing elog/ereport properly for the >> > frontend. We'v

Re: [HACKERS] Recovery test failure for recovery_min_apply_delay on hamster

2016-03-07 Thread Michael Paquier
On Wed, Mar 2, 2016 at 2:04 PM, Michael Paquier wrote: > Here are a couple of ways to address this problem: > 1) Remove the check before applying the delay > 2) Increase recovery_min_apply_delay to a time that will allow even > slow machines to see a difference. By experience with the

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-07 Thread Michael Paquier
On Tue, Mar 8, 2016 at 2:55 PM, Andres Freund wrote: > On 2016-03-08 12:26:34 +0900, Michael Paquier wrote: >> On Tue, Mar 8, 2016 at 12:18 PM, Andres Freund wrote: >> > On 2016-03-08 12:01:18 +0900, Michael Paquier wrote: >> >> I have spent a couple of hours looki

Re: [HACKERS] Parallel query fails on standby server

2016-03-08 Thread Michael Paquier
On Tue, Mar 8, 2016 at 9:51 PM, Craig Ringer wrote: > On 8 March 2016 at 20:30, Ashutosh Sharma wrote: >> >> >> While testing a parallel scan feature on standby server, it is found that >> the parallel query fails with an error "ERROR: failed to initialize >> transaction_read_only to 0". >> > >

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-08 Thread Michael Paquier
On Mon, Mar 7, 2016 at 10:40 PM, Michael Paquier wrote: > On Sun, Mar 6, 2016 at 5:55 AM, Andrew Dunstan wrote: >> On 03/05/2016 01:31 PM, Michael Paquier wrote: >>> On Sat, Mar 5, 2016 at 11:34 PM, Andrew Dunstan >>> wrote: >>>> >>>> Here is

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-08 Thread Michael Paquier
Good point. It did not occur to me that this would bring a hard dependency for non-Windows builds. Let's keep both scripts then. The attached is changed to do so. -- Michael From d7a100dae8816ff1287ae0eee2829d2b7ce6ef47 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Tue, 8 Mar 2016 22:

Re: [HACKERS] Recovery test failure for recovery_min_apply_delay on hamster

2016-03-08 Thread Michael Paquier
On Wed, Mar 9, 2016 at 12:14 AM, Alvaro Herrera wrote: > Is there anything we can do to short-circuit the wait in the case that > replication happens promptly? A one-minute wait would be acceptable we > terminate it early by checking every second. After sleeping (best debugger ever) on that, act

Re: [HACKERS] Parallel query fails on standby server

2016-03-08 Thread Michael Paquier
On Wed, Mar 9, 2016 at 12:34 AM, Robert Haas wrote: > On Tue, Mar 8, 2016 at 8:23 AM, Michael Paquier > wrote: >> On Tue, Mar 8, 2016 at 9:51 PM, Craig Ringer wrote: >>> On 8 March 2016 at 20:30, Ashutosh Sharma wrote: >>>> >>>> While testing a p

Re: [HACKERS] Recovery test failure for recovery_min_apply_delay on hamster

2016-03-09 Thread Michael Paquier
On Wed, Mar 9, 2016 at 12:29 PM, Alvaro Herrera wrote: > Michael Paquier wrote: >> After sleeping (best debugger ever) on that, actually a way popped up >> in my mind, and I propose the attached, which refactors a bit 005 and >> checks that the LSN position of master has be

Re: [HACKERS] pg_ctl promote wait

2016-03-09 Thread Michael Paquier
On Mon, Feb 29, 2016 at 4:29 PM, Michael Paquier wrote: > On Mon, Feb 29, 2016 at 4:28 PM, Michael Paquier > wrote: >> I would suggest using >> $node_standby->poll_query_until('SELECT pg_is_in_recovery()') to >> validate the end of the test. > > Meh

Re: [HACKERS] fun with "Ready for Committer" patches

2016-03-09 Thread Michael Paquier
On Wed, Mar 9, 2016 at 9:47 PM, Robert Haas wrote: > On Tue, Mar 8, 2016 at 9:44 PM, Craig Ringer wrote: >> On 9 March 2016 at 07:18, Tatsuo Ishii wrote: >>> Many of "needs review" state patches already have reviewer(s). Do you >>> mean we want more reviewers in addition to them for such patches

Re: [HACKERS] fun with "Ready for Committer" patches

2016-03-09 Thread Michael Paquier
On Wed, Mar 9, 2016 at 10:19 PM, Andres Freund wrote: > On 2016-03-10 06:14:25 +0900, Michael Paquier wrote: >> IMO, during a review one needs to think of himself as a committer. >> Once the reviewer switches the patch to "Ready for committer", it >> means tha

Re: [HACKERS] Improving replay of XLOG_BTREE_VACUUM records

2016-03-09 Thread Michael Paquier
On Thu, Mar 10, 2016 at 1:29 AM, David Steele wrote: > On 1/8/16 9:34 AM, Alvaro Herrera wrote: >> Simon Riggs wrote: >>> >>> On 8 January 2016 at 13:36, Alvaro Herrera >>> wrote: I would agree except for the observation on toast indexes. I think that's an important enough use cas

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-09 Thread Michael Paquier
On Wed, Mar 9, 2016 at 12:13 AM, Alvaro Herrera wrote: > Robert Haas wrote: >> I'm pretty meh about the whole idea of this function, though, >> actually, and I don't see a single clear +1 vote for this >> functionality upthread. (Apologies if I've missed one.) In the >> absence of a few of those

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-09 Thread Michael Paquier
On Thu, Mar 10, 2016 at 12:12 AM, Alvaro Herrera wrote: > Aleksander Alekseev wrote: >> pg_receivexlog: could not send replication command "START_REPLICATION": >> out of memory pg_receivexlog: disconnected; waiting 5 seconds to try >> again pg_receivexlog: starting log streaming at 0/100 (time

Re: [HACKERS] pg_rewind just doesn't fsync *anything*?

2016-03-09 Thread Michael Paquier
On Thu, Mar 10, 2016 at 4:43 AM, Andres Freund wrote: > how come that the only comment in pg_rewind about fsyncing is ' > void > close_target_file(void) > { > ... > /* fsync? */ > } > > Isn't that a bit, uh, minimal for a utility that's likely to be used in > failover scenarios? > > I thin

Re: [HACKERS] pg_rewind just doesn't fsync *anything*?

2016-03-09 Thread Michael Paquier
On Thu, Mar 10, 2016 at 8:37 AM, Abhijit Menon-Sen wrote: > At 2016-03-10 08:35:43 +0100, michael.paqu...@gmail.com wrote: >> >> > I guess the easiest fix would be to shell out to initdb -s? >> >> What do you mean? I am not sure what initdb has to do with that as we >> have no need for it in pg_re

Re: [HACKERS] Improving replay of XLOG_BTREE_VACUUM records

2016-03-10 Thread Michael Paquier
On Thu, Mar 10, 2016 at 10:00 AM, Vladimir Borodin wrote: > Let’s do immediately after you will send a new version of your patch? Or > even better after testing your patch? Don’t get me wrong, but rejecting my > patch without tangible work on your patch may lead to forgiving about the > problem be

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Michael Paquier
On Thu, Mar 10, 2016 at 4:58 PM, Robert Haas wrote: > On Thu, Mar 10, 2016 at 10:30 AM, Simon Riggs wrote: >> On 10 March 2016 at 06:53, Michael Paquier >> wrote: >>> >>> On Wed, Mar 9, 2016 at 12:13 AM, Alvaro Herrera >>> wrote: >>> > Ro

  1   2   3   4   5   6   7   8   9   10   >