Re: cutting down the TODO list thread

2020-10-28 Thread Oleksandr Shulgin
On Tue, Oct 27, 2020 at 8:25 PM John Naylor wrote: > As I mentioned in [1], I've volunteered to clear out the TODO list of > items that appear to be too difficult, controversial, or otherwise not > worth doing to warrant being listed there. I'll be working a few sections > at a time, and every

Re: Concurrency issue in pg_rewind

2020-09-18 Thread Oleksandr Shulgin
On Fri, Sep 18, 2020 at 8:10 AM Michael Paquier wrote: > On Thu, Sep 17, 2020 at 10:20:16AM +0200, Oleksandr Shulgin wrote: > > Ouch. I think pg_rewind shouldn't try to remove any random files in > pg_wal > > that it doesn't know about. > > What if the administrator m

Re: Concurrency issue in pg_rewind

2020-09-17 Thread Oleksandr Shulgin
On Wed, Sep 16, 2020 at 2:55 PM Alexander Kukushkin wrote: > > The second time pg_rewind also failed, but the error looked differently: > servers diverged at WAL location A76/39E55338 on timeline 132 > rewinding from last common checkpoint at A76/1EF254B8 on timeline 132 > > could not remove

Re: builtin functions, parameter names and psql's \df

2020-09-02 Thread Oleksandr Shulgin
On Wed, Sep 2, 2020 at 7:35 AM Andres Freund wrote: > Hi, > > on a regular basis I remember a builtin function's name, or can figure it > out > using \df etc, but can't remember the argument order. A typical example is > regexp_*, where I never remember whether the pattern or the input string >

Re: libpq copy error handling busted

2020-06-04 Thread Oleksandr Shulgin
On Thu, Jun 4, 2020 at 5:37 AM Thomas Munro wrote: > On Thu, Jun 4, 2020 at 1:53 PM Thomas Munro > wrote: > > On Thu, Jun 4, 2020 at 1:35 PM Tom Lane wrote: > > > Ah, it's better if I put the pqReadData call into *both* the paths > > > where 1f39a1c06 made pqSendSome give up. The attached

Re: feature idea: use index when checking for NULLs before SET NOT NULL

2020-05-29 Thread Oleksandr Shulgin
On Fri, May 29, 2020 at 8:56 AM Sergei Kornilov wrote: > Hello > > Correct index lookup is a difficult task. I tried to implement this > previously... > > But the answer in SO is a bit incomplete for recent postgresql releases. > Seqscan is not the only possible way to set not null in pg12+. My

Re: [PATCH] Add support to psql for edit-and-execute-command

2020-05-18 Thread Oleksandr Shulgin
On Mon, May 18, 2020 at 1:30 AM Joe Wildish wrote: > > Attached is a small patch for adding "edit-and-execute-command" readline > support to psql. Bash has this concept and I miss it when using psql. It > allows you to amend the current line in an editor by pressing "v" (when > in vi mode) or

Re: Poll: are people okay with function/operator table redesign?

2020-05-05 Thread Oleksandr Shulgin
On Mon, May 4, 2020 at 11:22 PM Tom Lane wrote: > I've now completed updating chapter 9 for the new layout, > and the results are visible at > https://www.postgresql.org/docs/devel/functions.html > There is more to do --- for instance, various contrib modules > have function/operator tables that

Re: do {} while (0) nitpick

2020-05-04 Thread Oleksandr Shulgin
On Fri, May 1, 2020 at 3:52 AM Bruce Momjian wrote: > > On Thu, Apr 30, 2020 at 09:51:10PM -0400, Tom Lane wrote: > > John Naylor writes: > > > As I understand it, the point of having "do {} while (0)" in a > > > multi-statement macro is to turn it into a simple statement. > > > > Right. > > > >

Re: Proposing WITH ITERATIVE

2020-04-28 Thread Oleksandr Shulgin
On Tue, Apr 28, 2020 at 5:49 AM Jonah H. Harris wrote: > On Mon, Apr 27, 2020 at 11:33 PM David Fetter wrote: > >> >> Have the authors agreed to make it available to the project under a >> compatible license? > > > If there’s interest, obviously. Otherwise I wouldn’t be asking. > > I said from

Re: Make java client lib accept same connection strings as psql

2020-02-24 Thread Oleksandr Shulgin
On Sat, Feb 22, 2020 at 4:05 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Fri, Feb 21, 2020 at 6:21 PM Michael Leonhard > wrote: > >> How about making the Java client library accept the same connection >> strings as psql and other command-line tools? [...] >> > > That falls

Re: POC: converting Lists into arrays

2019-07-03 Thread Oleksandr Shulgin
On Tue, Jul 2, 2019 at 5:12 PM Tom Lane wrote: > Oleksandr Shulgin writes: > > Not related to the diff v6..v7, but shouldn't we throw additionally a > > memset() with '\0' before calling pfree(): > > I don't see the point of that. In debug builds CLOBBER_FREED_ME

Re: POC: converting Lists into arrays

2019-07-02 Thread Oleksandr Shulgin
On Tue, Jul 2, 2019 at 1:27 AM Tom Lane wrote: > > So I think this is a win, and attached is v7. > Not related to the diff v6..v7, but shouldn't we throw additionally a memset() with '\0' before calling pfree(): +ListCell *newelements; + +newelements = (ListCell *) +

Re: Analyze all plans

2019-01-23 Thread Oleksandr Shulgin
On Wed, Jan 23, 2019 at 9:44 AM Donald Dong wrote: > > 1. Enumerate all the plans > Not sure this is going to work. Because of the total number of possible plans is somewhere around O(n!), if I'm not mistaken, in terms of number of joined relations times the available access methods times the

Re: How can we submit code patches that implement our (pending) patents?

2018-07-26 Thread Oleksandr Shulgin
On Wed, Jul 25, 2018 at 8:35 PM Nico Williams wrote: > > What are you proposing anyways? That every commit come with a patent > search? > I would propose that everyone wasting their time and effort to discuss this issue here, would rather spend that time working towards putting an end to

Re: psql's \d versus included-index-column feature

2018-07-19 Thread Oleksandr Shulgin
On Thu, Jul 19, 2018 at 1:11 AM Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Wed, Jul 18, 2018 at 11:14 PM David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Wed, Jul 18, 2018 at 12:55 PM, Tom Lane wrote: >> >>> >>> regression=# \d tbl_include_reg_idx >>> Index

Re: Setting libpq TCP keepalive parameters from environment

2018-05-09 Thread Oleksandr Shulgin
On Wed, May 9, 2018 at 1:58 AM, Craig Ringer wrote: > > > > It would be much more convenient to just set the environment variable > when > > running the script and let it affect the whole process and its children. > > > > Would a patch be welcome? > > I can't really

Re: [HACKERS] [PATCH] Generic type subscripting

2018-03-20 Thread Oleksandr Shulgin
On Tue, Mar 6, 2018 at 6:21 PM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > One more small update after fd1a421fe6 in attachments. > Before looking at the code I have a few comments about documentation: in json.sgml: +-- Extract value by key +SELECT ('{"a": 1}'::jsonb)['a']; What is the

Re: Estimate maintenance_work_mem for CREATE INDEX

2017-12-19 Thread Oleksandr Shulgin
On Tue, Dec 19, 2017 at 10:47 AM, Oleksandr Shulgin < oleksandr.shul...@zalando.de> wrote: > (cross-posting admin and hackers) > > Hello, > > I wonder if I'm alone in my wish to have a way for estimating how much > maintenance work memory would suffice to allocate for a

Estimate maintenance_work_mem for CREATE INDEX

2017-12-19 Thread Oleksandr Shulgin
(cross-posting admin and hackers) Hello, I wonder if I'm alone in my wish to have a way for estimating how much maintenance work memory would suffice to allocate for a session when creating an index and avoid spilling to disk? Recently I had to re-create some indexes on a 9.6 server and I had