Re: create table like: ACCESS METHOD

2021-08-29 Thread Michael Paquier
On Fri, Aug 27, 2021 at 02:38:43PM +0900, Michael Paquier wrote: > +CREATE ACCESS METHOD heapdup TYPE TABLE HANDLER heap_tableam_handler; > +CREATE TABLE likeam() USING heapdup; > +CREATE TABLE likeamlike(LIKE likeam INCLUDING ALL); > Rather than creating a custom AM in this test path, I would be

Re: Fix around conn_duration in pgbench

2021-08-29 Thread Yugo NAGATA
On Mon, 30 Aug 2021 14:22:49 +0900 (JST) Tatsuo Ishii wrote: > >> Anyway, I changed the status of this patch to "Waiting on Author" in CF. > > > > I returned the status to "Ready for Committer". > > Could you please review this? > > According to the patch tester, the patch does not apply.

replace IDENTIFY_SYSTEM code in receivelog.c with RunIdentifySystem()

2021-08-29 Thread Bharath Rupireddy
Hi, I see a couple of improvements to receivelog.c and pg_receivewal.c: 1) ReceiveXlogStream in receivelog.c has a duplicate code to execute IDENTIFY_SYSTEM replication command on the server which can be replaced with RunIdentifySystem(). 2) bool returning ReceiveXlogStream() in pg_receivewal.c

Re: Fix around conn_duration in pgbench

2021-08-29 Thread Tatsuo Ishii
>> Anyway, I changed the status of this patch to "Waiting on Author" in CF. > > I returned the status to "Ready for Committer". > Could you please review this? According to the patch tester, the patch does not apply. -- Tatsuo Ishii SRA OSS, Inc. Japan English:

Re: Using COPY FREEZE in pgbench

2021-08-29 Thread Tatsuo Ishii
> I tested this with -s100 and got similar results, but with -s1000 it > was more like 1.5x faster: > > master: > done in 111.33 s (drop tables 0.00 s, create tables 0.01 s, > client-side generate 52.45 s, vacuum 32.30 s, primary keys 26.58 s) > > patch: > done in 74.04 s (drop tables 0.46 s,

Re: create table like: ACCESS METHOD

2021-08-29 Thread Michael Paquier
On Fri, Aug 27, 2021 at 12:37:59PM +0200, Vik Fearing wrote: > It seems like this should error to me: > > CREATE ACCESS METHOD heapdup TYPE TABLE HANDLER heap_tableam_handler; > CREATE TABLE likeam1() USING heap; > CREATE TABLE likeam2() USING heapdup; > CREATE TABLE likeamlike( > LIKE

Re: simplifying foreign key/RI checks

2021-08-29 Thread Corey Huinker
> > Rebased patches attached. I'm reviewing the changes since v6, which was my last review. Making ExecLockTableTuple() it's own function makes sense. Snapshots are now accounted for. The changes that account for n-level partitioning makes sense as well. Passes make check-world. Not user

Re: jff: checksum algorithm is not as intended

2021-08-29 Thread Tom Lane
Yura Sokolov writes: > Single round function is written as: > #define CHECKSUM_COMP(checksum, value) do {\ > uint32 __tmp = (checksum) ^ (value);\ > (checksum) = __tmp * FNV_PRIME ^ (__tmp >> 17);\ > } while (0) > And looks like it was intended to be > (checksum) = (__tmp *

RE: Added schema level support for publication.

2021-08-29 Thread houzj.f...@fujitsu.com
On Friday, August 27, 2021 2:13 PM vignesh C wrote: > > I have implemented this in the 0003 patch, I have kept it separate to reduce > the > testing effort and also it will be easier if someone disagrees with the > syntax. I > will merge it to the main patch later based on the feedback.

Re: Tablesync early exit

2021-08-29 Thread Peter Smith
Patch v2 is the same; it only needed re-basing to the latest HEAD. Kind Regards, Peter Smith. Fujitsu Australia v2-0001-Tablesync-early-exit.patch Description: Binary data

Re: Added schema level support for publication.

2021-08-29 Thread Greg Nancarrow
On Fri, Aug 27, 2021 at 4:13 PM vignesh C wrote: > > I have implemented this in the 0003 patch, I have kept it separate to > reduce the testing effort and also it will be easier if someone > disagrees with the syntax. I will merge it to the main patch later > based on the feedback. Attached v22

Re: [PATCH] More docs on what to do and not do in extension code

2021-08-29 Thread Craig Ringer
On Tue, 29 Jun 2021 at 13:30, Craig Ringer wrote: > Laurenz, > > Thanks for your comments. Sorry it's taken me so long to get back to you. > Commenting inline below on anything I think needs comment; other proposed > changes look good. > I'm not going to get back to this anytime soon. If

Re: row filtering for logical replication

2021-08-29 Thread Peter Smith
On Fri, Aug 27, 2021 at 8:01 AM Peter Smith wrote: > > On Thu, Aug 26, 2021 at 9:13 PM Amit Kapila wrote: > > > > On Thu, Aug 26, 2021 at 3:41 PM Peter Smith wrote: > > > > > > On Thu, Aug 26, 2021 at 3:00 PM Amit Kapila > > > wrote: > > > > > > > > On Thu, Aug 26, 2021 at 9:51 AM Peter Smith

Re: Remove Value node struct

2021-08-29 Thread Kyotaro Horiguchi
Agree to the motive and +1 for the concept. At Wed, 25 Aug 2021 15:00:13 +0100, Dagfinn Ilmari Mannsåker wrote in > However, the patch adds: > > > +typedef struct Null > > +{ > > + NodeTag type; > > + char *val; > > +} Null; > > which doesn't seem to be used anywhere. Is

Re: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o)

2021-08-29 Thread Masahiko Sawada
On Fri, Aug 27, 2021 at 2:25 PM Dilip Kumar wrote: > > On Thu, Aug 26, 2021 at 2:10 PM Amit Kapila wrote: >> >> >> Thanks, Sawada-San and Dilip for confirmation. I would like to commit >> this and the second patch (the second one still needs some more >> testing and review) for PG-15 as there is

Re: [PATCH] Tab completion for ALTER TABLE … ADD …

2021-08-29 Thread Michael Paquier
On Fri, Aug 27, 2021 at 11:52:33AM +0100, Dagfinn Ilmari Mannsåker wrote: > That was easy enough to add (just a bit of extra fiddling to handle > COLUMN being optional), done in the attached v2 patch. This part was a bit misleading, as it would recommend a list of types when specifying just ADD

Re: Write visibility map during CLUSTER/VACUUM FULL

2021-08-29 Thread Justin Pryzby
On Mon, Jun 28, 2021 at 11:22:01AM +0300, Anna Akenteva wrote: > On 2019-11-29 05:32, Michael Paquier wrote: > > These comments are unanswered for more than 2 months, so I am marking > > this entry as returned with feedback. > > I'd like to revive this patch. To make further work easier,

jff: checksum algorithm is not as intended

2021-08-29 Thread Yura Sokolov
Good day. Current checksum is not calculated in intended way and has the flaw. Single round function is written as: #define CHECKSUM_COMP(checksum, value) do {\ uint32 __tmp = (checksum) ^ (value);\ (checksum) = __tmp * FNV_PRIME ^ (__tmp >> 17);\ } while (0) And looks like it was

Re: Schema variables - new implementation for Postgres 15

2021-08-29 Thread Pavel Stehule
so 28. 8. 2021 v 11:57 odesílatel Gilles Darold napsal: > Hi, > > Review resume: > > > This patch implements Schema Variables that are database objects that can > hold a single or composite value following the data type used at variable > declaration. Schema variables, like relations, exist

Re: FYA: VITAL INFO

2021-08-29 Thread Osahon Oduware
LEAH SHARIBU: News making round states that she escaped early Wednesday morning (August 18, 2021), from where she was held hostage around B.I.U., Ugbor, Benin City, Edo State, Nigeria, after being released by her Islamic captors some months back. Some influential persons were involved in her

Re: Spelling change in LLVM 14 API

2021-08-29 Thread Andres Freund
Hi, On 2021-08-22 09:22:43 -0400, Tom Lane wrote: > Seems like either we should push back on pointless renaming, or else > that we're not really supposed to be accessing this non-stable API. Unfortunately LLVM only considers the C API (and even there only subsets) as stable. Most of our code

Re: Spelling change in LLVM 14 API

2021-08-29 Thread Alvaro Herrera
On 2021-Aug-29, Tom Lane wrote: > I stand by my opinion that Thomas' patch is a kluge rather than something > we should accept as a long-term answer. However, in the interests of > keeping the buildfarm green, maybe we should commit it until we have a > better solution. It looks like seawasp is

Re: inconsistent behavior with "GENERATED BY DEFAULT AS IDENTITY"

2021-08-29 Thread Himanshu Upadhyaya
ok, understood. Thanks Tom. Regards, Himanshu On Sun, Aug 29, 2021 at 7:10 PM Tom Lane wrote: > Himanshu Upadhyaya writes: > > IMHO below query should replace "NULL" value for ID column with the > > GENERATED IDENTITY value (should insert 1,10 for ID and ID1 respectively > in > > below's

Re: Spelling change in LLVM 14 API

2021-08-29 Thread Tom Lane
Alvaro Herrera writes: > On 2021-Aug-22, Tom Lane wrote: >> Thomas Munro writes: >>> After [1], seawasp blew up[2]. I tested the following fix on LLVM 13 >>> and 14 (main branch ~2 days ago). Better ideas welcome. >>> >>> - if

Re: AIX: Symbols are missing in libpq.a

2021-08-29 Thread Noah Misch
On Thu, Aug 26, 2021 at 12:49:01PM +, REIX, Tony wrote: > While porting postgresql-odbc v13 to AIX, we have found that (at least) 2 > symbols are missing in libpq.a provided by the port of PostgreSQL v13.1 to > AIX 7.1 by the BullFreeware project : > > pg_char_to_encoding >

Re: Spelling change in LLVM 14 API

2021-08-29 Thread Alvaro Herrera
On 2021-Aug-22, Tom Lane wrote: > Thomas Munro writes: > > After [1], seawasp blew up[2]. I tested the following fix on LLVM 13 > > and 14 (main branch ~2 days ago). Better ideas welcome. > > > - if (F.getAttributes().hasFnAttribute(llvm::Attribute::NoInline)) > > +#if

Re: inconsistent behavior with "GENERATED BY DEFAULT AS IDENTITY"

2021-08-29 Thread Tom Lane
Himanshu Upadhyaya writes: > IMHO below query should replace "NULL" value for ID column with the > GENERATED IDENTITY value (should insert 1,10 for ID and ID1 respectively in > below's example), similar to what we expect when we have DEFAULT constraint > on the column. Why? Ordinary DEFAULT

inconsistent behavior with "GENERATED BY DEFAULT AS IDENTITY"

2021-08-29 Thread Himanshu Upadhyaya
Hi, It seems we have inconsistent behavior with the implementation of "GENERATED BY DEFAULT AS IDENTITY" constraint on a table column. Here we are not allowing(internally not replacing NULL with IDENTITY DEFAULT) the "NULL" insertion into the table column. postgres=# CREATE TABLE TEST_TBL_1(ID