Re: pg_receivewal makes a bad daemon

2021-05-05 Thread Robert Haas
On Wed, May 5, 2021 at 10:42 PM David Fetter wrote: > We do use at least one bit and piece from around the internet to make > our software usable, namely libreadline, the absence of which make > psql pretty much unusable. I'm not talking about dependent libraries. We obviously have to depend on s

Re: Replication slot stats misgivings

2021-05-05 Thread Masahiko Sawada
On Mon, May 3, 2021 at 9:18 PM Masahiko Sawada wrote: > > On Mon, May 3, 2021 at 2:27 PM Amit Kapila wrote: > > > Apart from this, I think you > > have suggested somewhere in this thread to slightly update the > > description of stream_bytes. I would like to update the description of > > stream_b

[v15] ALTER TABLE ... SET ACCESS METHOD

2021-05-05 Thread Jeff Davis
The attached patch implements ALTER TABLE ... SET ACCESS METHOD. For simplicity, I used the normal alter table path, ATRewriteTable(), which does not follow the stricter isolation semantics that VACUUM FULL follows. If someone thinks that's unacceptable, please let me know. Regards, Jeff

Why do we have perl and sed versions of Gen_dummy_probes?

2021-05-05 Thread Andres Freund
Hi, I wanted to apply https://postgr.es/m/cagry4nwaipjc8wo0g7wzcgbmatc3gjvgvboadzhdbczhj8z...@mail.gmail.com and noticed that there's not just Gen_dummy_probes.sed but also a Gen_dummy_probes.pl. I understand why we don't want to rely on sed because of windows - but it's far from obvious why we

Re: [v15] ALTER TABLE ... SET ACCESS METHOD

2021-05-05 Thread Andres Freund
Hi, On 2021-05-05 20:45:50 -0700, Jeff Davis wrote: > The attached patch implements ALTER TABLE ... SET ACCESS METHOD. I think it'd be good to have a basic test for this. See create_am.sql for how to do so without actually needing a second AM implementation. > For simplicity, I used the normal

Re: Replication slot stats misgivings

2021-05-05 Thread Amit Kapila
On Thu, May 6, 2021 at 6:15 AM Masahiko Sawada wrote: > > After more thought, I'm concerned that my patch's approach might be > invasive for PG14. Given that Vignesh’s patch would cover most cases, > I am not sure if your patch is too invasive but OTOH I am also convinced that Vignesh's patch cov

Re: Why do we have perl and sed versions of Gen_dummy_probes?

2021-05-05 Thread Tom Lane
Andres Freund writes: > I understand why we don't want to rely on sed because of windows - but > it's far from obvious why we can't just use the .pl variant all the > time? Perl is not considered a hard build requirement on non-Windows. We could dodge that by shipping a pre-built dummy probes.h,

Re: RFC: Detailed reorder buffer stats dumps

2021-05-05 Thread Craig Ringer
On Thu, 6 May 2021 at 02:28, Andres Freund wrote: > Hi, > > On 2021-05-05 18:33:27 +0800, Craig Ringer wrote: > > I'm thinking of piggy-backing on the approach used in the "Get memory > > contexts of an arbitrary backend process" patch in order to provide > access > > to detailed reorder buffer c

Re: [v15] ALTER TABLE ... SET ACCESS METHOD

2021-05-05 Thread Justin Pryzby
On Wed, May 05, 2021 at 08:45:50PM -0700, Jeff Davis wrote: > The attached patch implements ALTER TABLE ... SET ACCESS METHOD. > > For simplicity, I used the normal alter table path, ATRewriteTable(), > which does not follow the stricter isolation semantics that VACUUM FULL > follows. If someone t

Re: [v15] ALTER TABLE ... SET ACCESS METHOD

2021-05-05 Thread Jeff Davis
On Wed, 2021-05-05 at 23:40 -0500, Justin Pryzby wrote: > Why doees your patch say v15? > It's nearly the same as my pre-existing patch, so should merge them. Sorry, I completely missed your patch. I retract mine and we'll continue with yours. Regards, Jeff Davis

Re: Why do we have perl and sed versions of Gen_dummy_probes?

2021-05-05 Thread Andres Freund
Hi, On 2021-05-06 00:18:12 -0400, Tom Lane wrote: > Andres Freund writes: > > I understand why we don't want to rely on sed because of windows - but > > it's far from obvious why we can't just use the .pl variant all the > > time? > > Perl is not considered a hard build requirement on non-Window

Re: Synchronous commit behavior during network outage

2021-05-05 Thread Andrey Borodin
Thanks for reviewing Ondřej! > 26 апр. 2021 г., в 22:01, Ondřej Žižka написал(а): > > Hello Andrey, > > I went through the thread for your patch and seems to me as an acceptable > solution... > > > The only case patch does not handle is sudden backend crash - Postgres will > > recover withou

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-05 Thread Dilip Kumar
On Thu, May 6, 2021 at 5:35 AM Michael Paquier wrote: > > On Wed, May 05, 2021 at 09:59:41AM -0400, Robert Haas wrote: > > TAP tests have a facility for conditionally skipping tests; see > > perldoc Test::More. That's actually superior to what you can do with > > pg_regress. We'd need to come up w

Re: Replication slot stats misgivings

2021-05-05 Thread Masahiko Sawada
On Thu, May 6, 2021 at 1:09 PM Amit Kapila wrote: > > On Thu, May 6, 2021 at 6:15 AM Masahiko Sawada wrote: > > > > After more thought, I'm concerned that my patch's approach might be > > invasive for PG14. Given that Vignesh’s patch would cover most cases, > > > > I am not sure if your patch is

Re: gcc 11.1.0 warnings in llvmjit_expr.c

2021-05-05 Thread Andres Freund
Hi, On 2021-04-29 00:07:01 +0200, Erik Rijkers wrote: > gcc 11.1.0 produces quite a litany of second thoughts when compiling > llvmjit_expr.c; is there something in it? They're wrong, but I can see why it warns - the signature choice was weird. Pushed the fix to 13 and master. Greetings, Andre

Re: gcc 11.1.0 warnings in llvmjit_expr.c

2021-05-05 Thread Andres Freund
On 2021-05-05 22:30:44 -0700, Andres Freund wrote: > On 2021-04-29 00:07:01 +0200, Erik Rijkers wrote: > > gcc 11.1.0 produces quite a litany of second thoughts when compiling > > llvmjit_expr.c; is there something in it? > > They're wrong, but I can see why it warns - the signature choice was >

Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY

2021-05-05 Thread Amit Langote
On Wed, May 5, 2021 at 7:59 PM Pavel Luzanov wrote: > I found this in the documentation, section '5.11.3. Partitioning Using > Inheritance'[1]: > "Some operations require a stronger lock when using declarative partitioning > than when using table inheritance. For example, removing a partition fr

Re: Replication slot stats misgivings

2021-05-05 Thread vignesh C
On Thu, May 6, 2021 at 9:39 AM Amit Kapila wrote: > > On Thu, May 6, 2021 at 6:15 AM Masahiko Sawada wrote: > > > > After more thought, I'm concerned that my patch's approach might be > > invasive for PG14. Given that Vignesh’s patch would cover most cases, > > > > I am not sure if your patch is

Re: COPY table_name (single_column) FROM 'unknown.txt' DELIMITER E'\n'

2021-05-05 Thread Joel Jacobson
On Wed, May 5, 2021, at 21:51, Tom Lane wrote: > Andrew Dunstan mailto:andrew%40dunslane.net>> writes: > > On 5/5/21 2:45 PM, Tom Lane wrote: > >> Yeah, that's because of the conversion to "chr". But a regexp > >> is overkill for that anyway. Don't we have something that will > >> split on simple

Re: COPY table_name (single_column) FROM 'unknown.txt' DELIMITER E'\n'

2021-05-05 Thread Thomas Kellerer
Joel Jacobson schrieb am 05.05.2021 um 17:30: > Could it be an idea to exploit the fact that DELIMITER E'\n' is currently an > error? > >     ERROR:  COPY delimiter cannot be newline or carriage return > > That is, to change E'\n' to be a valid delimiter, which would simply read > each line > del

Re: COPY table_name (single_column) FROM 'unknown.txt' DELIMITER E'\n'

2021-05-05 Thread Joel Jacobson
On Wed, May 5, 2021, at 20:45, Tom Lane wrote: > "Joel Jacobson" mailto:joel%40compiler.org>> writes: > > I think you misunderstood the problem. > > I don't want the entire file to be considered a single value. > > I want each line to become its own row, just a row with a single column. > > > So I

Re: COPY table_name (single_column) FROM 'unknown.txt' DELIMITER E'\n'

2021-05-05 Thread Komяpa
I have similar problems and what is really needed is a way to get a file from client side into a server side object that can be dealt with later. The most popular way is COPY and it is built into the psql tool. In general it supports \copy wrapper, and there is COPY FROM STDIN. However, it is not a

Re: Asynchronous Append on postgres_fdw nodes.

2021-05-05 Thread Etsuro Fujita
On Thu, Mar 4, 2021 at 1:00 PM Etsuro Fujita wrote: > Another thing I'm concerned about in the postgres_fdw part is the case > where all/many postgres_fdw ForeignScans of an Append use the same > connection, because in that case those ForeignScans are executed one > by one, not in parallel, and he

Re: decoupling table and index vacuum

2021-05-05 Thread Dilip Kumar
On Thu, May 6, 2021 at 8:27 AM Masahiko Sawada wrote: > > > I'm doubtful about skipping WAL logging entirely - I'd have to think > > harder about it, but I think that'd mean we'd restart from scratch after > > crashes / immediate restarts as well, because we couldn't rely on the > > contents of th

Re: Asynchronous Append on postgres_fdw nodes.

2021-05-05 Thread Etsuro Fujita
On Tue, Apr 27, 2021 at 9:31 PM Etsuro Fujita wrote: > On Mon, Apr 26, 2021 at 7:35 PM Andrey V. Lepikhov > wrote: > > Small mistake i found. If no tuple was received from a foreign > > partition, explain shows that we never executed node. > > The patch in the attachment fixes this. > > Will loo

Re: Dubious assertion in RegisterDynamicBackgroundWorker

2021-05-05 Thread Noah Misch
On Wed, May 05, 2021 at 03:46:43PM -0400, Tom Lane wrote: > I know that the parallel-worker code is held > together with chewing gum and baling wire Having spent time in that code, I didn't notice such weakness. I'm sure it has bugs, but I doubt its bug density is unusual for PostgreSQL.

<    1   2