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

Re: [HACKERS] [PATH] Correct negative/zero year in to_date/to_timestamp

2016-02-28 Thread Yury Zhuravlev
But I'm waiting for a discussion: what part should be changed? I for compliance with the standard (all ISO). In addition Oracle uses "IYYY" format. Standards allow to reduce liability. But I think someone like Tom Lane can have the final say because we break backward compatibility. Options

Re: [HACKERS] Relation cache invalidation on replica

2016-02-28 Thread Simon Riggs
On 27 February 2016 at 07:52, Konstantin Knizhnik wrote: > On 02/27/2016 04:16 AM, Simon Riggs wrote: > > On 27 February 2016 at 00:33, Simon Riggs wrote: > >> On 27 February 2016 at 00:29, Andres Freund wrote: >> >>> On

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

2016-02-28 Thread Konstantin Knizhnik
On 02/27/2016 11:38 PM, Kevin Grittner wrote: Is this an implementation of some particular formal technique? If so, do you have a reference to a paper on it? I get the sense that there has been a lot written about distributed transactions, and that it would be a mistake to ignore it, but I

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

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

2016-02-28 Thread Craig Ringer
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. > > > > Finally pushed it. Let's see how it does in the buildfarm.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Respect TEMP_CONFIG when running contrib regression tests.

2016-02-28 Thread Andrew Dunstan
On 02/27/2016 01:24 PM, John Gorman wrote: On Sat, Feb 27, 2016 at 9:25 AM, Robert Haas > wrote: On Sat, Feb 27, 2016 at 7:08 PM, Andrew Dunstan > wrote: > Perhaps what we

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 the

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 out with this

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-02-28 Thread Dilip Kumar
On Sat, Feb 27, 2016 at 5:14 AM, Andres Freund wrote: > > > > >> ./pgbench -j$ -c$ -T300 -M prepared -S postgres > > > > >> > > > > >> ClientBasePatch > > > > >> 11716916454 > > > > >> 8108547105559 > > > > >> 32241619262818 > > > > >> 64

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-02-28 Thread Petr Jelinek
Hi, thanks for looking Andres, On 27/02/16 01:05, Andres Freund wrote: Hi, I'm not really convinced by RegisterStandbyMsgPrefix() et al. There's not much documentation about what it actually is supposed to acomplish. Afaics you're basically forced to use shared_preload_libraries with it

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

2016-02-28 Thread Simon Riggs
On 27 February 2016 at 22:38, Kevin Grittner wrote: > That could be part of a solution. What I sketched out with the > "apparent order of execution" ordering of the transactions > (basically, commit order except when one SERIALIZABLE transaction > needs to be dragged in

Re: [HACKERS] WIP: Upper planner pathification

2016-02-28 Thread Andres Freund
Hi, On 2016-02-28 15:03:28 -0500, Tom Lane wrote: > Those with long memories will recall that I've been waving my arms about > $SUBJECT for more than five years. I started to work seriously on a patch > last summer, and here is a version that I feel comfortable exposing to > public scrutiny

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-02-28 Thread Andres Freund
Hi, On 2016-02-28 22:44:12 +0100, Petr Jelinek wrote: > On 27/02/16 01:05, Andres Freund wrote: > >I'm not really convinced by RegisterStandbyMsgPrefix() et al. There's > >not much documentation about what it actually is supposed to > >acomplish. Afaics you're basically forced to use >

[HACKERS] WIP: Upper planner pathification

2016-02-28 Thread Tom Lane
Those with long memories will recall that I've been waving my arms about $SUBJECT for more than five years. I started to work seriously on a patch last summer, and here is a version that I feel comfortable exposing to public scrutiny (which is not to call it "done"; more below). The basic point

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2016-02-28 Thread Joe Conway
On 02/28/2016 05:16 AM, Michael Paquier wrote: > +Returns information about current controldata file state. > s/controldata/control data? > > + > + > + > + Column Name > + Data Type > + > + > + > Having a description of each field would be nice.

Re: [HACKERS] Declarative partitioning

2016-02-28 Thread Ildar Musin
16/02/16 07:46, Amit Langote wrote: Hi Josh, On 2016/02/16 11:41, Josh berkus wrote: On 02/15/2016 04:28 PM, Amit Langote wrote: Also, you won't see any optimizer and executor changes. Queries will still use the same plans as existing inheritance-based partitioned tables, although as I

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

Re: [HACKERS] pg_ctl promote wait

2016-02-28 Thread Peter Eisentraut
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. Here is a patch set around that idea. The subsequent discussion

Re: [HACKERS] Proposal: SET ROLE hook

2016-02-28 Thread Joe Conway
On 01/07/2016 09:08 AM, Joe Conway wrote: > On 01/06/2016 10:36 AM, Tom Lane wrote: >> I think a design that was actually somewhat robust would require two >> hooks, one at check_role and one at assign_role, wherein the first one >> would do any potentially-failing work and package all required

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-02-28 Thread Craig Ringer
On 17 December 2015 at 10:08, Craig Ringer wrote: > On 15 December 2015 at 20:17, Andres Freund wrote: >> >> >> I think this is quite the wrong approach. You're calling the logical >> decoding callback directly from decode.c, circumventing >>

[HACKERS] Improve error handling in pltcl

2016-02-28 Thread Jim Nasby
Per discussion in [1], this patch improves error reporting in pltcl. pltcl_error_objects.patch applies on top of the pltcl_objects_2.patch referenced in [2]. pltcl_error_master.patch applies against current master. [1]

Re: [HACKERS] [PATH] Correct negative/zero year in to_date/to_timestamp

2016-02-28 Thread Vitaly Burovoy
On 2/27/16, Robert Haas wrote: > On Tue, Feb 23, 2016 at 6:23 AM, Thomas Munro > wrote: >> This seems to be a messy topic. The usage of "AD" and "BC" imply that >> TO_DATE is using the anno domini system which doesn't have a year 0, >> but

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-02-28 Thread Amit Kapila
On Sun, Feb 28, 2016 at 9:05 PM, Dilip Kumar wrote: > > > On Sat, Feb 27, 2016 at 5:14 AM, Andres Freund wrote: >> >> > > > >> ./pgbench -j$ -c$ -T300 -M prepared -S postgres >> > > > >> >> > > > >> ClientBasePatch >> > > > >> 117169

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

Re: [HACKERS] Declarative partitioning

2016-02-28 Thread Amit Langote
Hi Ildar, On 2016/02/29 7:14, Ildar Musin wrote: > 16/02/16 07:46, Amit Langote wrote: >> On 2016/02/16 11:41, Josh berkus wrote: >>> We're not going to use CE for the new partitioning long-term, are we? This >>> is just the first version, right? >> Yes. My approach in previous versions of

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-02-28 Thread Dilip Kumar
On Mon, Feb 29, 2016 at 8:26 AM, Amit Kapila wrote: > Have you tried by reverting the commits 6150a1b0 and ac1d794, which I > think effects read-only performance and sometimes create variation in TPS > across different runs, here second might have less impact, but first

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

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

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. --

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