What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-10-29 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/runtime-config-resource.html
Description:

https://www.postgresql.org/docs/13/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-BACKGROUND-WRITER

says:

"There is a separate server process called the background writer, whose
function is to issue writes of “dirty” (new or modified) shared buffers. It
writes shared buffers so server processes handling user queries seldom or
never need to wait for a write to occur."

It's not clear what "wait for a write to occur" means: a write() syscall or
an fsync() syscall?


COPY statement: no list of the allowed values for "format_name"

2020-10-29 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/sql-copy.html
Description:

Look at the account of the COPY statement, here:

https://www.postgresql.org/docs/11/sql-copy.html

and see this:

«
[ [ WITH ] ( option [, ...] ) ]
»

It goes on to say this:

«
where option can be one of:

FORMAT format_name
»

But there's no list of the allowed values for "format_name". The same holds
for other options like, for example, "encoding_name".

I tried to provoke the list by using "with (format 'dog')". I got the 22023
error:

«
COPY format "dog" not recognized
»

But there was no list of the allowed values.


Re: COPY statement: no list of the allowed values for "format_name"

2020-10-29 Thread David G. Johnston
On Thu, Oct 29, 2020 at 3:24 PM PG Doc comments form 
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/11/sql-copy.html
> Description:
>
> Look at the account of the COPY statement, here:
>
> https://www.postgresql.org/docs/11/sql-copy.html
>
>
> But there was no list of the allowed values.
>

Keep reading...
"""
FORMAT
Selects the data format to be read or written: text, csv (Comma Separated
Values), or binary. The default is text.
"""

I suppose including the syntax term "format_type" might help, but the
all-caps FORMAT is definitive.

David J.


Re: What does "[backends] should seldom or never need to wait for a write to occur" mean?

2020-10-29 Thread David G. Johnston
On Thu, Oct 29, 2020 at 3:24 PM PG Doc comments form 
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/13/runtime-config-resource.html
> Description:
>
>
> https://www.postgresql.org/docs/13/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-BACKGROUND-WRITER
>
> says:
>
> "There is a separate server process called the background writer, whose
> function is to issue writes of “dirty” (new or modified) shared buffers. It
> writes shared buffers so server processes handling user queries seldom or
> never need to wait for a write to occur."
>
> It's not clear what "wait for a write to occur" means: a write() syscall or
> an fsync() syscall?
>

Probably neither...think more abstract/general.

David J.


Re: COPY statement: no list of the allowed values for "format_name"

2020-10-29 Thread David G. Johnston
On Thu, Oct 29, 2020 at 5:13 PM Bryn Llewellyn  wrote:

> «
> Selects the data format to be read or written: text, csv (Comma Separated
> Values), or binary. The default is text.
> »
>
> would be improved if it were spelled more explicitly:
>

> «
> Selects the data format to be read or written. The allowed values
> for format_name are text, csv (Comma Separated Values), or binary. The
> default is text.
> »
>

> Please consider making this change (and the convention that it implies for
> comparable cases).
>

While I agree it isn't something I'm going to lead the charge on.  As you
are expressing strong feelings maybe you'd like to write up a patch.
Fixing only COPY would suffice even though I suspect that there are other
areas that need consideration.

David J.