Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-11-17 Thread Simon Riggs
On 28 October 2014 11:34, Michael Paquier michael.paqu...@gmail.com wrote: On Tue, Oct 28, 2014 at 8:08 PM, Petr Jelinek p...@2ndquadrant.com wrote: Hi, On 28/10/14 03:15, Michael Paquier wrote: Updated patch with those comments addressed is attached. Great, I have no further comments so

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-11-17 Thread Michael Paquier
On Tue, Nov 18, 2014 at 7:13 AM, Simon Riggs si...@2ndquadrant.com wrote: Committed. Thanks very much for pushing forwards with this. Thanks. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-28 Thread Petr Jelinek
Hi, On 28/10/14 03:15, Michael Paquier wrote: Updated patch with those comments addressed is attached. Great, I have no further comments so I consider this patch ready for committer (and will mark it so momentarily). Just as a note - there is the issue you raised yourself about the less

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-28 Thread Michael Paquier
On Tue, Oct 28, 2014 at 8:08 PM, Petr Jelinek p...@2ndquadrant.com wrote: Hi, On 28/10/14 03:15, Michael Paquier wrote: Updated patch with those comments addressed is attached. Great, I have no further comments so I consider this patch ready for committer (and will mark it so

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-27 Thread Petr Jelinek
On 17/10/14 06:25, Michael Paquier wrote: Two votes in favor of that from two committers sounds like a deal. Here is an refreshed version of the patch introducing --snapshot from here, after fixing a couple of things and adding documentation:

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-27 Thread Michael Paquier
On Mon, Oct 27, 2014 at 7:37 PM, Petr Jelinek p...@2ndquadrant.com wrote: I have two minor things: + printf(_( --snapshot use given synchronous snapshot for the dump\n)); Thanks for your input! I think this should say --snapshot=NAME or something like that to make it

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-16 Thread Robert Haas
On Wed, Oct 15, 2014 at 1:06 AM, Andres Freund and...@2ndquadrant.com wrote: I personally think we should just disregard the race here and add a snapshot parameter. The race is already there and not exactly small. Let's not kid ourselves that hiding it solves anything. I, too, favor that plan.

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-16 Thread Michael Paquier
On Fri, Oct 17, 2014 at 12:19 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Oct 15, 2014 at 1:06 AM, Andres Freund and...@2ndquadrant.com wrote: I personally think we should just disregard the race here and add a snapshot parameter. The race is already there and not exactly small.

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-15 Thread Michael Paquier
On Wed, Oct 15, 2014 at 2:46 PM, Andres Freund and...@2ndquadrant.com wrote: This seems more user-friendly. But well I agree that we could do a larger set of things that could be used for even other purposes: - Ability to define snapshot name with pg_dump - Take system or database-wide

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-14 Thread Petr Jelinek
On 22/09/14 02:24, Michael Paquier wrote: On Thu, Sep 4, 2014 at 11:33 PM, Michael Paquier Taking a dump consistent with a replication slot is useful for online upgrade cases first, because you can simply run pg_dump, have a slot created, and get as well a state of the database consistent with

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-14 Thread Michael Paquier
On Tue, Oct 14, 2014 at 11:55 PM, Petr Jelinek p...@2ndquadrant.com wrote: On 22/09/14 02:24, Michael Paquier wrote: On Thu, Sep 4, 2014 at 11:33 PM, Michael Paquier Taking a dump consistent with a replication slot is useful for online upgrade cases first, because you can simply run pg_dump,

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-14 Thread Andres Freund
On 2014-10-15 07:09:10 +0900, Michael Paquier wrote: whatever replication solution you use and just have pg_dump accept the snapshot as input parameter? I am not sure how much I like pg_dump creating the slot. I am aware that you need to have the replication connection open but that's IMHO

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-14 Thread Michael Paquier
On Wed, Oct 15, 2014 at 2:06 PM, Andres Freund and...@2ndquadrant.com wrote: I think that's completely the wrong way to go at this. The time it takes to create a replication slot under write load is far larger than the time it takes to start pg_dump and load. This really doesn't add any

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-10-14 Thread Andres Freund
On 2014-10-15 14:28:16 +0900, Michael Paquier wrote: On Wed, Oct 15, 2014 at 2:06 PM, Andres Freund and...@2ndquadrant.com wrote: I think that's completely the wrong way to go at this. The time it takes to create a replication slot under write load is far larger than the time it takes to

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-09-21 Thread Michael Paquier
On Thu, Sep 4, 2014 at 11:33 PM, Michael Paquier michael.paqu...@gmail.com wrote: Thoughts? I have been poking at that during the long flight back from Chicago and created the attached patch that makes pg_dump able to create a replication slot (hence have pg_dump put its hands on a synchronized

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-09-04 Thread Michael Paquier
On Wed, Sep 3, 2014 at 11:57 PM, Robert Haas robertmh...@gmail.com wrote: I didn't find that option to be terribly important then, but I don't see how we can possibly get by without it now, unless our goal is to make logical decoding as hard to use as we possibly can. Yes. With 9.4 it is

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-09-03 Thread Robert Haas
On Mon, Sep 1, 2014 at 5:30 AM, Andres Freund and...@2ndquadrant.com wrote: Hi, Currently pg_dump does not allow a user to specify an exported snapshot name that he would like to use for a dump using SET TRANSACTION SNAPSHOT (now pg_export_snapshot is only used for parallel pg_dump within

[HACKERS] Better support of exported snapshots with pg_dump

2014-09-01 Thread Michael Paquier
Hi all, Currently pg_dump does not allow a user to specify an exported snapshot name that he would like to use for a dump using SET TRANSACTION SNAPSHOT (now pg_export_snapshot is only used for parallel pg_dump within it). I imagine that this would be handy to take a consistent dump of a given

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-09-01 Thread Bernd Helmle
--On 1. September 2014 17:00:32 +0900 Michael Paquier michael.paqu...@gmail.com wrote: Currently pg_dump does not allow a user to specify an exported snapshot name that he would like to use for a dump using SET TRANSACTION SNAPSHOT (now pg_export_snapshot is only used for parallel pg_dump

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-09-01 Thread Andres Freund
Hi, On 2014-09-01 10:25:58 +0200, Bernd Helmle wrote: --On 1. September 2014 17:00:32 +0900 Michael Paquier michael.paqu...@gmail.com wrote: Currently pg_dump does not allow a user to specify an exported snapshot name that he would like to use for a dump using SET TRANSACTION SNAPSHOT (now

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-09-01 Thread Michael Paquier
On Mon, Sep 1, 2014 at 6:30 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-09-01 10:25:58 +0200, Bernd Helmle wrote: There was a discussion of this kind of feature some time ago here:

Re: [HACKERS] Better support of exported snapshots with pg_dump

2014-09-01 Thread Andres Freund
On 2014-09-01 21:54:24 +0900, Michael Paquier wrote: On Mon, Sep 1, 2014 at 6:30 PM, Andres Freund and...@2ndquadrant.com wrote: I was never convinced of the reasoning in that thread. Possibly things have changed enough now that logical decoding is in core... Well, the test case I got in