Re: [HACKERS] Implementing pg_receivewal --no-sync

2017-10-29 Thread Michael Paquier
On Sun, Oct 29, 2017 at 12:31 AM, Robert Haas  wrote:
> On Sun, Oct 29, 2017 at 3:42 AM, Michael Paquier
>  wrote:
>> Okay. Here is an updated patch incorporating those comments.
>
> Committed with a little wordsmithing on the documentation.

Thanks all.
-- 
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] Implementing pg_receivewal --no-sync

2017-10-29 Thread Robert Haas
On Sun, Oct 29, 2017 at 3:42 AM, Michael Paquier
 wrote:
> Okay. Here is an updated patch incorporating those comments.

Committed with a little wordsmithing on the documentation.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
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] Implementing pg_receivewal --no-sync

2017-10-28 Thread Michael Paquier
On Fri, Oct 27, 2017 at 12:03 AM, Michael Paquier
 wrote:
> On Thu, Oct 26, 2017 at 10:46 PM, Robert Haas  wrote:
>> On Wed, Oct 25, 2017 at 10:03 PM, Michael Paquier
>>  wrote:
>>> This sentence is actually wrong, a feedback message is never sent with
>>> the feedback message.
>>
>> Eh?
>
> "A feedback message is never sent depending on the status interval".
>
>> I think this looks basically fine, though I'd omit the short option
>> for it.  There are only so many letters in the alphabet, so let's not
>> use them up for developer-convenience options.
>
> No objections to that.

Okay. Here is an updated patch incorporating those comments.
-- 
Michael


pg_receivewal_nosync_v3.patch
Description: Binary data

-- 
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] Implementing pg_receivewal --no-sync

2017-10-27 Thread Michael Paquier
On Thu, Oct 26, 2017 at 10:46 PM, Robert Haas  wrote:
> On Wed, Oct 25, 2017 at 10:03 PM, Michael Paquier
>  wrote:
>> This sentence is actually wrong, a feedback message is never sent with
>> the feedback message.
>
> Eh?

"A feedback message is never sent depending on the status interval".

> I think this looks basically fine, though I'd omit the short option
> for it.  There are only so many letters in the alphabet, so let's not
> use them up for developer-convenience options.

No objections to that.
-- 
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] Implementing pg_receivewal --no-sync

2017-10-26 Thread Robert Haas
On Wed, Oct 25, 2017 at 10:03 PM, Michael Paquier
 wrote:
> This sentence is actually wrong, a feedback message is never sent with
> the feedback message.

Eh?

I think this looks basically fine, though I'd omit the short option
for it.  There are only so many letters in the alphabet, so let's not
use them up for developer-convenience options.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
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] Implementing pg_receivewal --no-sync

2017-10-25 Thread Michael Paquier
On Tue, Oct 24, 2017 at 11:05 PM, Kuntal Ghosh
 wrote:
> +   
> +By default, pg_receivewal flushes a WAL segment's
> +contents each time a feedback message is sent to the server depending
> +on the interval of time defined by
> +--status-interval.
> IMHO, it's okay to remove the part 'depending on
> the.--status-interval'.

This sentence is actually wrong, a feedback message is never sent with
the feedback message. You need to use either --synchronous or --slot
for that, and the docs are already clear on the matter.

> +This option causes
> +pg_receivewal to not issue such flushes waiting,
> Did you mean 'to not issue such flush waitings'?

By reading again the patch, "waiting" should not be here. I have
reworded the documentation completely anyway. Hopefully it is more
simple now.

> + [ 'pg_receivewal', '-D', $stream_dir, '--synchronous', '--no-sync' ],
> + 'failure if --synchronous specified without --no-sync');
> s/without/with

Right.
-- 
Michael


pg_receivewal_nosync_v2.patch
Description: Binary data

-- 
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] Implementing pg_receivewal --no-sync

2017-10-25 Thread Kuntal Ghosh
On Wed, Oct 25, 2017 at 6:07 AM, Michael Paquier
 wrote:
> Hi all,
>
> After thinking a bit on the subject, I have decided to submit a patch
> to do $subject. This makes pg_receivewal more consistent with
> pg_basebackup. This option is mainly useful for testing, something
> that becomes way more doable since support for --endpos has been
> added.
>
> Unsurprisingly, --synchronous and --no-sync are incompatible options.
+   
+By default, pg_receivewal flushes a WAL segment's
+contents each time a feedback message is sent to the server depending
+on the interval of time defined by
+--status-interval.
IMHO, it's okay to remove the part 'depending on
the.--status-interval'.

+This option causes
+pg_receivewal to not issue such flushes waiting,
Did you mean 'to not issue such flush waitings'?


+ [ 'pg_receivewal', '-D', $stream_dir, '--synchronous', '--no-sync' ],
+ 'failure if --synchronous specified without --no-sync');
s/without/with


-- 
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Implementing pg_receivewal --no-sync

2017-10-24 Thread Michael Paquier
Hi all,

After thinking a bit on the subject, I have decided to submit a patch
to do $subject. This makes pg_receivewal more consistent with
pg_basebackup. This option is mainly useful for testing, something
that becomes way more doable since support for --endpos has been
added.

Unsurprisingly, --synchronous and --no-sync are incompatible options.
Thanks,
-- 
Michael


pg_receivewal_nosync.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers