Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-23 Thread Michael Paquier
On Sun, Oct 23, 2016 at 10:28 PM, Magnus Hagander wrote: > It also broke the tests and invalidated some documentation. But it was easy > enough to fix. > > I've now applied this, so next time you get to do the merging :P Joking > aside, please review and let me know if you

Re: [HACKERS] issue with track_commit_timestamp and server restart

2016-10-23 Thread Craig Ringer
On 24 October 2016 at 12:58, Craig Ringer wrote: > The attached patch adds a TAP test to src/test/recovery to show this. Added to CF. https://commitfest.postgresql.org/11/834/ ... but IMO this should go in the next bugfix release. I've also applied nearly the same fix

Re: [HACKERS] issue with track_commit_timestamp and server restart

2016-10-23 Thread Michael Paquier
(thread hijacking) On Mon, Oct 24, 2016 at 1:58 PM, Craig Ringer wrote: > To save time running the recovery suite, just > >rm src/test/recovery/00[0-8]*.pl > > (It'd be nice to have a prove_check target to run just one test file). Agreed! Or multiple chosen files. I

Re: [HACKERS] issue with track_commit_timestamp and server restart

2016-10-23 Thread Craig Ringer
On 22 October 2016 at 19:51, Julien Rouhaud wrote: > I just noticed that if track_commit_timestamp is enabled, the > oldestCommitTsXid and newestCommitTsXid don't persist after a server > restart, so you can't ask for the commit ts of a transaction that > committed

Re: [HACKERS] [COMMITTERS] pgsql: Remove extra comma at end of enum list

2016-10-23 Thread Michael Paquier
(Moved to -hackers) On Sun, Oct 23, 2016 at 10:57 PM, Magnus Hagander wrote: > Remove extra comma at end of enum list > > C99-specific feature, and wasn't intentional in the first place. > > Per buildfarm member mylodon This is the second time I see that in the last couple

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-23 Thread Michael Paquier
On Mon, Oct 24, 2016 at 1:38 PM, Andres Freund wrote: > On 2016-10-17 14:37:05 +0900, Michael Paquier wrote: >> 2) Add an option to pg_xlogdump to be able to output its output to a >> file. That would be awkward to rely on grabbing the output data from a >> pipe... On Windows

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-23 Thread Amit Kapila
On Mon, Oct 24, 2016 at 9:18 AM, Kyotaro HORIGUCHI wrote: > Thank you for looking and retelling this. > > At Fri, 21 Oct 2016 13:02:21 -0400, Robert Haas wrote > in >> On

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-23 Thread Andres Freund
On 2016-10-17 14:37:05 +0900, Michael Paquier wrote: > 2) Add an option to pg_xlogdump to be able to output its output to a > file. That would be awkward to rely on grabbing the output data from a > pipe... On Windows particularly. Thinking about it, would that > actually be useful to others?

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-23 Thread Michael Paquier
On Sun, Oct 23, 2016 at 10:52 PM, Michael Paquier wrote: > On Sun, Oct 23, 2016 at 10:30 PM, Magnus Hagander wrote: >> I think both of those would be worthwhile. Just for the testability in >> itself, but such a flag to pg_xlogdump would probably

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-23 Thread Amit Kapila
On Fri, Oct 21, 2016 at 10:32 PM, Robert Haas wrote: > On Sun, Oct 2, 2016 at 8:52 AM, Michael Paquier > wrote: >>> So, if I understand correctly, then we can mark the version posted by >>> you upthread [1] which includes a test along with

Re: [HACKERS] FSM corruption leading to errors

2016-10-23 Thread Michael Paquier
On Sat, Oct 22, 2016 at 7:31 AM, Michael Paquier wrote: > On Sat, Oct 22, 2016 at 5:17 AM, Jim Nasby wrote: >> On 10/20/16 10:15 PM, Michael Paquier wrote: >>> >>> 2) If anything is found, stop the server and delete the files manually. >>> 3)

Re: [HACKERS] [BUG] pg_basebackup from disconnected standby fails

2016-10-23 Thread Kyotaro HORIGUCHI
Thank you for looking and retelling this. At Fri, 21 Oct 2016 13:02:21 -0400, Robert Haas wrote in > On Sun, Oct 2, 2016 at 8:52 AM, Michael Paquier > wrote: > >> So, if I

[HACKERS] Add radiustimeout parameter for RADIUS HBA

2016-10-23 Thread Samuel D. Leslie
Hello everyone, I’d like to submit the attached patch for feedback from the PostgreSQL community and potential future inclusion in the codebase. The patch adds a new parameter to the RADIUS authentication method named “radiustimeout”, allowing the database administrator to configure the

[HACKERS] Minor code improvement to postgresGetForeignJoinPaths

2016-10-23 Thread Tatsuro Yamada
Hi, The last argument of create_foreignscan_path called by postgresGetForeignJoinPaths is set to NULL, but it would be suitable to set it to NIL because the argument type is List. Please find attached a patch. Tatsuro Yamada NTT Open Source Software Center diff --git

Re: [HACKERS] LLVM Address Sanitizer (ASAN) and valgrind support

2016-10-23 Thread Noah Misch
On Thu, Oct 20, 2016 at 06:14:28PM +0100, Greg Stark wrote: > On Oct 20, 2016 5:27 PM, "Noah Misch" wrote: > > On Wed, Oct 19, 2016 at 11:08:39AM +0100, Greg Stark wrote: > > > The MEMPOOL_FREE doesn't take any size argument and mcxt.c doesn't > > > have convenient access to a

Re: [HACKERS] On conflict update & hint bits

2016-10-23 Thread Peter Geoghegan
On Sun, Oct 23, 2016 at 2:46 PM, Tom Lane wrote: > What's bothering me is (a) it's less than 24 hours to release wrap and > (b) this patch changes SSI-relevant behavior and hasn't been approved > by Kevin. I'm not familiar enough with that logic to commit a change > in it on

Re: [HACKERS] On conflict update & hint bits

2016-10-23 Thread Tom Lane
Peter Geoghegan writes: > On Sun, Oct 23, 2016 at 1:42 PM, Tom Lane wrote: >> "Rarely" is not "never". A bigger problem though is that heap_fetch >> does more than just lock the buffer: there are also PredicateLockTuple >> and CheckForSerializableConflictOut

Re: [HACKERS] On conflict update & hint bits

2016-10-23 Thread Peter Geoghegan
On Sun, Oct 23, 2016 at 1:42 PM, Tom Lane wrote: > "Rarely" is not "never". A bigger problem though is that heap_fetch > does more than just lock the buffer: there are also PredicateLockTuple > and CheckForSerializableConflictOut calls in there. It's possible that > those

Re: [HACKERS] On conflict update & hint bits

2016-10-23 Thread Tom Lane
Peter Geoghegan writes: > On Sat, Oct 22, 2016 at 9:38 AM, Tom Lane wrote: >> 1. Why are you replacing ExecOnConflictUpdate's ExecCheckHeapTupleVisible >> call with ExecCheckTIDVisible? That appears to demand a re-fetch of the >> tuple ExecOnConflictUpdate

Re: [HACKERS] Avoiding pin scan during btree vacuum

2016-10-23 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, Oct 19, 2016 at 6:30 PM, Alvaro Herrera > wrote: > > Robert Haas wrote: > >> On Mon, Jan 4, 2016 at 10:30 AM, Tom Lane wrote: > >> >> This seems like a might subtle thing to backpatch. If we really want to > >> >> go

Re: [HACKERS] pg_xlog error on the master

2016-10-23 Thread Venkata B Nagothi
On Sunday, 23 October 2016, Michael Paquier wrote: > On Sun, Oct 23, 2016 at 5:05 PM, Venkata B Nagothi > wrote: > > I just did did a "git pull" to test one of my patches and i get the > > following error : > > > > 2016-10-23 18:51:47.679 AEDT

[HACKERS] Assertion failures due to testing visibility without buffer lock

2016-10-23 Thread Tom Lane
Looking at the issue raised in https://www.postgresql.org/message-id/flat/57EE93C8.8080504%40postgrespro.ru prompted me to wonder whether there were any other places in which we were calling tqual.c routines without holding buffer content lock. I tried adding Assert(BufferIsLocal(buffer) ||

Re: [HACKERS] condition variables

2016-10-23 Thread Peter Geoghegan
On Tue, Oct 4, 2016 at 12:12 PM, Thomas Munro wrote: > Here's a rebased patch. ConditionVariableSleep now takes > wait_event_info. Anyone using this in patches for core probably needs > to add enumerators to the WaitEventXXX enums in pgstat.h to describe > their

Re: [HACKERS] PATCH: two slab-like memory allocators

2016-10-23 Thread Petr Jelinek
On 23/10/16 16:26, Tomas Vondra wrote: > On 10/22/2016 08:30 PM, Tomas Vondra wrote: >> On 10/20/2016 04:43 PM, Robert Haas wrote: >>> >>> ... >>> >>> The sb_alloc allocator I proposed a couple of years ago would work >>> well for this case, I think. >>> >> >> Maybe, but it does not follow the

Re: [HACKERS] PATCH: two slab-like memory allocators

2016-10-23 Thread Tomas Vondra
On 10/22/2016 08:30 PM, Tomas Vondra wrote: On 10/20/2016 04:43 PM, Robert Haas wrote: >> ... The sb_alloc allocator I proposed a couple of years ago would work well for this case, I think. Maybe, but it does not follow the Memory Context design at all, if I understand it correctly. I was

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-23 Thread Michael Paquier
On Sun, Oct 23, 2016 at 10:30 PM, Magnus Hagander wrote: > On Mon, Oct 17, 2016 at 7:37 AM, Michael Paquier > wrote: >> > But independent of this patch, actually putting that test in for non-tar >> > mode would probably not be a bad idea -- if that

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-23 Thread Magnus Hagander
On Mon, Oct 17, 2016 at 7:37 AM, Michael Paquier wrote: > On Sat, Oct 15, 2016 at 8:51 AM, Magnus Hagander > wrote: > > Fixed. > > Ok, I had a extra look on the patch: > + The transactionn log files are written to a separate file > +

Re: [HACKERS] pg_basebackup stream xlog to tar

2016-10-23 Thread Magnus Hagander
On Fri, Oct 21, 2016 at 2:02 PM, Michael Paquier wrote: > On Mon, Oct 17, 2016 at 2:37 PM, Michael Paquier > wrote: > > Except that it looks in pretty good to me, so I am switching that as > > ready for committer. > > + /* > +*

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2016-10-23 Thread Michael Paquier
On Sun, Oct 23, 2016 at 5:18 PM, Vik Fearing wrote: > On 10/22/2016 06:00 PM, David Steele wrote: >> On 10/22/16 6:58 PM, Bruce Momjian wrote: >>> On Sat, Oct 22, 2016 at 07:33:56AM +0900, Michael Paquier wrote: On Sat, Oct 22, 2016 at 4:29 AM, Alvaro Herrera >

Re: [HACKERS] pg_xlog error on the master

2016-10-23 Thread Michael Paquier
On Sun, Oct 23, 2016 at 5:05 PM, Venkata B Nagothi wrote: > I just did did a "git pull" to test one of my patches and i get the > following error : > > 2016-10-23 18:51:47.679 AEDT [31930] FATAL: could not open archive status > directory "pg_xlog/archive_status": No such file

Re: [HACKERS] Renaming of pg_xlog and pg_clog

2016-10-23 Thread Vik Fearing
On 10/22/2016 06:00 PM, David Steele wrote: > On 10/22/16 6:58 PM, Bruce Momjian wrote: >> On Sat, Oct 22, 2016 at 07:33:56AM +0900, Michael Paquier wrote: >>> On Sat, Oct 22, 2016 at 4:29 AM, Alvaro Herrera >>> Also +1 to renaming pg_subtrans to pg_subxact. >>> >>> Nice suggestion, good

[HACKERS] pg_xlog error on the master

2016-10-23 Thread Venkata B Nagothi
I just did did a "git pull" to test one of my patches and i get the following error : 2016-10-23 18:51:47.679 AEDT [31930] FATAL: could not open archive status directory "pg_xlog/archive_status": No such file or directory 2016-10-23 18:51:47.679 AEDT [31841] LOG: archiver process (PID 31930)