Re: Converting plpgsql to use DTYPE_REC for named composite types

2017-12-30 Thread Pavel Stehule
2017-12-30 0:16 GMT+01:00 Tom Lane : > I wrote: > > I'll stick this into the January commitfest, but I'd like to get it > > reviewed and committed pretty soon, because there are follow-on patches > > that need to get done in time for v11 --- in particular, we need to close > >

Re: Why standby restores some WALs many times from archive?

2017-12-30 Thread Sergey Burladyan
Michael Paquier writes: > On Sat, Dec 30, 2017 at 04:30:07AM +0300, Sergey Burladyan wrote: > > We use this scripts: > > https://github.com/avito-tech/dba-utils/tree/master/pg_archive > > > > But I can reproduce problem with simple cp & mv: > > archive_command: > >

Faster inserts with mostly-monotonically increasing values

2017-12-30 Thread Pavan Deolasee
Hello All, On a per-session basis, we cache the last heap block used for inserts and try to use the same block for subsequent inserts. We don't do that for indexes because the target block in the index is determined by the overall structure of the index and the index key being inserted and hence

Re: [HACKERS] Commits don't block for synchronous replication

2017-12-30 Thread Masahiko Sawada
On Sat, Dec 30, 2017 at 9:25 PM, Michael Paquier wrote: > On Fri, Dec 29, 2017 at 02:45:09PM +, Simon Riggs wrote: >> Applied, thanks. Thank you! Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center

Better testing coverage and unified coding for plpgsql loops

2017-12-30 Thread Tom Lane
While I've been fooling around with plpgsql, I've been paying close attention to code coverage reports to make sure that the regression tests exercise all that new code. It started to bug me that there were some serious gaps in the test coverage for existing code in pl_exec.c. One thing I noticed

Re: What does Time.MAX_VALUE actually represent?

2017-12-30 Thread Gavin Flower
On 12/31/2017 03:07 AM, Dave Cramer wrote: We are having a discussion on the jdbc project about dealing with 24:00:00. https://github.com/pgjdbc/pgjdbc/pull/992#issuecomment-354507612 Dave Cramer In Dublin (I was there 2001 to 2004), Time tables show buses just after midnight, such as

Re: [HACKERS] Re: [HACKERS] generated columns

2017-12-30 Thread Joe Conway
On 12/27/2017 09:31 AM, Peter Eisentraut wrote: > On 9/12/17 15:35, Jaime Casanova wrote: >> On 10 September 2017 at 00:08, Jaime Casanova >> wrote: >>> >>> During my own tests, though, i found some problems: > > Here is an updated patch that should address the

Re: TAP test module - PostgresClient

2017-12-30 Thread Andrew Dunstan
On 12/30/2017 10:45 AM, Tom Lane wrote: > Andrew Dunstan writes: >> As for out-dating, if we used DBD::PgPP we'd not be not in great danger >> there - it doesn't appear to have changed for many years - latest >> version is dated 2010. If we were to use it we'd

Re: TAP test module - PostgresClient

2017-12-30 Thread Tom Lane
Andrew Dunstan writes: > As for out-dating, if we used DBD::PgPP we'd not be not in great danger > there - it doesn't appear to have changed for many years - latest > version is dated 2010. If we were to use it we'd have a dependency on > DBI, but that in itself

Re: [HACKERS] taking stdbool.h into use

2017-12-30 Thread Tom Lane
Michael Paquier writes: > So, looking at 0001 now... Shouldn't there be a DatumGetBool8(), with > the existing DatumGetBool() which should depend on the size of bool? I > can see that all the catalogs are correctly updated with bool8 in the > patch. Surely bool and

Re: TAP test module - PostgresClient

2017-12-30 Thread Andrew Dunstan
On 12/29/2017 08:12 AM, Tels wrote: > On Thu, December 28, 2017 10:14 pm, Tom Lane wrote: >> Craig Ringer writes: >>> Another option might be to teach the TAP infrastructure and the >>> buildfarm >>> client how to fetch cpanminus and build DBD::Pg against our build-tree,

What does Time.MAX_VALUE actually represent?

2017-12-30 Thread Dave Cramer
We are having a discussion on the jdbc project about dealing with 24:00:00. https://github.com/pgjdbc/pgjdbc/pull/992#issuecomment-354507612 Dave Cramer

Re: [HACKERS] taking stdbool.h into use

2017-12-30 Thread Michael Paquier
On Sat, Dec 30, 2017 at 08:29:09AM +0900, Michael Paquier wrote: > On Fri, Dec 29, 2017 at 12:33:24PM -0500, Tom Lane wrote: >> It does make sense, probably, to push 0001-0003 first and see if >> anything turns up from that, then 0004. > > I have not looked at 0001 in details yet, which was going

Re: [HACKERS] Commits don't block for synchronous replication

2017-12-30 Thread Michael Paquier
On Fri, Dec 29, 2017 at 02:45:09PM +, Simon Riggs wrote: > Applied, thanks. Thanks, Simon. -- Michael signature.asc Description: PGP signature

Re: Why standby restores some WALs many times from archive?

2017-12-30 Thread Michael Paquier
On Sat, Dec 30, 2017 at 04:30:07AM +0300, Sergey Burladyan wrote: > We use this scripts: > https://github.com/avito-tech/dba-utils/tree/master/pg_archive > > But I can reproduce problem with simple cp & mv: > archive_command: > test ! -f /var/lib/postgresql/wals/%f && \ > test ! -f

Changing WAL Header to reduce contention during ReserveXLogInsertLocation()

2017-12-30 Thread Simon Riggs
Comments in ReserveXLogInsertLocation() says "* This is the performance critical part of XLogInsert that must be serialized * across backends. The rest can happen mostly in parallel. Try to keep this * section as short as possible, insertpos_lck can be heavily contended on a * busy system."

Re: New gist vacuum.

2017-12-30 Thread Andrey Borodin
Hi! > 28 дек. 2017 г., в 16:37, Andrey Borodin написал(а): > Here is new version of the patch for GiST VACUUM. > There are two main changes: > 1. During rescan for page deletion only know to be recently empty pages are > rescanned. > 2. I've re-implemented physical scan