RE: In-placre persistance change of a relation

2020-12-03 Thread tsunakawa.ta...@fujitsu.com
From: Kyotaro Horiguchi > > No, not really. The issue is more around what happens if we crash > > part way through. At crash recovery time, the system catalogs are not > > available, because the database isn't consistent yet and, anyway, the > > startup process can't be bound to a database, let

Logical archiving

2020-12-03 Thread Andrey Borodin
Hi all I was discussing problems of CDC with scientific community and they asked this simple question: "So you have efficient WAL archive on a very cheap storage, why don't you have a logical archive too?" This seems like a wild idea. But really, we have a super expensive NVMe drives for OLTP

RE: [Patch] Optimize dropping of relation buffers using dlist

2020-12-03 Thread k.jami...@fujitsu.com
On Friday, December 4, 2020 12:42 PM, Tang, Haiying wrote: > Hello, Kirk > > Thanks for providing the new patches. > I did the recovery performance test on them, the results look good. I'd like > to > share them with you and everyone else. > (I also record VACUUM and TRUNCATE execution time on

Re: Refactor MD5 implementations and switch to EVP for OpenSSL

2020-12-03 Thread Michael Paquier
On Tue, Nov 10, 2020 at 01:28:09PM +0900, Michael Paquier wrote: > The CF bot has been complaining on Windows and this issue is fixed in > the attached. A refresh of src/tools/msvc for pgcrypto was just > missing. Now that HEAD has the necessary infrastructure to be able to plug in easily new

Re: Is it useful to record whether plans are generic or custom?

2020-12-03 Thread Kyotaro Horiguchi
At Fri, 04 Dec 2020 15:03:25 +0900, torikoshia wrote in > On 2020-12-04 14:29, Fujii Masao wrote: > > On 2020/11/30 15:24, Tatsuro Yamada wrote: > >> Hi Torikoshi-san, > >> > >>> In this patch, exposing new columns is mandatory, but I think > >>> it's better to make it optional by adding a GUC

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Amit Langote
On Fri, Dec 4, 2020 at 2:48 PM Kyotaro Horiguchi wrote: > At Fri, 4 Dec 2020 12:00:09 +0900, Keisuke Kuroda > wrote in > > Hi Amit, > > > > > I have attached a patch in which I've tried to merge the ideas from > > > both my patch and Kuroda-san's. I liked that his patch added > > > conparentid

Re: A new function to wait for the backend exit after termination

2020-12-03 Thread Bharath Rupireddy
On Fri, Dec 4, 2020 at 8:44 AM Hou, Zhijie wrote: > > -however only superusers can terminate superuser backends. > +however only superusers can terminate superuser backends. When no > +wait and timeout are > +provided, only SIGTERM is sent to the backend with the

Re: Wrong statistics for size of XLOG_SWITCH during pg_waldump.

2020-12-03 Thread Kyotaro Horiguchi
Thanks for taking a look on this. At Fri, 4 Dec 2020 04:20:47 +, wrote in > When I execute pg_waldump, I found that XLOG/SWITCH_JUNK appears twice. > Is this problem solved by the way of correcting the previously discussed > Transaction/COMMIT? > > $ ../bin/pg_waldump --stats=record

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-12-03 Thread Fujii Masao
On 2020/11/27 11:12, Bharath Rupireddy wrote: On Wed, Nov 25, 2020 at 12:13 AM Alexey Kondratov wrote: 1) Return 'true' if there were open connections and we successfully closed them. 2) Return 'false' in the no-op case, i.e. there were no open connections. 3) Rise an error if something

Re: Is it useful to record whether plans are generic or custom?

2020-12-03 Thread torikoshia
On 2020-12-04 14:29, Fujii Masao wrote: On 2020/11/30 15:24, Tatsuro Yamada wrote: Hi Torikoshi-san, In this patch, exposing new columns is mandatory, but I think it's better to make it optional by adding a GUC something like 'pgss.track_general_custom_plans. I also feel it makes the number

Re: Remove incorrect assertion in reorderbuffer.c.

2020-12-03 Thread Dilip Kumar
On Thu, Dec 3, 2020 at 5:33 PM Amit Kapila wrote: > > We start recording changes in ReorderBufferTXN even before we reach > SNAPBUILD_CONSISTENT state so that if the commit is encountered after > reaching that we should be able to send the changes of the entire > transaction. Now, while recording

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Kyotaro Horiguchi
At Fri, 4 Dec 2020 12:00:09 +0900, Keisuke Kuroda wrote in > Hi Amit, > > > I have attached a patch in which I've tried to merge the ideas from > > both my patch and Kuroda-san's. I liked that his patch added > > conparentid to RI_ConstraintInfo because that saves a needless > > syscache

Re: Renaming cryptohashes.c to cryptohashfuncs.c

2020-12-03 Thread Michael Paquier
On Thu, Dec 03, 2020 at 10:10:44PM +0100, Daniel Gustafsson wrote: > +1 on this proposed rename. Thanks. I have been able to get that done as of bd94a9c. -- Michael signature.asc Description: PGP signature

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-12-03 Thread Michael Paquier
On Thu, Dec 03, 2020 at 08:46:09PM +0100, Peter Eisentraut wrote: > There are a couple of more places like this, including the existing > ClusterOption that this patched moved around, but we should be removing > those. > > My reasoning is that if you look at an enum value of this type, either say

Re: Is it useful to record whether plans are generic or custom?

2020-12-03 Thread Fujii Masao
On 2020/11/30 15:24, Tatsuro Yamada wrote: Hi Torikoshi-san, In this patch, exposing new columns is mandatory, but I think it's better to make it optional by adding a GUC something like 'pgss.track_general_custom_plans. I also feel it makes the number of columns too many. Just adding the

Re: [Patch] Optimize dropping of relation buffers using dlist

2020-12-03 Thread Kyotaro Horiguchi
At Thu, 3 Dec 2020 07:18:16 +, "tsunakawa.ta...@fujitsu.com" wrote in > From: Jamison, Kirk/ジャミソン カーク > > Apologies for the delay, but attached are the updated versions to simplify > > the > > patches. > > Looks good for me. Thanks to Horiguchi-san and Andres-san, the code bebecame >

Re: [Patch] Optimize dropping of relation buffers using dlist

2020-12-03 Thread Kyotaro Horiguchi
Thanks for the new version. This contains only replies. I'll send some further comments in another mail later. At Thu, 3 Dec 2020 03:49:27 +, "k.jami...@fujitsu.com" wrote in > On Thursday, November 26, 2020 4:19 PM, Horiguchi-san wrote: > > Hello, Kirk. Thank you for the new

Re: Single transaction in the tablesync worker?

2020-12-03 Thread Amit Kapila
On Fri, Dec 4, 2020 at 10:29 AM Amit Kapila wrote: > > On Fri, Dec 4, 2020 at 7:53 AM Craig Ringer > wrote: > > > > On Thu, 3 Dec 2020 at 17:25, Amit Kapila wrote: > > > > > Is there any fundamental problem if > > > we commit the transaction after initial copy and slot creation in > > >

Re: Single transaction in the tablesync worker?

2020-12-03 Thread Amit Kapila
On Fri, Dec 4, 2020 at 7:53 AM Craig Ringer wrote: > > On Thu, 3 Dec 2020 at 17:25, Amit Kapila wrote: > > > Is there any fundamental problem if > > we commit the transaction after initial copy and slot creation in > > LogicalRepSyncTableStart and then allow the apply of transactions as > > it

RE: Wrong statistics for size of XLOG_SWITCH during pg_waldump.

2020-12-03 Thread Shinya11.Kato
When I execute pg_waldump, I found that XLOG/SWITCH_JUNK appears twice. Is this problem solved by the way of correcting the previously discussed Transaction/COMMIT? $ ../bin/pg_waldump --stats=record ../data/pg_wal/00010001 Type N

RE: [Patch] Optimize dropping of relation buffers using dlist

2020-12-03 Thread Tang, Haiying
Hello, Kirk Thanks for providing the new patches. I did the recovery performance test on them, the results look good. I'd like to share them with you and everyone else. (I also record VACUUM and TRUNCATE execution time on master/primary in case you want to have a look.) 1. VACUUM and

Re: autovac issue with large number of tables

2020-12-03 Thread Kasahara Tatsuhito
Hi, On Thu, Dec 3, 2020 at 9:09 PM Fujii Masao wrote: > > > > On 2020/12/03 11:46, Kasahara Tatsuhito wrote: > > On Wed, Dec 2, 2020 at 7:11 PM Masahiko Sawada > > wrote: > >> > >> On Wed, Dec 2, 2020 at 3:33 PM Fujii Masao > >> wrote: > >>> > >>> > >>> > >>> On 2020/12/02 12:53, Masahiko

RE: A new function to wait for the backend exit after termination

2020-12-03 Thread Hou, Zhijie
Hi, -however only superusers can terminate superuser backends. +however only superusers can terminate superuser backends. When no +wait and timeout are +provided, only SIGTERM is sent to the backend with the given process +ID and false is returned

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Kyotaro Horiguchi
Thanks, but sorry for the confusion. I intended just to show how it looks like if we share RI_ConstraintInfo among partition relations. At Thu, 3 Dec 2020 10:22:47 -0300, Alvaro Herrera wrote in > Hello > > I haven't followed this thread's latest posts, but I'm unclear on the > lifetime of

Re: [bug fix] ALTER TABLE SET LOGGED/UNLOGGED on a partitioned table does nothing silently

2020-12-03 Thread Bharath Rupireddy
On Fri, Dec 4, 2020 at 8:22 AM tsunakawa.ta...@fujitsu.com wrote: > > From: Bharath Rupireddy > > 1) What happens if a partitioned table has a foreign partition along > > with few other local partitions[1]? Currently, if we try to set > > logged/unlogged of a foreign table, then an "ERROR:

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Keisuke Kuroda
Hi Amit, > I have attached a patch in which I've tried to merge the ideas from > both my patch and Kuroda-san's. I liked that his patch added > conparentid to RI_ConstraintInfo because that saves a needless > syscache lookup for constraints that don't have a parent. I've kept > my idea to

RE: [bug fix] ALTER TABLE SET LOGGED/UNLOGGED on a partitioned table does nothing silently

2020-12-03 Thread tsunakawa.ta...@fujitsu.com
From: Bharath Rupireddy > 1) What happens if a partitioned table has a foreign partition along > with few other local partitions[1]? Currently, if we try to set > logged/unlogged of a foreign table, then an "ERROR: "" is not a > table" is thrown. This makes sense. With your patch also we see

Re: Single transaction in the tablesync worker?

2020-12-03 Thread Amit Kapila
On Fri, Dec 4, 2020 at 7:53 AM Craig Ringer wrote: > > On Thu, 3 Dec 2020 at 17:25, Amit Kapila wrote: > > > > The reason why I am looking into this area is to support the logical > > decoding of prepared transactions. See the problem [1] reported by > > Peter Smith. Basically, when we stream

Re: Single transaction in the tablesync worker?

2020-12-03 Thread Craig Ringer
On Thu, 3 Dec 2020 at 17:25, Amit Kapila wrote: > Is there any fundamental problem if > we commit the transaction after initial copy and slot creation in > LogicalRepSyncTableStart and then allow the apply of transactions as > it happens in apply worker? No fundamental problem. Both approaches

Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2

2020-12-03 Thread Michael Paquier
On Thu, Dec 03, 2020 at 10:58:39PM +0100, Daniel Gustafsson wrote: > This version looks good to me, and builds/tests without any issues. While I > didn't try to adapt the libnss patch to the resowner machinery, I don't see > any > reasons off the cuff why it wouldn't work with the scaffolding

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-12-03 Thread Justin Pryzby
On Thu, Dec 03, 2020 at 04:12:53PM +0900, Michael Paquier wrote: > > +typedef struct ReindexParams { > > + bool concurrently; > > + bool verbose; > > + bool missingok; > > + > > + int options;/* bitmask of lowlevel REINDEXOPT_* */ > > +} ReindexParams; > > + > > By moving everything

Re: Add Information during standby recovery conflicts

2020-12-03 Thread Fujii Masao
On 2020/12/04 9:28, Masahiko Sawada wrote: On Fri, Dec 4, 2020 at 2:54 AM Fujii Masao wrote: On 2020/12/01 17:29, Drouvot, Bertrand wrote: Hi, On 12/1/20 12:35 AM, Masahiko Sawada wrote: CAUTION: This email originated from outside of the organization. Do not click links or open

Re: Support for NSS as a libpq TLS backend

2020-12-03 Thread Jacob Champion
On Nov 17, 2020, at 7:00 AM, Daniel Gustafsson wrote: > > Nice, thanks for the fix! I've incorporated your patch into the attached v20 > which also fixes client side error reporting to be more readable. I was testing handshake failure modes and noticed that some FATAL messages are being sent

Re: [HACKERS] logical decoding of two-phase transactions

2020-12-03 Thread Peter Smith
On Thu, Dec 3, 2020 at 6:21 PM Peter Smith wrote: > Sorry for any inconvenience. I will add the missing functionality to > 0009 as soon as I can. > PSA a **replacement** patch for the previous v29-0009. This should correct the recently reported trouble [1] [1] =

Re: On login trigger: take three

2020-12-03 Thread Greg Nancarrow
On Tue, Sep 15, 2020 at 2:12 AM Pavel Stehule wrote: > >> >> It is always possible to login by disabling startup triggers using >> disable_session_start_trigger GUC: >> >> psql "dbname=postgres options='-c disable_session_start_trigger=true'" > > > sure, I know. Just this behavior can be a very

Re: Add Information during standby recovery conflicts

2020-12-03 Thread Masahiko Sawada
On Fri, Dec 4, 2020 at 2:54 AM Fujii Masao wrote: > > > > On 2020/12/01 17:29, Drouvot, Bertrand wrote: > > Hi, > > > > On 12/1/20 12:35 AM, Masahiko Sawada wrote: > >> CAUTION: This email originated from outside of the organization. Do not > >> click links or open attachments unless you can

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Kyotaro Horiguchi
At Thu, 3 Dec 2020 21:40:29 +0900, Amit Langote wrote in > On Thu, Dec 3, 2020 at 5:13 PM Kyotaro Horiguchi > wrote: > > At Thu, 3 Dec 2020 16:41:45 +0900, Amit Langote > > wrote in > > > Maybe I misread but I think you did in your email dated Dec 1 where you > > > said: > > > > > > "After

Re: please update ps display for recovery checkpoint

2020-12-03 Thread Bossart, Nathan
On 12/3/20, 1:58 PM, "Justin Pryzby" wrote: > On Thu, Dec 03, 2020 at 09:18:07PM +, Bossart, Nathan wrote: >> I considered also checking that update_process_title was enabled, but >> I figured that these ps display updates should happen sparsely enough >> that it wouldn't make much of an

Re: [HACKERS] [PATCH] Generic type subscripting

2020-12-03 Thread Tom Lane
Alexander Korotkov writes: > I didn't get we can't add opaque field to SubscriptingRefState without > adding it to SubscriptingRef, which has to support > copy/compare/outfuncs/readfuncs Umm ... all depends on what you envision putting in there. There certainly can be an opaque field in

Re: Corner-case bug in pg_rewind

2020-12-03 Thread Heikki Linnakangas
On 03/12/2020 16:10, Heikki Linnakangas wrote: On 02/12/2020 15:26, Ian Barwick wrote: On 02/12/2020 20:13, Heikki Linnakangas wrote: Attached are two patches. The first patch is your original patch, unmodified (except for a cosmetic rename of the test file). The second patch builds on that,

Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2

2020-12-03 Thread Daniel Gustafsson
> On 3 Dec 2020, at 02:47, Michael Paquier wrote: > > On Wed, Dec 02, 2020 at 12:03:49PM +0900, Michael Paquier wrote: >> Thanks. 0001 has been applied and the buildfarm does not complain, so >> it looks like we are good (I'll take care of any issues, like the one >> Fujii-san has just

Re: please update ps display for recovery checkpoint

2020-12-03 Thread Justin Pryzby
On Thu, Dec 03, 2020 at 09:18:07PM +, Bossart, Nathan wrote: > I considered also checking that update_process_title was enabled, but > I figured that these ps display updates should happen sparsely enough > that it wouldn't make much of an impact. Since bf68b79e5, update_ps_display is

Re: [HACKERS] [PATCH] Generic type subscripting

2020-12-03 Thread Alexander Korotkov
On Wed, Dec 2, 2020 at 10:18 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On Wed, Dec 02, 2020 at 11:52:54AM -0500, Tom Lane wrote: > > Dmitry Dolgov <9erthali...@gmail.com> writes: > > >> On Mon, Nov 30, 2020 at 02:26:19PM +0100, Dmitry Dolgov wrote: > > >>> On Mon, Nov 30, 2020 at

copy.sgml and partitioned tables

2020-12-03 Thread Justin Pryzby
https://www.postgresql.org/docs/current/sql-copy.html |. COPY FROM can be used with plain, foreign, or partitioned tables or with views that have INSTEAD OF INSERT triggers. |. COPY only deals with the specific table named; IT DOES NOT COPY DATA TO OR FROM CHILD TABLES. ... That language in

Re: Renaming cryptohashes.c to cryptohashfuncs.c

2020-12-03 Thread Daniel Gustafsson
> On 3 Dec 2020, at 03:03, Michael Paquier wrote: > Any objections to rename that to cryptohashfuncs.c? That would be > much more consistent with the surroundings (cleaning up anythig > related to MD5 is on my TODO list). Patch is attached. +1 on this proposed rename. cheers ./daniel

Re: Github Actions (CI)

2020-12-03 Thread Thomas Munro
On Fri, Dec 4, 2020 at 2:55 AM Josef Šimánek wrote: > Any chance to also share links to failing/passing testing builds? https://github.com/macdice/postgres/runs/1490727809 https://github.com/macdice/postgres/runs/1490727838 However, looking these in a clean/cookieless browser, I see that it

Re: Improving spin-lock implementation on ARM.

2020-12-03 Thread Alexander Korotkov
On Wed, Dec 2, 2020 at 6:58 AM Krunal Bauskar wrote: > 1. CAS patch (applied on the baseline) >- Kunpeng: 10-45% improvement observed [1] >- Graviton2: 30-50% improvement observed [2] What does lower boundary of improvement mean? Does it mean minimal improvement observed? Obviously

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-12-03 Thread Peter Eisentraut
A side comment on this patch: I think using enums as bit mask values is bad style. So changing this: -/* Reindex options */ -#define REINDEXOPT_VERBOSE (1 << 0) /* print progress info */ -#define REINDEXOPT_REPORT_PROGRESS (1 << 1) /* report pgstat progress */ -#define REINDEXOPT_MISSING_OK

Re: SELECT INTO deprecation

2020-12-03 Thread Peter Eisentraut
On 2020-12-03 16:34, Tom Lane wrote: As I recall, a whole lot of the pain we have with INTO has to do with the semantics we've chosen for INTO in a set-operation nest. We think you can write something like SELECT ... INTO foo FROM ... UNION SELECT ... FROM ... but we insist on the INTO

Re: Improving spin-lock implementation on ARM.

2020-12-03 Thread Alexander Korotkov
On Thu, Dec 3, 2020 at 7:02 PM Tom Lane wrote: > From a system structural standpoint, I seriously dislike that lwlock.c > patch: putting machine-specific variant implementations into that file > seems like a disaster for maintainability. So it would need to show a > very significant gain across

Re: Minor documentation error regarding streaming replication protocol

2020-12-03 Thread Bruce Momjian
On Thu, Dec 3, 2020 at 09:04:21AM -0800, Jeff Davis wrote: > On Wed, 2020-12-02 at 15:16 -0500, Bruce Momjian wrote: > > Yes, we could, but I thought the format code was not something we set > > at > > this level. Looking at byteasend() it is true it just sends the > > bytes. > > It can be set

Re: Add Information during standby recovery conflicts

2020-12-03 Thread Fujii Masao
On 2020/12/01 17:29, Drouvot, Bertrand wrote: Hi, On 12/1/20 12:35 AM, Masahiko Sawada wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. On Tue, Dec 1, 2020 at

Re: Minor documentation error regarding streaming replication protocol

2020-12-03 Thread Jeff Davis
On Wed, 2020-12-02 at 15:16 -0500, Bruce Momjian wrote: > Yes, we could, but I thought the format code was not something we set > at > this level. Looking at byteasend() it is true it just sends the > bytes. It can be set along with the type. Attached an example. Andres objected (in a separate

Re: Commitfest 2020-11 is closed

2020-12-03 Thread Nikolay Samokhvalov
On Wed, Dec 2, 2020 at 2:36 PM Andrew Dunstan wrote: > > On 12/2/20 5:13 PM, Thomas Munro wrote: > > > > I'm experimenting with Github's built in CI. All other ideas welcome. > > > I'd look very closely at gitlab. > +1. Why: - having a great experience for more than 2 years - if needed, there

Re: Improving spin-lock implementation on ARM.

2020-12-03 Thread Tom Lane
Krunal Bauskar writes: > Any updates or further inputs on this. As far as LSE goes: my take is that tampering with the compiler/platform's default optimization options requires *very* strong evidence, which we have not got and likely won't get. Users who are building for specific hardware can

Re: Corner-case bug in pg_rewind

2020-12-03 Thread Pavel Borisov
чт, 3 дек. 2020 г. в 19:15, Heikki Linnakangas : > On 03/12/2020 16:49, Pavel Borisov wrote: > > Ok, pushed and backpatched this now. > > > > Very nice! > > Thanks to you all! > > Thanks for the review, Pavel! I just realized that I forgot to credit > you in the commit message. I'm sorry. >

Re: SELECT INTO deprecation

2020-12-03 Thread Tom Lane
Peter Eisentraut writes: > Interesting. This appears to be the case. SQL Server uses SELECT INTO > to create a table, and does not appear to have CREATE TABLE AS. > So maybe we should keep it, but adjust the documentation to point out > this use case. That argument makes sense, but only if

Re: Corner-case bug in pg_rewind

2020-12-03 Thread Heikki Linnakangas
On 03/12/2020 16:49, Pavel Borisov wrote: Ok, pushed and backpatched this now. Very nice! Thanks to you all! Thanks for the review, Pavel! I just realized that I forgot to credit you in the commit message. I'm sorry. - Heikki

Re: Remove unnecessary grammar symbols

2020-12-03 Thread Tom Lane
Peter Eisentraut writes: > While doing the proverbial other things, I noticed that the grammar > symbols publication_name_list and publication_name_item are pretty > useless. We already use name_list/name to refer to publications in most > places, so getting rid of these makes things more

Re: Github Actions (CI)

2020-12-03 Thread Andrew Dunstan
On 12/3/20 1:33 AM, Thomas Munro wrote: > Hi hackers, > > I'm looking for more horsepower for testing commitfest entries > automatically, and today I tried out $SUBJECT. The attached is a > rudimentary first attempt, for show-and-tell. If you have a Github > account, you just have to push it

Re: Corner-case bug in pg_rewind

2020-12-03 Thread Pavel Borisov
> > Ok, pushed and backpatched this now. > Very nice! Thanks to you all! -- Best regards, Pavel Borisov Postgres Professional: http://postgrespro.com

Re: Corner-case bug in pg_rewind

2020-12-03 Thread Heikki Linnakangas
On 02/12/2020 15:26, Ian Barwick wrote: On 02/12/2020 20:13, Heikki Linnakangas wrote: Attached are two patches. The first patch is your original patch, unmodified (except for a cosmetic rename of the test file). The second patch builds on that, demonstrating and fixing the issue I mentioned.

Re: Github Actions (CI)

2020-12-03 Thread Josef Šimánek
čt 3. 12. 2020 v 7:34 odesílatel Thomas Munro napsal: > > Hi hackers, > > I'm looking for more horsepower for testing commitfest entries > automatically, and today I tried out $SUBJECT. The attached is a > rudimentary first attempt, for show-and-tell. If you have a Github > account, you just

Re: Single transaction in the tablesync worker?

2020-12-03 Thread Amit Kapila
On Thu, Dec 3, 2020 at 7:04 PM Ashutosh Bapat wrote: > > On Thu, Dec 3, 2020 at 2:55 PM Amit Kapila wrote: > > > > The tablesync worker in logical replication performs the table data > > sync in a single transaction which means it will copy the initial data > > and then catch up with apply

Re: pg_ctl.exe file deleted automatically

2020-12-03 Thread Craig Ringer
On Thu, 3 Dec 2020, 13:06 Joel Mariadasan (jomariad), wrote: > Hi, > > > > We are using Windows 2019 server. > > > > Sometimes we see the *pg_ctl.exe* getting automatically deleted. > > Due to this, while starting up Postgres windows service we are getting the > error. > > “Error 2: The system

Re: Single transaction in the tablesync worker?

2020-12-03 Thread Ashutosh Bapat
On Thu, Dec 3, 2020 at 2:55 PM Amit Kapila wrote: > > The tablesync worker in logical replication performs the table data > sync in a single transaction which means it will copy the initial data > and then catch up with apply worker in the same transaction. There is > a comment in

Re: Commitfest 2020-11 is closed

2020-12-03 Thread Andrew Dunstan
On 12/3/20 4:54 AM, Anastasia Lubennikova wrote: > On 02.12.2020 23:59, Tom Lane wrote: >> Anastasia Lubennikova writes: >>> Commitfest 2020-11 is officially closed now. >>> Many thanks to everyone who participated by posting patches, reviewing >>> them, committing and sharing ideas in

Re: Autovacuum on partitioned table (autoanalyze)

2020-12-03 Thread Alvaro Herrera
Hello Yuzuko, On 2020-Dec-02, yuzuko wrote: > The problem Horiguchi-san mentioned is as follows: > [explanation] Hmm, I see. So the problem is that if some ancestor is analyzed first, then analyze of one of its partition will cause a redundant analyze of the ancestor, because the number of

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Alvaro Herrera
Hello I haven't followed this thread's latest posts, but I'm unclear on the lifetime of the new struct that's being allocated in TopMemoryContext. At what point are those structs freed? Also, the comment that was in RI_ConstraintInfo now appears in RI_ConstraintParam, and the new struct

Re: Additional improvements to extended statistics

2020-12-03 Thread Dean Rasheed
On Wed, 2 Dec 2020 at 16:34, Tomas Vondra wrote: > > On 12/2/20 4:51 PM, Dean Rasheed wrote: > > > > Barring any further comments, I'll push this sometime soon. > > +1 > Pushed. Regards, Dean

Re: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW

2020-12-03 Thread Bharath Rupireddy
On Tue, Dec 1, 2020 at 5:34 PM Bharath Rupireddy wrote: > > Hi, > > I think we can pass CURSOR_OPT_PARALLEL_OK to pg_plan_query() for > refresh mat view so that parallelism can be considered for the SELECT > part of the previously created mat view. The refresh mat view queries > can be faster in

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Amit Langote
On Tue, Dec 1, 2020 at 12:25 PM Corey Huinker wrote: > On Mon, Nov 30, 2020 at 9:48 PM Tom Lane wrote: >> Corey Huinker writes: >> > Given that we're already looking at these checks, I was wondering if this >> > might be the time to consider implementing these checks by directly >> > scanning

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Amit Langote
On Thu, Dec 3, 2020 at 5:13 PM Kyotaro Horiguchi wrote: > At Thu, 3 Dec 2020 16:41:45 +0900, Amit Langote > wrote in > > Maybe I misread but I think you did in your email dated Dec 1 where you > > said: > > > > "After an off-list discussion, we confirmed that even in that case the > > patch

Re: [PATCH] Covering SPGiST index

2020-12-03 Thread Pavel Borisov
I've noticed CI error due to the fact that MSVC doesn't allow arrays of flexible size arrays and made a fix for the issue. Also did some minor refinement in tuple creation. PFA v12 of a patch. чт, 26 нояб. 2020 г. в 21:48, Pavel Borisov : > > The way that seems acceptable to me is to add

Re: Commitfest 2020-11 is closed

2020-12-03 Thread Peter Eisentraut
On 2020-12-02 23:13, Thomas Munro wrote: I'm experimenting with Github's built in CI. All other ideas welcome. You can run Linux builds on AppVeyor, too.

Re: Add session statistics to pg_stat_database

2020-12-03 Thread Laurenz Albe
On Tue, 2020-12-01 at 17:32 +0100, Magnus Hagander wrote: > > I have changed "connections" to "sessions" and renamed the new > > column "connections" to "session_count". > > > > I think that most people will understand a session as started after a > > successful > > connection. > > Yeah, I

Re: SELECT INTO deprecation

2020-12-03 Thread Peter Eisentraut
On 2020-12-03 00:54, Michael Paquier wrote: I got to wonder about the impact when migrating applications though. SELECT INTO has a different meaning in Oracle, but SQL server creates a new table like Postgres. Interesting. This appears to be the case. SQL Server uses SELECT INTO to create

Re: SELECT INTO deprecation

2020-12-03 Thread Peter Eisentraut
On 2020-12-02 18:58, Stephen Frost wrote: I also found some gratuitous uses of SELECT INTO in various tests and documentation (not ecpg or plpgsql of course). Here is a patch to adjust those to CREATE TABLE AS. If we aren't actually removing SELECT INTO then I don't know that it makes sense to

Re: autovac issue with large number of tables

2020-12-03 Thread Fujii Masao
On 2020/12/03 11:46, Kasahara Tatsuhito wrote: On Wed, Dec 2, 2020 at 7:11 PM Masahiko Sawada wrote: On Wed, Dec 2, 2020 at 3:33 PM Fujii Masao wrote: On 2020/12/02 12:53, Masahiko Sawada wrote: On Tue, Dec 1, 2020 at 5:31 PM Masahiko Sawada wrote: On Tue, Dec 1, 2020 at 4:32 PM

Remove incorrect assertion in reorderbuffer.c.

2020-12-03 Thread Amit Kapila
We start recording changes in ReorderBufferTXN even before we reach SNAPBUILD_CONSISTENT state so that if the commit is encountered after reaching that we should be able to send the changes of the entire transaction. Now, while recording changes if the reorder buffer memory has exceeded

Re: Commitfest 2020-11 is closed

2020-12-03 Thread Anastasia Lubennikova
On 02.12.2020 23:59, Tom Lane wrote: Anastasia Lubennikova writes: Commitfest 2020-11 is officially closed now. Many thanks to everyone who participated by posting patches, reviewing them, committing and sharing ideas in discussions! Thanks for all the hard work! Today, me and Georgios will

Remove unnecessary grammar symbols

2020-12-03 Thread Peter Eisentraut
While doing the proverbial other things, I noticed that the grammar symbols publication_name_list and publication_name_item are pretty useless. We already use name_list/name to refer to publications in most places, so getting rid of these makes things more consistent. These appear to have

Re: Improving spin-lock implementation on ARM.

2020-12-03 Thread Krunal Bauskar
Any updates or further inputs on this. On Wed, 2 Dec 2020 at 09:27, Krunal Bauskar wrote: > > > On Tue, 1 Dec 2020 at 22:19, Tom Lane wrote: > >> Alexander Korotkov writes: >> > On Tue, Dec 1, 2020 at 6:19 PM Krunal Bauskar >> wrote: >> >> I would request you guys to re-think it from this

REINDEX backend filtering

2020-12-03 Thread Julien Rouhaud
Hello, Now that we have the infrastructure to track indexes that might be corrupted due to changes in collation libraries, I think it would be a good idea to offer an easy way for users to reindex all indexes that might be corrupted. I'm attaching a POC patch as a discussion basis. It

Single transaction in the tablesync worker?

2020-12-03 Thread Amit Kapila
The tablesync worker in logical replication performs the table data sync in a single transaction which means it will copy the initial data and then catch up with apply worker in the same transaction. There is a comment in LogicalRepSyncTableStart ("We want to do the table data sync in a single

Re: Improper use about DatumGetInt32

2020-12-03 Thread Peter Eisentraut
On 2020-11-30 16:32, Alvaro Herrera wrote: On 2020-Nov-30, Peter Eisentraut wrote: Patch updated this way. I agree it's better that way. Thanks, LGTM. For a change like this, do we need to change the C symbol names, so that there is no misbehavior if the shared library is not updated at

Re: Multi Inserts in CREATE TABLE AS - revived patch

2020-12-03 Thread Bharath Rupireddy
On Thu, Dec 3, 2020 at 1:38 PM Dilip Kumar wrote: > > On Mon, Nov 30, 2020 at 10:49 AM Bharath Rupireddy > wrote: > > > > Currently, required logic for multi inserts (such as buffer slots > > allocation, flushing, tuple size calculation to decide when to flush, > > cleanup and so on) is being

Re: pg_stat_statements oddity with track = all

2020-12-03 Thread Julien Rouhaud
On Thu, Dec 03, 2020 at 11:40:22AM +0300, Sergei Kornilov wrote: > Hello > > > To get an increase in the number of records that means that the same > > statement > > would appear at top level AND nested level. This seems a corner case with > > very low > > (neglectible) occurence rate. > > +1 >

Re: pg_stat_statements oddity with track = all

2020-12-03 Thread Julien Rouhaud
On Wed, Dec 02, 2020 at 05:13:56PM +0300, Sergei Kornilov wrote: > Hello > > > - add a parent_statement_id column that would be NULL for top level queries > > Will generate too much entries... Every FK for each different delete/insert, > for example. > But very useful for databases with a lot

Re: pg_stat_statements oddity with track = all

2020-12-03 Thread Sergei Kornilov
Hello > To get an increase in the number of records that means that the same > statement > would appear at top level AND nested level. This seems a corner case with > very low > (neglectible) occurence rate. +1 I think splitting fields into plans_toplevel / plans_nested will be less convenient.

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Kyotaro Horiguchi
At Thu, 03 Dec 2020 17:13:16 +0900 (JST), Kyotaro Horiguchi wrote in me> I agree that plans are rather large but the sharable part of the me> RI_ConstraintInfos is 536 bytes, I'm not sure it is small enough me> comparing to the plans. But that has somewhat large footprint.. (See me> the

Re: pg_stat_statements oddity with track = all

2020-12-03 Thread legrand legrand
Hi Julien, > The extra field I've proposed would increase the number of records, as it > needs to be a part of the key. To get an increase in the number of records that means that the same statement would appear at top level AND nested level. This seems a corner case with very low

Re: Huge memory consumption on partitioned table with FKs

2020-12-03 Thread Kyotaro Horiguchi
At Thu, 3 Dec 2020 16:41:45 +0900, Amit Langote wrote in > On Thu, Dec 3, 2020 at 2:29 PM Kyotaro Horiguchi > wrote: > > At Thu, 3 Dec 2020 12:27:53 +0900, Amit Langote > > wrote in > > > On Thu, Dec 3, 2020 at 10:15 AM Kyotaro Horiguchi > > > wrote: > > > For the queries on the referencing

Re: Multi Inserts in CREATE TABLE AS - revived patch

2020-12-03 Thread Dilip Kumar
On Mon, Nov 30, 2020 at 10:49 AM Bharath Rupireddy wrote: > > Hi, > > Currently, required logic for multi inserts (such as buffer slots allocation, > flushing, tuple size calculation to decide when to flush, cleanup and so on) > is being handled outside of the existing tableam APIs. And there

Re: SELECT INTO deprecation

2020-12-03 Thread Thomas Kellerer
Stephen Frost schrieb am 02.12.2020 um 18:58: > We should either remove it, or remove the comments that it's deprecated, > not try to make it more deprecated or try to somehow increase the > recommendation to not use it. (I am writing from a "user only" perspective, not a developer) I don't see