Re: New IndexAM API controlling index vacuum strategies

2020-12-27 Thread Peter Geoghegan
On Sun, Dec 27, 2020 at 10:55 PM Masahiko Sawada wrote: > > As you said, the next question must be: How do we teach lazy vacuum to > > not do what gets requested by amvacuumcleanup() when it cannot respect > > the wishes of one individual indexes, for example when the > > accumulation of LP_DEAD

RE: Disable WAL logging to speed up data loading

2020-12-27 Thread osumi.takami...@fujitsu.com
Hello Sawada-San On Monday, December 28, 2020 2:29 PM Masahiko Sawada wrote: > On Thu, Dec 3, 2020 at 12:14 PM osumi.takami...@fujitsu.com > wrote: > > > > I've made a new patch v05 that took in comments to filter out WALs > > more strictly and addressed some minor fixes that were discussed >

Re: New IndexAM API controlling index vacuum strategies

2020-12-27 Thread Masahiko Sawada
On Thu, Dec 24, 2020 at 12:59 PM Peter Geoghegan wrote: > > On Tue, Dec 22, 2020 at 2:54 PM Masahiko Sawada wrote: > > I've started this separate thread from [1] for discussing the general > > API design of index vacuum. > > This is a very difficult and very important problem. Clearly defining >

Re: [HACKERS] Custom compression methods

2020-12-27 Thread Andrey Borodin
> 28 дек. 2020 г., в 10:20, Dilip Kumar написал(а): > > On Sun, Dec 27, 2020 at 12:40 PM Andrey Borodin wrote: >> >> >> >>> 25 дек. 2020 г., в 14:34, Dilip Kumar написал(а): >>> >>> >>> >>> >>> >>> >>> >> >> Maybe add Lz4\Zlib WAL FPI compression on top of this patchset? I'm

Re: Parallel Inserts in CREATE TABLE AS

2020-12-27 Thread vignesh C
On Sun, Dec 27, 2020 at 2:28 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > > On Sat, Dec 26, 2020 at 9:20 PM vignesh C wrote: > > +-- parallel inserts must occur > > +select explain_pictas( > > +'create table parallel_write as select length(stringu1) from tenk1;'); > >

Re: Disable WAL logging to speed up data loading

2020-12-27 Thread Masahiko Sawada
On Thu, Dec 3, 2020 at 12:14 PM osumi.takami...@fujitsu.com wrote: > > Hello > > > I've made a new patch v05 that took in comments > to filter out WALs more strictly and addressed some minor fixes > that were discussed within past few days. > Also, I changed the documentations, considering those

Re: Rethinking plpgsql's assignment implementation

2020-12-27 Thread Pavel Stehule
po 28. 12. 2020 v 0:55 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > Now, the behavior of SELECT INTO is behind the assign statement and this > > fact should be documented. Usually we don't need to use array's fields > > here, but somebody can try it. > > It's been behind all along

Re: [HACKERS] Custom compression methods

2020-12-27 Thread Dilip Kumar
On Sun, Dec 27, 2020 at 12:40 PM Andrey Borodin wrote: > > > > > 25 дек. 2020 г., в 14:34, Dilip Kumar написал(а): > > > > > > > > > > > > > > > > Maybe add Lz4\Zlib WAL FPI compression on top of this patchset? I'm not > insisting on anything, it just would be so cool to have it... >

Re: Parallel Inserts in CREATE TABLE AS

2020-12-27 Thread Dilip Kumar
On Sun, Dec 27, 2020 at 2:20 PM Bharath Rupireddy wrote: > > On Sat, Dec 26, 2020 at 11:11 AM Dilip Kumar wrote: > > I have reviewed part of v15-0001 patch, I have a few comments, I will > > continue to review this. > > Thanks a lot. > > > 1. > > Why is this temporary hack? and what is the plan

Tying an object's ownership to datdba

2020-12-27 Thread Noah Misch
https://postgr.es/m/20201031163518.gb4039...@rfd.leadboat.com gave $SUBJECT as one of the constituent projects for changing the public schema default ACL. This feature stands on its own, hence the new thread. I showed syntax "ALTER SCHEMA public OWNER TO DATABASE_OWNER" and anticipated a new

Re: Cache relation sizes?

2020-12-27 Thread Andy Fan
On Thu, Dec 24, 2020 at 6:59 AM Thomas Munro wrote: > On Thu, Dec 17, 2020 at 10:22 PM Andy Fan > wrote: > > Let me try to understand your point. Suppose process 1 extends a file to > > 2 blocks from 1 block, and fsync is not called, then a). the lseek *may* > still > > return 1 based on the

Re: Rethinking plpgsql's assignment implementation

2020-12-27 Thread Tom Lane
Pavel Stehule writes: > Now, the behavior of SELECT INTO is behind the assign statement and this > fact should be documented. Usually we don't need to use array's fields > here, but somebody can try it. It's been behind all along --- this patch didn't really change that. But I don't mind

Re: Rethinking plpgsql's assignment implementation

2020-12-27 Thread Pavel Stehule
so 26. 12. 2020 v 19:00 odesílatel Pavel Stehule napsal: > Hi > > I repeated tests. I wrote a set of simple functions. It is a synthetical > test, but I think it can identify potential problems well. > > I calculated the average of 3 cycles and I checked the performance of each > function. I

Re: Feature request: Connection string parsing for postgres_fdw

2020-12-27 Thread Eric Hanson
Whoa that's perfect! Thank you so much. On Thu, Dec 24, 2020 at 4:59 PM Ian Lawrence Barwick wrote: > 2020年12月23日(水) 22:05 Eric Hanson : > > > > I'm trying to store connection to postgres_fdw in the database I want > to be able to store the full breadth of connection styles and all the >

Re: doc review for v14

2020-12-27 Thread Justin Pryzby
On Thu, Dec 24, 2020 at 05:12:02PM +0900, Michael Paquier wrote: > I have applied most of it on HEAD, except 0011 and the things noted > above. Thanks again. Thank you. I see that I accidentally included ZSTD_COMPRESSION in pg_backup_archiver.h while cherry-picking from the branch where I first

vacuum_cost_page_miss default value and modern hardware

2020-12-27 Thread Peter Geoghegan
vacuum_cost_page_miss has a default value of 10, while vacuum_cost_page_dirty has a default value of 20. This has been the case since cost-based delays were introduced by commit f425b605f4e back in 2004. The obvious implication is that dirtying a page is on average only twice as expensive as a

hash_extension(text)

2020-12-27 Thread Joel Jacobson
Hi, When developing extensions, I find myself spending time on manually checking if my update scripts (invoked via ALTER EXTENSION ... UPDATE) gives the same result as CREATE EXTENSION ... would do if installing the latest version from scratch without any previous version. I thought it would

Re: Parallel Inserts in CREATE TABLE AS

2020-12-27 Thread Zhihong Yu
For v16-0002-Tuple-Cost-Adjustment-for-Parallel-Inserts-in-CTAS.patch: + if (ignore && + (root->parse->CTASParallelInsInfo & +CTAS_PARALLEL_INS_TUP_COST_CAN_IGN)) I wonder why CTAS_PARALLEL_INS_TUP_COST_CAN_IGN is checked again in the above if since when

Re: range_agg

2020-12-27 Thread Alexander Korotkov
On Sun, Dec 27, 2020 at 9:07 PM David Fetter wrote: > On Sun, Dec 27, 2020 at 09:53:13AM -0800, Zhihong Yu wrote: > > This is not an ideal way to index multirages, but something we can > > easily have. > > What sort of indexing improvements do you have in mind? Approximation of multirange as a

Re: range_agg

2020-12-27 Thread Alexander Korotkov
On Sun, Dec 27, 2020 at 8:52 PM Zhihong Yu wrote: > This is not an ideal way to index multirages, but something we can easily > have. > > typo: multiranges Thanks for catching. I will revise the commit message before committing. -- Regards, Alexander Korotkov

Re: pg_upgrade test for binary compatibility of core data types

2020-12-27 Thread Justin Pryzby
On Wed, Dec 16, 2020 at 11:22:23AM -0600, Justin Pryzby wrote: > On Sun, Dec 06, 2020 at 12:02:48PM -0600, Justin Pryzby wrote: > > I meant to notice if the binary format is accidentally changed again, which > > was > > what happened here: > > 7c15cef86 Base information_schema.sql_identifier

Re: range_agg

2020-12-27 Thread David Fetter
On Sun, Dec 27, 2020 at 09:53:13AM -0800, Zhihong Yu wrote: > Hi, > > This is not an ideal way to index multirages, but something we can > easily have. What sort of indexing improvements do you have in mind? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to

Re: range_agg

2020-12-27 Thread Zhihong Yu
Hi, This is not an ideal way to index multirages, but something we can easily have. typo: multiranges Cheers On Sun, Dec 27, 2020 at 1:50 AM Alexander Korotkov wrote: > On Thu, Dec 17, 2020 at 10:10 PM Alexander Korotkov > wrote: > > > > I think this patch is very close to committable. I'm

Re: Add table access method as an option to pgbench

2020-12-27 Thread Justin Pryzby
On Sun, Dec 27, 2020 at 09:14:53AM -0400, Fabien COELHO wrote: > > src/test/regress/sql/create_am.sql:CREATE ACCESS METHOD heap2 TYPE TABLE > > HANDLER heap_tableam_handler; > > ... > > src/test/regress/sql/create_am.sql:DROP ACCESS METHOD heap2; > > > Or maybe using SET default_tablespace

Re: Proposed patch for key managment

2020-12-27 Thread Bruce Momjian
On Sat, Dec 19, 2020 at 11:45:08AM +, Alastair Turner wrote: > On Fri, 18 Dec 2020 at 21:36, Stephen Frost wrote: > > These ideas don't seem too bad but I'd think we'd pass which key we want > > on the command-line using a %i or something like that, rather than using > > stdin, unless there's

Re: PoC Refactor AM analyse API

2020-12-27 Thread Andrey Borodin
> 8 дек. 2020 г., в 16:44, Denis Smirnov написал(а): > > Andrey, thanks for your feedback! > > I agree that AMs with fix sized blocks can have much alike code in > acquire_sample_rows() (though it is not a rule). But there are several points > about current master sampling. > > * It is

Re: Add session statistics to pg_stat_database

2020-12-27 Thread Laurenz Albe
On Fri, 2020-12-25 at 20:28 +0900, Masahiro Ikeda wrote: > As a user, I want this feature to know whether > clients' session activities are as expected. > > I have some comments about the patch. > > 1. pg_proc.dat > > The unit of "session time" and so on says "in seconds". > But, is "in

Re: Add table access method as an option to pgbench

2020-12-27 Thread Fabien COELHO
Hello Justin, src/test/regress/sql/create_am.sql:CREATE ACCESS METHOD heap2 TYPE TABLE HANDLER heap_tableam_handler; ... src/test/regress/sql/create_am.sql:DROP ACCESS METHOD heap2; Or maybe using SET default_tablespace instead of modifying the CREATE sql. That'd need to be done separately

Re: range_agg

2020-12-27 Thread Alexander Korotkov
On Thu, Dec 17, 2020 at 10:10 PM Alexander Korotkov wrote: > > I think this patch is very close to committable. I'm going to spend > some more time further polishing it and commit (if I don't find a > major issue or face objections). The main patch is committed. I've prepared a set of

Re: Parallel Inserts in CREATE TABLE AS

2020-12-27 Thread Bharath Rupireddy
On Sat, Dec 26, 2020 at 9:20 PM vignesh C wrote: > +-- parallel inserts must occur > +select explain_pictas( > +'create table parallel_write as select length(stringu1) from tenk1;'); > +select count(*) from parallel_write; > +drop table parallel_write; > > We can change comment "parallel inserts

Re: pg_stat_statements oddity with track = all

2020-12-27 Thread Julien Rouhaud
On Fri, Dec 04, 2020 at 06:09:13PM +0800, Julien Rouhaud wrote: > On Fri, Dec 04, 2020 at 12:06:10PM +0300, Sergei Kornilov wrote: > > Hello > > > > Seems we need also change PGSS_FILE_HEADER. > > Indeed, thanks! v2 attached. There was a conflict on PGSS_FILE_HEADER since some recent commit,