Re: expose parallel leader in CSV and log_line_prefix

2020-07-20 Thread Justin Pryzby
On Fri, Jul 17, 2020 at 05:32:36PM -0500, Justin Pryzby wrote: > On Fri, Jul 17, 2020 at 05:27:21PM -0400, Alvaro Herrera wrote: > > On 2020-Jul-17, Justin Pryzby wrote: > > > Ok, but should we then consider changing pg_stat_activity for consistency > > > ? > > &g

Re: shared tempfile was not removed on statement_timeout

2020-07-20 Thread Justin Pryzby
On Fri, Dec 13, 2019 at 03:03:47PM +1300, Thomas Munro wrote: > On Fri, Dec 13, 2019 at 7:05 AM Justin Pryzby wrote: > > I have a nagios check on ancient tempfiles, intended to catch debris left by > > crashed processes. But triggered on this file: > > > > $ sudo find

Re: expose parallel leader in CSV and log_line_prefix

2020-07-20 Thread Justin Pryzby
On Tue, Jul 21, 2020 at 12:51:45PM +0900, Michael Paquier wrote: > And I'd rather keep the simple suggestion of upthread to leave the > field as NULL for the parallel group leader with a PID match but not a > backend type check so as this could be useful for other types of > processes. The

Re: Mark btree_gist functions as PARALLEL SAFE

2020-07-20 Thread Justin Pryzby
On Wed, Jul 15, 2020 at 03:26:24PM +0300, Alexander Korotkov wrote: > On Thu, Jun 18, 2020 at 7:48 PM Winfield, Steven > wrote: > > Done - thanks again. > > This patch looks good to me. > > I'm going to push this if no objections. I marked as committed to make patch checker look healthier.

Re: Open Item: Should non-text EXPLAIN always show properties?

2020-07-23 Thread Justin Pryzby
On Thu, Jun 25, 2020 at 08:41:43AM -0400, James Coleman wrote: > On Thu, Jun 25, 2020 at 5:15 AM David Rowley wrote: > > Over on [1] Justin mentions that the non-text EXPLAIN ANALYZE should > > always show the "Disk Usage" and "HashAgg Batches" properties. I > > agree with this. show_wal_usage()

Re: HashAgg's batching counter starts at 0, but Hash's starts at 1. (now: incremental sort)

2020-07-30 Thread Justin Pryzby
On Wed, Jul 29, 2020 at 09:18:44PM -0700, Peter Geoghegan wrote: > On Wed, Jul 29, 2020 at 9:05 PM Justin Pryzby wrote: > > So my 2ndary suggestion is to conditionalize based on the method rather than > > value of space used. > > What's the advantage of doing it that way?

Re: HashAgg's batching counter starts at 0, but Hash's starts at 1. (now: incremental sort)

2020-07-30 Thread Justin Pryzby
On Thu, Jul 30, 2020 at 06:33:32PM -0700, Peter Geoghegan wrote: > On Thu, Jul 30, 2020 at 5:22 PM Justin Pryzby wrote: > > Because filtering out zero values is exactly what's intended to be avoided > > for > > nontext output. > > > > I think checking whether

Re: range_agg

2020-07-05 Thread Justin Pryzby
On Sat, Apr 11, 2020 at 09:36:37AM -0700, Paul A Jungwirth wrote: > On Fri, Apr 10, 2020 at 8:44 PM Paul A Jungwirth > wrote: > > Thanks, and thanks for your v17 also. Here is a patch building on that > > and adding support for anycompatiblemultirange. > > Here is a v19 that just moved the

Re: SQL/JSON: JSON_TABLE

2020-07-05 Thread Justin Pryzby
On Mon, Mar 23, 2020 at 08:33:34PM +0300, Nikita Glukhov wrote: > On 23.03.2020 19:24, Pavel Stehule wrote: > > This patch needs rebase > > Attached 43rd version of the patches based on the latest (v47) SQL/JSON > functions patches. It looks like this needs to be additionally rebased - I will

Re: SQL/JSON: functions

2020-07-05 Thread Justin Pryzby
On Mon, Mar 23, 2020 at 08:28:52PM +0300, Nikita Glukhov wrote: > Attached 47th version of the patches. The patch checker/cfbot says this doesn't apply ; could you send a rebasified version ? -- Justin

Re: Default gucs for EXPLAIN

2020-07-05 Thread Justin Pryzby
I think this got ample review, so I've set it to "Waiting". -- Justin

Re: pg_upgrade test for binary compatibility of core data types

2021-01-11 Thread Justin Pryzby
On Mon, Jan 11, 2021 at 03:28:08PM +0100, Peter Eisentraut wrote: > On 2020-12-27 20:07, Justin Pryzby wrote: > > 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

Re: libpq compression

2021-01-11 Thread Justin Pryzby
On Mon, Jan 11, 2021 at 04:53:51PM +0300, Konstantin Knizhnik wrote: > On 09.01.2021 23:31, Justin Pryzby wrote: > > I suggest that there should be an enum of algorithms, which is constant > > across > > all servers. They would be unconditionally included and not

Re: libpq compression

2021-01-12 Thread Justin Pryzby
On Tue, Jan 12, 2021 at 08:44:43AM +0300, Konstantin Knizhnik wrote: > On 11.01.2021 20:38, Tomas Vondra wrote: > > 1) Fixes the MSVC makefile. The list of files is sorted alphabetically, > > so I've added the file at the end. > Thank you This is still failing the windows build. I think you need

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: 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 inform

Re: doc review for v14

2020-12-27 Thread Justin Pryzby
oc/src/sgml/ref/pg_dump.sgml doc/src/sgml/sources.sgml doc/src/sgml/cube.sgml? doc/src/sgml/func.sgml? -- Justin >From 9c24fa421e423edb29fc866a70e935843dab2804 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 14 Nov 2020 23:09:21 -0600 Subject: [PATCH 1/7] typos in master --- doc/src/

Re: [PATCH] Simple progress reporting for COPY command

2021-01-06 Thread Justin Pryzby
y, and so on. Some more doc fixes. >From 0616f448057905ab9b3218ebddfdd3af52e62bac Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Wed, 6 Jan 2021 19:08:11 -0600 Subject: [PATCH] doc review: COPY progress: 8a4f618e7ae3cb11b0b37d0f06f05c8ff905833f --- doc/src/sgml/monitoring.sgml | 10 +- 1 file changed

Re: should INSERT SELECT use a BulkInsertState?

2020-11-29 Thread Justin Pryzby
On Mon, Nov 23, 2020 at 08:00:20PM -0600, Justin Pryzby wrote: > On Mon, Nov 02, 2020 at 12:45:51PM -0600, Justin Pryzby wrote: > > On Mon, Nov 02, 2020 at 07:53:45AM +0100, Luc Vlaming wrote: > > > On 30.10.20 05:51, Justin Pryzby wrote: > > > > On Thu, Oct 22, 2

Re: jit and explain nontext

2020-11-30 Thread Justin Pryzby
On Sat, Nov 21, 2020 at 10:26:00AM -0600, Justin Pryzby wrote: > On Sat, Nov 21, 2020 at 08:39:11AM +0100, Peter Eisentraut wrote: > > On 2020-11-20 17:16, Justin Pryzby wrote: > > > It matters if it was planned with jit but executed without jit. > > > > > &

allow to \dtS+ pg_toast.*

2020-11-30 Thread Justin Pryzby
toast show its main table -- Justin >From 99317e354e0a2744d7f72930773ab4cf78733f26 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Wed, 28 Oct 2020 23:51:39 -0500 Subject: [PATCH v1] Allow to \dt+ pg_toast.* --- src/bin/psql/describe.c | 14 ++ 1 file changed, 6 insertions(+)

Re: [PATCH] remove pg_standby

2020-11-21 Thread Justin Pryzby
On Fri, Nov 20, 2020 at 05:26:54PM +0100, Peter Eisentraut wrote: > On 2020-10-29 03:44, Justin Pryzby wrote: > > diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml > > index 4e833d79ef..be4292ec33 100644 > > --- a/doc/src/sgml/contrib.sgml > > +++

Re: error_severity of brin work item

2020-11-25 Thread Justin Pryzby
On Mon, Nov 23, 2020 at 04:39:57PM -0300, Alvaro Herrera wrote: > I think this formulation (attached v3) has fewer moving parts. > > However, now that I did that, I wonder if this is really the best > approach to solve this problem. Maybe instead of doing this at the BRIN > level, it should be

pg_upgrade test for binary compatibility of core data types

2020-12-06 Thread Justin Pryzby
I'm finally returning to this 14 month old thread: (was: Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12) On Tue, Oct 15, 2019 at 09:07:25AM +0200, Tomas Vondra wrote: > On Mon, Oct 14, 2019 at 11:41:18PM -0500, Justin Pryzby wrote: > > &g

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

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: pg_dump, ATTACH, and independently restorable child partitions

2020-12-04 Thread Justin Pryzby
On Fri, Dec 04, 2020 at 12:13:05PM -0500, Tom Lane wrote: > Justin Pryzby writes: > > [ v4-0001-pg_dump-output-separate-object-for-ALTER-TABLE.AT.patch ] > > The cfbot is being picky about this: > > 3218pg_dump.c: In function ‘dumpTableAttach’: > 3219pg_dump.c:

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

2020-12-04 Thread Justin Pryzby
o fixes some minor formatting and rebase issues, including broken doc/. -- Justin >From 5d874da6f93341cb5aed4d3cc54137cbc341d57c Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Wed, 2 Dec 2020 20:54:47 -0600 Subject: [PATCH v33 1/5] ExecReindex and ReindexParams TODO: typedef --- src/backend/commands/indexcmds.c

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

2020-12-03 Thread Justin Pryzby
outines. Note that reindex_relation is called during cluster/vacuum, and in the later patches, I moved the test from from cluster() and ExecVacuum() to rebuild_relation(). -- Justin >From df43fe542081178ea74ffb2d1d77342e6c657c2f Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Wed, 2 Dec 2020 20:54:47 -0600

Re: should INSERT SELECT use a BulkInsertState?

2020-12-05 Thread Justin Pryzby
On Thu, Dec 03, 2020 at 10:59:34AM +0530, Bharath Rupireddy wrote: > On Wed, Dec 2, 2020 at 10:24 PM Justin Pryzby wrote: > > > > One loose end in this patch is how to check for volatile default > > expressions. > > I think we should be doing all the necessary check

Re: PoC/WIP: Extended statistics on expressions

2020-11-24 Thread Justin Pryzby
On Mon, Nov 23, 2020 at 04:30:26AM +0100, Tomas Vondra wrote: > 0004 - Seems fine. IMHO not really "silly errors" but OK. This is one of the same issues you pointed out - shadowing a variable. Could be backpatched. On Mon, Nov 23, 2020 at 04:30:26AM +0100, Tomas Vondra wrote: > > +

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

2020-11-24 Thread Justin Pryzby
On Sat, Oct 31, 2020 at 01:36:11PM -0500, Justin Pryzby wrote: > > > From the grammar perspective ANY option is available for any command > > > that uses parenthesized option list. All the checks and validations > > > are performed at the corresponding command code.

optimizer/clauses.h needn't include access/htup.h

2020-11-23 Thread Justin Pryzby
It was only needed between these: commit a8677e3ff6bb8ef78a9ba676faa647bba237b1c4 Author: Peter Eisentraut Date: Fri Apr 13 17:06:28 2018 -0400 Support named and default arguments in CALL commit f09346a9c6218dd239fdf3a79a729716c0d305bd Author: Tom Lane Date: Tue Jan 29 15:48:51 2019

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2020-12-09 Thread Justin Pryzby
On Fri, Dec 04, 2020 at 12:23:23PM -0500, Tom Lane wrote: > Justin Pryzby writes: > [ v24-0001-Document-historic-behavior-of-links-to-directori.patch ] > > The cfbot is unhappy with one of the test cases you added: > Maybe it could be salvaged by reversing the sense of the WHERE

create table like: ACCESS METHOD

2020-12-09 Thread Justin Pryzby
://www.postgresql.org/message-id/20190818193533.gl11...@telsasoft.com On Sun, Aug 18, 2019 at 02:35:33PM -0500, Justin Pryzby wrote: > . What do you think about pg_restore --no-tableam; similar to >--no-tablespaces, it would allow restoring a table to a different AM: >PGOP

Re: error_severity of brin work item

2020-12-01 Thread Justin Pryzby
On Tue, Dec 01, 2020 at 11:07:30AM -0300, Alvaro Herrera wrote: > > Should it be done in an AtCommit hook or something like that ? > > I didn't like this idea much on first read, on extensibility grounds, > but perhaps it's not so bad because we can generalize it whenever > there's pressure to

Re: [PATCH] remove deprecated v8.2 containment operators

2020-11-30 Thread Justin Pryzby
On Mon, Nov 30, 2020 at 09:51:12PM +0300, Anastasia Lubennikova wrote: > On 16.11.2020 23:55, Justin Pryzby wrote: > > On Fri, Nov 13, 2020 at 10:03:43AM -0500, Stephen Frost wrote: > > > * Magnus Hagander (mag...@hagander.net) wrote: > > > > On Thu, Nov 12, 20

Re: error_severity of brin work item

2020-12-01 Thread Justin Pryzby
On Tue, Dec 01, 2020 at 03:57:24PM -0300, Alvaro Herrera wrote: > On 2020-Dec-01, Justin Pryzby wrote: > > > This was an idea I made up - I don't know any of the details of this, but if > > you give a hint I could look at it more. There'd (still) be a race window, > > b

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

2020-12-02 Thread Justin Pryzby
Id, bool skip_constraint_checks, char relpersistence, int options, Oid tablespaceOid); +extern bool set_rel_tablespace(Oid reloid, Oid tablespaceOid); + /* Flag bits for reindex_relation(): */ #define REINDEX_REL_PROCESS_TOAST 0x01 #define REINDEX_REL_SUPPRESS_INDEX_USE 0x02 --

Re: pg_dump, ATTACH, and independently restorable child partitions

2020-12-02 Thread Justin Pryzby
On Wed, Nov 25, 2020 at 06:35:19PM -0500, Tom Lane wrote: > Justin Pryzby writes: > > 1. Maybe pg_restore ExecuteSqlCommandBuf() should (always?) call > > ExecuteSimpleCommands() instead of ExecuteSqlCommand(). It doesn't seem to > > break anything (altho

Re: should INSERT SELECT use a BulkInsertState?

2020-11-23 Thread Justin Pryzby
On Mon, Nov 02, 2020 at 12:45:51PM -0600, Justin Pryzby wrote: > On Mon, Nov 02, 2020 at 07:53:45AM +0100, Luc Vlaming wrote: > > On 30.10.20 05:51, Justin Pryzby wrote: > > > On Thu, Oct 22, 2020 at 01:29:53PM +0100, Simon Riggs wrote: > > > > On Fri, 16 Oc

Re: proposal: possibility to read dumped table's name from file

2020-11-28 Thread Justin Pryzby
rtainly not use it if it were json. But it'd be swell if there were a standard config file format, that handled postgresql.conf and maybe pg_hba.conf. -- Justin >From d9bac559d235f568a3419070205f05d77853a87f Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 28 Nov 2020 15:53:11 -0600 Subj

Re: CLUSTER on partitioned index

2020-11-28 Thread Justin Pryzby
On Sun, Nov 15, 2020 at 07:53:35PM -0600, Justin Pryzby wrote: > On Wed, Nov 04, 2020 at 08:23:56PM -0600, Justin Pryzby wrote: > > On Tue, Oct 27, 2020 at 07:33:12PM -0500, Justin Pryzby wrote: > > > I'm attaching a counter-proposal to your catalog change, which preserves &g

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2020-11-29 Thread Justin Pryzby
On Mon, Nov 23, 2020 at 04:14:18PM -0500, Tom Lane wrote: > Justin Pryzby writes: > >> This patch has been waiting for input from a committer on the approach I've > >> taken with the patches since March 10, so I'm planning to set to "Ready" - > >> at &g

Re: [doc] remove reference to pg_dump pre-8.1 switch behaviour

2020-11-29 Thread Justin Pryzby
On Mon, Oct 26, 2020 at 09:18:00AM +0200, Heikki Linnakangas wrote: > On 25/10/2020 23:56, Justin Pryzby wrote: > > On Fri, Oct 23, 2020 at 11:09:26PM +0300, Heikki Linnakangas wrote: > > > Findings in detail follow. > > > > Are you working on a patch for the

Re: CREATE INDEX CONCURRENTLY on partitioned index

2020-11-29 Thread Justin Pryzby
On Sat, Oct 31, 2020 at 01:31:17AM -0500, Justin Pryzby wrote: > Forking this thread, since the existing CFs have been closed. > https://www.postgresql.org/message-id/flat/20200914143102.GX18552%40telsasoft.com#58b1056488451f8594b0f0ba40996afd > > The strategy is to create catalog ent

Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY

2020-11-30 Thread Justin Pryzby
On Tue, Nov 03, 2020 at 08:56:06PM -0300, Alvaro Herrera wrote: > Here's an updated version of this patch. > > Apart from rebasing to current master, I made the following changes: > > * On the first transaction (the one that marks the partition as > detached), the partition is locked with

Re: error_severity of brin work item

2020-11-30 Thread Justin Pryzby
On Mon, Nov 30, 2020 at 08:47:32PM -0300, Alvaro Herrera wrote: > The more I look at this, the less I like it. This would set a precedent > that any action that can be initiated from an autovac work-item has a > requirement of silently being discarded when it referenced a > non-existant relation.

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

2020-11-30 Thread Justin Pryzby
On Tue, Dec 01, 2020 at 11:46:55AM +0900, Michael Paquier wrote: > On Mon, Nov 30, 2020 at 05:12:42PM +0300, Alexey Kondratov wrote: > > Thanks. I have rebased the remaining patches on top of 873ea9ee to use > > 'utility_option_list' instead of 'common_option_list'. > > Thanks, that helps a lot.

Re: should INSERT SELECT use a BulkInsertState?

2020-12-02 Thread Justin Pryzby
One loose end in this patch is how to check for volatile default expressions. copyfrom.c is a utility statement, so it can look at the parser's column list: COPY table(c1,c2)... However, for INSERT, in nodeModifyTable.c, it looks like parsing, rewriting, and planning are done, at which point I

Re: [HACKERS] [PATCH] Generic type subscripting

2020-12-02 Thread Justin Pryzby
On Wed, Dec 02, 2020 at 08:18:08PM +0100, Dmitry Dolgov wrote: > > On Wed, Dec 02, 2020 at 12:58:51PM -0500, Tom Lane wrote: > > So ... one of the things that's been worrying me about this patch > > from day one is whether it would create a noticeable performance > > penalty for existing

Re: New Table Access Methods for Multi and Single Inserts

2020-12-17 Thread Justin Pryzby
On Thu, Dec 17, 2020 at 04:35:33PM +0530, Bharath Rupireddy wrote: > > You made the v2 insert interface a requirement for all table AMs. > > Should it be optional, and fall back to simple inserts if not implemented ? > > I tried to implement the APIs mentioned by Andreas here in [1]. I just >

Re: allow to \dtS+ pg_toast.*

2020-12-17 Thread Justin Pryzby
Thanks for looking On Thu, Dec 17, 2020 at 04:16:52PM +0100, Laurenz Albe wrote: > On Mon, 2020-11-30 at 10:54 -0600, Justin Pryzby wrote: > > This makes toast tables a bit less special and easier to inspect. > > > > postgres=# \dtS+ pg_toast.pg_toast_2619 > > pg_to

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

2020-12-12 Thread Justin Pryzby
On Sat, Dec 12, 2020 at 01:45:26PM -0600, Justin Pryzby wrote: > On Sat, Dec 12, 2020 at 09:20:35AM +0100, Peter Eisentraut wrote: > > On 2020-12-11 21:27, Alvaro Herrera wrote: > > > By the way-- What did you think of the idea of explictly marking the > > > types us

Re: please update ps display for recovery checkpoint

2020-12-10 Thread Justin Pryzby
Isn't the sense of "reset" inverted ? I think maybe you mean to do set_ps_display(""); in the "if reset". On Fri, Dec 11, 2020 at 12:54:22PM +0900, Michael Paquier wrote: > +update_checkpoint_display(int flags, bool restartpoint, bool reset) > +{ > + if (reset) > + { > + char

Re: zstd compression for pg_dump

2020-12-21 Thread Justin Pryzby
On Mon, Dec 21, 2020 at 03:02:40PM -0500, Tom Lane wrote: > Justin Pryzby writes: > > I found that our largest tables are 40% smaller and 20% faster to pipe > > pg_dump -Fc -Z0 |zstd relative to native zlib > > The patch might be a tad smaller if you hadn't included a core

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2020-12-23 Thread Justin Pryzby
the "type" column and recursion, to avoid loops). The initial patches are independently useful, and resolve the original issue of hiding tmpdirs. I've rebased and re-arranged the patches to reflect this. -- Justin >From 1fffd1c7af05298295e96fff189caf6eb6cc1539 Mon Sep 17 00:00:

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

2020-12-23 Thread Justin Pryzby
On Wed, Dec 23, 2020 at 09:14:18PM -0300, Alvaro Herrera wrote: > On 2020-Dec-23, Justin Pryzby wrote: > > > This was getting ugly: > > > > extern void reindex_index(Oid indexId, bool skip_constraint_checks, > > char relpersistence, int opt

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

2020-12-23 Thread Justin Pryzby
On Wed, Dec 23, 2020 at 07:22:05PM -0300, Alvaro Herrera wrote: > Also: it seems a bit weird to me to put the flags inside the options > struct. I would keep them separate -- so initially the options struct > would only have the tablespace OID, on API cleanliness grounds: I don't see why they'd

Re: New Table Access Methods for Multi and Single Inserts

2020-12-24 Thread Justin Pryzby
On Thu, Dec 24, 2020 at 05:48:42AM +0530, Bharath Rupireddy wrote: > I'm not posting the updated 0002 to 0004 patches, I plan to do so > after a couple of reviews happen on the design of the APIs in 0001. > > Thoughts? Are you familiar with this work ? https://commitfest.postgresql.org/31/2717/

Re: terminate called after throwing an instance of 'std::bad_alloc'

2020-12-18 Thread Justin Pryzby
for the second send of this email, but somehow I managed to mangle > the headers in the last version I sent. > > On 2020-10-03 19:01:27 -0700, Andres Freund wrote: > > On 2020-10-03 18:30:46 -0500, Justin Pryzby wrote: > > > On Sat, Oct 03, 2020 at 04:01:49PM -0700, Andres

Re: allow to \dtS+ pg_toast.*

2020-12-18 Thread Justin Pryzby
On Fri, Dec 18, 2020 at 12:43:07PM +0100, Laurenz Albe wrote: > On Fri, 2020-12-18 at 00:58 -0600, Justin Pryzby wrote: > > On Thu, Dec 17, 2020 at 04:16:52PM +0100, Laurenz Albe wrote: > > > On Mon, 2020-11-30 at 10:54 -0600, Justin Pryzby wrote: > > > > This makes t

Re: New Table Access Methods for Multi and Single Inserts

2020-12-18 Thread Justin Pryzby
On Fri, Dec 18, 2020 at 07:39:14AM +0530, Bharath Rupireddy wrote: > On Fri, Dec 18, 2020 at 2:14 AM Justin Pryzby wrote: > > Are you thinking that TableInsertState would eventually have additional > > attributes which would apply to other tableams, but not to heap ? Is > &

Re: New Table Access Methods for Multi and Single Inserts

2020-12-20 Thread Justin Pryzby
On Fri, Dec 18, 2020 at 11:54:39AM -0600, Justin Pryzby wrote: > On Fri, Dec 18, 2020 at 07:39:14AM +0530, Bharath Rupireddy wrote: > > On Fri, Dec 18, 2020 at 2:14 AM Justin Pryzby wrote: > > > Are you thinking that TableInsertState would eventually have additional > >

v10 release notes for extended stats

2020-12-19 Thread Justin Pryzby
2017-03-24 [7b504eb28] Implement multivariate n-distinct coefficients 2017-04-05 [2686ee1b7] Collect and use multi-column dependency stats 2017-05-12 [bc085205c] Change CREATE STATISTICS syntax The existing notes say: |Add multi-column optimizer statistics to compute the correlation ratio and

Re: pg_upgrade test for binary compatibility of core data types

2020-12-16 Thread Justin Pryzby
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 domain on name, not varchar. > > I added a table to the r

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

2020-12-15 Thread Justin Pryzby
On Mon, Dec 14, 2020 at 06:14:17PM -0600, Justin Pryzby wrote: > On Sat, Dec 12, 2020 at 01:45:26PM -0600, Justin Pryzby wrote: > > On Sat, Dec 12, 2020 at 09:20:35AM +0100, Peter Eisentraut wrote: > > > On 2020-12-11 21:27, Alvaro Herrera wrote: > > > > By

[PATCH] nbtree: Do not show debugmessage if deduplication is disabled

2020-12-16 Thread Justin Pryzby
Even though the message literally says whether the index "can safely" or "cannot" use deduplication, the function specifically avoids the debug message for system columns, so I think it also makes sense to hide it when deduplication is turned off. diff --git

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

2020-12-22 Thread Justin Pryzby
On Tue, Dec 22, 2020 at 03:47:57PM +0900, Michael Paquier wrote: > On Wed, Dec 16, 2020 at 10:01:11AM +0900, Michael Paquier wrote: > > On Tue, Dec 15, 2020 at 09:45:17PM -0300, Alvaro Herrera wrote: > > > I don't like this idea too much, because adding an option causes an ABI > > > break. I

doc review for v14

2020-12-21 Thread Justin Pryzby
As I did last 2 years, I reviewed docs for v14... This year I've started early, since it takes more than a little effort and it's not much fun to argue the change in each individual hunk. -- Justin Pryzby System Administrator Telsasoft +1-952-707-8581 >F

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

2020-12-22 Thread Justin Pryzby
On Tue, Dec 22, 2020 at 06:57:41PM +0900, Michael Paquier wrote: > On Tue, Dec 22, 2020 at 02:32:05AM -0600, Justin Pryzby wrote: > > Also, this one is going to be subsumed by ExecReindex(), so the palloc will > > go > > away (otherwise I would ask to pass it in from the call

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

2020-12-22 Thread Justin Pryzby
On Tue, Dec 22, 2020 at 03:22:19PM -0800, Zhihong Yu wrote: > Justin: > For reindex_index() : > > + if (options->tablespaceOid == MyDatabaseTableSpace) > + options->tablespaceOid = InvalidOid; > ... > + oldTablespaceOid = iRel->rd_rel->reltablespace; > + if (set_tablespace && > +

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

2020-12-14 Thread Justin Pryzby
On Sat, Dec 12, 2020 at 01:45:26PM -0600, Justin Pryzby wrote: > On Sat, Dec 12, 2020 at 09:20:35AM +0100, Peter Eisentraut wrote: > > On 2020-12-11 21:27, Alvaro Herrera wrote: > > > By the way-- What did you think of the idea of explictly marking the > > > types us

Re: please update ps display for recovery checkpoint

2020-12-13 Thread Justin Pryzby
On Mon, Dec 14, 2020 at 12:01:33PM +0900, Michael Paquier wrote: > On Sat, Dec 12, 2020 at 12:41:25AM +, Bossart, Nathan wrote: > > On 12/11/20, 4:00 PM, "Michael Paquier" wrote: > >> My counter-proposal is like the attached, with the set/reset part not > >> reversed this time, and the code

Re: New Table Access Methods for Multi and Single Inserts

2020-12-16 Thread Justin Pryzby
Typos: + * 1) Specify is_multi as true, then multi insert state is allcoated. => allocated + * dropped, short-lived memory context is delted and mistate is freed up. => deleted + * 2) Currently, GetTupleSize() handles the existing heap, buffer, minmal and => minimal + /* Mulit insert state

Re: Add table access method as an option to pgbench

2020-12-24 Thread Justin Pryzby
> --- a/doc/src/sgml/ref/pgbench.sgml > +++ b/doc/src/sgml/ref/pgbench.sgml > @@ -359,6 +359,16 @@ pgbench options > d > > > > + > + > --table-access-method=TABLEAM > + > + > +Create tables using the specified table access method, rather than >

Re: Multi Inserts in CREATE TABLE AS - revived patch

2020-11-10 Thread Justin Pryzby
On Tue, Nov 10, 2020 at 10:17:15AM +, Paul Guo wrote: > Raw insert could be used on CTAS & Create MatView. For Refresh MatView the > code is a bit > different. I did not spend more time on this so not sure raw insert could be > used for that. > > But I think the previous multi insert work

Re: Add important info about ANALYZE after create Functional Index

2020-11-12 Thread Justin Pryzby
ately > +use these statistics to determine an index's usefulness. > +For new expression indexes, it is necessary to run +linkend="sql-analyze">ANALYZE or wait for > +the autovacuum daemon to analyze > +the table to generate statistics about new expression indexes

Re: error_severity of brin work item

2020-11-13 Thread Justin Pryzby
On Fri, Nov 13, 2020 at 01:39:31PM -0300, Alvaro Herrera wrote: > On 2020-Nov-13, Justin Pryzby wrote: > > > I saw a bunch of these in my logs: > > > > log_time | 2020-10-25 22:59:45.619-07 > > database | > > left | could not open relation with OID 2921

Re: Split copy.c

2020-11-15 Thread Justin Pryzby
On Tue, Nov 03, 2020 at 03:15:27PM +1300, David Rowley wrote: > On Tue, 3 Nov 2020 at 07:35, Andres Freund wrote: > > > > On 2020-11-02 19:43:38 +0200, Heikki Linnakangas wrote: > > > On 02/11/2020 19:23, Andres Freund wrote: > > > > On 2020-11-02 11:03:29 +0200, Heikki Linnakangas wrote: > > > >

Re: CLUSTER on partitioned index

2020-11-15 Thread Justin Pryzby
On Wed, Nov 04, 2020 at 08:23:56PM -0600, Justin Pryzby wrote: > On Tue, Oct 27, 2020 at 07:33:12PM -0500, Justin Pryzby wrote: > > I'm attaching a counter-proposal to your catalog change, which preserves > > indisclustered on children of clustered, partitioned indexes, and

Re: More time spending with "delete pending"

2020-11-14 Thread Justin Pryzby
On Sat, Nov 14, 2020 at 01:00:00PM +0300, Alexander Lakhin wrote: > As noted in [1], a sensible solution would be putting the same "retry on > ERROR_ACCESS_DENIED" action in a wrapper for stat(). > And bed90759f brought in master the _pgstat64() function, where such > error handling should be

Re: Add important info about ANALYZE after create Functional Index

2020-11-16 Thread Justin Pryzby
On Thu, Nov 12, 2020 at 06:01:02PM -0500, Bruce Momjian wrote: > On Thu, Nov 12, 2020 at 03:11:43PM -0600, Justin Pryzby wrote: > > I guess it should say "The system regularly ..." > > > > Also, the last sentence begins "For new expression indexes" and en

Re: [PATCH] remove deprecated v8.2 containment operators

2020-11-16 Thread Justin Pryzby
On Fri, Nov 13, 2020 at 10:03:43AM -0500, Stephen Frost wrote: > * Magnus Hagander (mag...@hagander.net) wrote: > > On Thu, Nov 12, 2020 at 11:28 PM Tom Lane wrote: > > > > The changes to the contrib modules appear to be incomplete in some ways. > > > > In cube, hstore, and seg, there are no

Re: error_severity of brin work item

2020-11-19 Thread Justin Pryzby
On Fri, Nov 13, 2020 at 12:11:21PM -0600, Justin Pryzby wrote: > On Fri, Nov 13, 2020 at 01:39:31PM -0300, Alvaro Herrera wrote: > > On 2020-Nov-13, Justin Pryzby wrote: > > > > > I saw a bunch of these in my logs: > > > > > > log_time | 2020-10-25 22

Re: error_severity of brin work item

2020-11-19 Thread Justin Pryzby
On Thu, Nov 19, 2020 at 03:15:21PM -0300, Alvaro Herrera wrote: > On 2020-Nov-19, Justin Pryzby wrote: > > > On Fri, Nov 13, 2020 at 12:11:21PM -0600, Justin Pryzby wrote: > > > > Your patch didn't actually say "try_relation_open", so didn't work. > > >

Re: jit and explain nontext

2020-11-20 Thread Justin Pryzby
On Fri, Nov 20, 2020 at 04:56:38PM +0100, Peter Eisentraut wrote: > On 2020-10-17 21:21, Justin Pryzby wrote: > > Added at:https://commitfest.postgresql.org/30/2766/ > > > > diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c > > index 41

Re: pg_dump, ATTACH, and independently restorable child partitions

2020-11-20 Thread Justin Pryzby
On Fri, Nov 06, 2020 at 11:18:35PM -0300, Alvaro Herrera wrote: > On 2020-Oct-24, Justin Pryzby wrote: > > > On Fri, Oct 23, 2020 at 12:29:40AM -0500, Justin Pryzby wrote: > > > > Now that I look, it seems like this is calling PQexec(), which sends a > > > sin

Re: planner support functions: handle GROUP BY estimates ?

2020-11-17 Thread Justin Pryzby
> test=# create table t (a pg_statistic[]); > ERROR: column "stavalues1" has pseudo-type anyarray It works during initdb for the reasons that it's allowed for pg_statistic. -- Justin >From b9dabd3b773b077e55bb5ea23b89eb3d650029ee Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 17 Nov 2020 09:28:33

Re: proposal: possibility to read dumped table's name from file

2020-11-17 Thread Justin Pryzby
## +# Test broken input format + +open $inputfile, '>', "$tempdir/inputfile.txt"; +print $inputfile "k"; +close $inputfile; + +command_fails_like( + [ "pg_dump", '-p', $port, "-f", $plainfile, "--filter=$tempdir/inputfile.t

Re: jit and explain nontext

2020-11-21 Thread Justin Pryzby
On Sat, Nov 21, 2020 at 08:39:11AM +0100, Peter Eisentraut wrote: > On 2020-11-20 17:16, Justin Pryzby wrote: > > It matters if it was planned with jit but executed without jit. > > > > postgres=# DEALLOCATE p; SET jit=on; SET jit_above_cost=0; prepare p as > > sele

error_severity of brin work item

2020-11-13 Thread Justin Pryzby
I saw a bunch of these in my logs: log_time | 2020-10-25 22:59:45.619-07 database | left | could not open relation with OID 292103095 left | processing work entry for relation "ts.child.alarms_202010_alarm_clear_time_idx" Those happen following a REINDEX job on that index. I think

Re: [PATCH] remove pg_archivecleanup and pg_standby

2020-11-02 Thread Justin Pryzby
On Thu, Oct 29, 2020 at 08:40:31PM +0100, Michael Banck wrote: > Am Mittwoch, den 28.10.2020, 21:44 -0500 schrieb Justin Pryzby: > > Forking this thread: > > https://www.postgresql.org/message-id/fd93f1c5-7818-a02c-01e5-1075ac0d4...@iki.fi > > I think these are old-fashio

Re: should INSERT SELECT use a BulkInsertState?

2020-11-02 Thread Justin Pryzby
On Mon, Nov 02, 2020 at 07:53:45AM +0100, Luc Vlaming wrote: > On 30.10.20 05:51, Justin Pryzby wrote: > > On Thu, Oct 22, 2020 at 01:29:53PM +0100, Simon Riggs wrote: > > > On Fri, 16 Oct 2020 at 22:05, Justin Pryzby wrote: > > > > > > > > > I mad

Re: psql \df choose functions by their arguments

2020-10-28 Thread Justin Pryzby
On Thu, Oct 15, 2020 at 01:21:06PM -0400, Greg Sabino Mullane wrote: > Improve psql \df to choose functions by their arguments I think this is a good idea. This isn't working for arrays: postgres=# \df aa public | aa | integer | integer, integer| func public | aa |

Re: should INSERT SELECT use a BulkInsertState?

2020-10-29 Thread Justin Pryzby
On Thu, Oct 22, 2020 at 01:29:53PM +0100, Simon Riggs wrote: > On Fri, 16 Oct 2020 at 22:05, Justin Pryzby wrote: > > > > > I made this conditional on BEGIN BULK/SET bulk, so I'll solicit > > > > comments on that. > > I think it would be better if th

Re: Assertion failure when ATTACH partition followed by CREATE PARTITION.

2020-10-30 Thread Justin Pryzby
tmt=0x2dc19b8, isTopLevel=true, setHoldSnapshot=false, dest=0x2dc1 > > aa8, qc=0x7fff225f67c0) at pquery.c:1159 > > #9 0x0093f380 in PortalRunMulti (portal=0x2e22ab0, > > isTopLevel=true, setHoldSnapshot=false, dest=0x2dc1aa8, altdest=0x2dc1 > > aa8, qc=0x7fff225f67c0) at pquery.c:1305 > > #10 0x0093e882 in PortalRun (portal=0x2e22ab0, > > count=9223372036854775807, isTopLevel=true, run_once=true, > > dest=0x2dc1aa8, altdest=0x2dc1aa8, qc=0x7fff225f67c0) at pquery.c:779 > > #11 0x009389e8 in exec_simple_query (query_string=0x2dc07c0 > > "CREATE TABLE fail PARTITION OF public.sales \nFOR VALUES FROM > > ('2019-01-15') TO ('2019-02-15');") at postgres.c:1239 > > > > Regards, > > Amul Sul -- Justin Pryzby System Administrator Telsasoft +1-952-707-8581

Re: bulk typos

2020-10-30 Thread Justin Pryzby
On Sun, Oct 25, 2020 at 02:48:49PM -0500, Justin Pryzby wrote: > On Sat, Mar 31, 2018 at 05:56:40AM -0500, Justin Pryzby wrote: > > I needed another distraction so bulk-checked for typos, limited to comments > > in > > *.[ch]. > > > > I'm not passionate abou

CREATE INDEX CONCURRENTLY on partitioned index

2020-10-31 Thread Justin Pryzby
CONCURRENTLY. If it's interrupted, it leaves INVALID indexes, which can be cleaned up with DROP or REINDEX, same as CIC on a plain table. On Sat, Aug 08, 2020 at 01:37:44AM -0500, Justin Pryzby wrote: > On Mon, Jun 15, 2020 at 09:37:42PM +0900, Michael Paquier wrote: > > On Mon, Jun 15, 2020

Re: Additional Chapter for Tutorial

2020-10-31 Thread Justin Pryzby
If it becomes necessary to restore the cluster, you have to +copy the basebackup and the archived WAL files to their original directories. The configuration of this recovery procedure contains a string with the reverse copy command: from -- 2.17.0 >From 7712793cd1be3ff17b3f32668

<    4   5   6   7   8   9   10   11   12   13   >