Re: proposal - psql output file write mode - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal - psql output file write mode
Date
Msg-id CAFj8pRA1n5=KixA_ofV0Pnemqtfhrq1RZ97eUh=1FW4jQRcEpg@mail.gmail.com
Whole thread Raw
In response to proposal - psql output file write mode  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers


so 28. 3. 2020 v 6:30 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal:
Hi

I am playing with pspg and inotify support. It is working pretty well and now can be nice if forwarding to output file can be configured little bit more. Now, only append mode is supported. But append mode doesn't work with pspg pager. So I propose new pset option "file_output_mode" with two possible values "append" (default, current behave) and "rewrite" (new mode).

Usage:

\pset file_ouput_mode rewrite

In this mode, the file is opened before printing and it is closed after printing.

What do you think about this proposal?

I tried to implement this feature and it doesn't look like good idea. There is not trivial implementation, and looks so costs are higher than benefits.

Pavel


Regards

Pavel


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] WAL logging problem in 9.4.3?
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Race condition in SyncRepGetSyncStandbysPriority