Re: Small issues with CREATE TABLE COMPRESSION

2021-05-10 Thread Dilip Kumar
On Tue, May 11, 2021 at 7:19 AM Michael Paquier wrote: > > > Patch looks good to me, I can not verify though because I don't have > > such an environment. Thanks for improving the patch. > > Thanks, I got that applied to finish the work of this thread for > beta1. At least this will give people

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-10 Thread Michael Paquier
On Mon, May 10, 2021 at 12:17:19PM +0530, Dilip Kumar wrote: > Even I was confused about that's the reason I used liblz4_static.lib, > but I see you have changed to liblz4.lib to make it consistent I > guess? That's the name the upstream code is using, yes. > Patch looks good to me, I can not ver

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-09 Thread Dilip Kumar
On Mon, May 10, 2021 at 11:27 AM Michael Paquier wrote: > > On Sat, May 08, 2021 at 08:19:03PM +0530, Dilip Kumar wrote: > > I have fixed some of them, I could not write the test cases where we > > have to ensure that 'ALTER TABLE COMPRESSION' is not appearing in the > > dump. Basically, I don't

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-09 Thread Michael Paquier
On Sat, May 08, 2021 at 08:19:03PM +0530, Dilip Kumar wrote: > I have fixed some of them, I could not write the test cases where we > have to ensure that 'ALTER TABLE COMPRESSION' is not appearing in the > dump. Basically, I don't have knowledge of the perl language so even > after trying for some

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-09 Thread Michael Paquier
On Sat, May 08, 2021 at 09:06:18AM -0500, Justin Pryzby wrote: > I suggest that should reference guc-default-toast-compression instead of > CREATE > TABLE, since CREATE TABLE is large and very non-specific. Yes, that's a better idea. > Also, in at least 3 places there's extraneous trailing white

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-08 Thread Dilip Kumar
On Sat, May 8, 2021 at 2:08 PM Michael Paquier wrote: > > On Thu, May 06, 2021 at 09:33:53PM +0530, Dilip Kumar wrote: > > On Thu, May 6, 2021 at 5:42 PM Michael Paquier wrote: > > > > > > On Thu, May 06, 2021 at 10:45:53AM +0530, Dilip Kumar wrote: > > > > Thanks, Robert and Michael for your inp

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-08 Thread Dilip Kumar
On Sat, May 8, 2021 at 6:43 PM Michael Paquier wrote: > > On Sat, May 08, 2021 at 05:37:58PM +0900, Michael Paquier wrote: > > Thanks! I can dive into that if that's an issue. Let's make things > > compatible with what upstream provides, meaning that we should have > > some documentation pointin

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-08 Thread Justin Pryzby
| You need LZ4, if you want to support the compression of data with this method; see CREATE TABLE. I suggest that should reference guc-default-toast-compression instead of CREATE TABLE, since CREATE TABLE is large and very non-specific. Also, in at least 3 places there's extraneous trailing whi

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-08 Thread Justin Pryzby
On Sat, May 08, 2021 at 10:13:09PM +0900, Michael Paquier wrote: > + You need LZ4, if you want to support > + the compression of data with this method; see > + . I suggest to change "the compression" to "compression". I would write the whole thing like: | The LZ4 library is needed t

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-08 Thread Michael Paquier
On Sat, May 08, 2021 at 05:37:58PM +0900, Michael Paquier wrote: > Thanks! I can dive into that if that's an issue. Let's make things > compatible with what upstream provides, meaning that we should have > some documentation pointing to the location of their deliverables, > equally to what we do

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-08 Thread Michael Paquier
On Thu, May 06, 2021 at 09:33:53PM +0530, Dilip Kumar wrote: > On Thu, May 6, 2021 at 5:42 PM Michael Paquier wrote: > > > > On Thu, May 06, 2021 at 10:45:53AM +0530, Dilip Kumar wrote: > > > Thanks, Robert and Michael for your input. I will try to understand > > > how it is done in the example s

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-07 Thread Dilip Kumar
On Sat, May 8, 2021 at 7:04 AM Michael Paquier wrote: > > On Thu, May 06, 2021 at 09:04:57PM +0900, Michael Paquier wrote: > > Yeah, I agree that this is an improvement, so let's fix this. > > Just noticed that this was not applied yet, so done while I was > looking at this thread again. Thanks!

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-07 Thread Michael Paquier
On Thu, May 06, 2021 at 09:04:57PM +0900, Michael Paquier wrote: > Yeah, I agree that this is an improvement, so let's fix this. Just noticed that this was not applied yet, so done while I was looking at this thread again. -- Michael signature.asc Description: PGP signature

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-06 Thread Dilip Kumar
On Thu, May 6, 2021 at 5:42 PM Michael Paquier wrote: > > On Thu, May 06, 2021 at 10:45:53AM +0530, Dilip Kumar wrote: > > Thanks, Robert and Michael for your input. I will try to understand > > how it is done in the example shared by you and come up with the test > > once I get time. I assume t

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-06 Thread Michael Paquier
On Thu, May 06, 2021 at 10:45:53AM +0530, Dilip Kumar wrote: > Thanks, Robert and Michael for your input. I will try to understand > how it is done in the example shared by you and come up with the test > once I get time. I assume this is not something urgent. Thanks. FWIW, I'd rather see this

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-06 Thread Michael Paquier
On Thu, May 06, 2021 at 05:01:23PM +0530, Dilip Kumar wrote: > I noticed that the error code for invalid compression method is not > perfect, basically when we pass the invalid compression method during > CREATE/ALTER table that time we give > ERRCODE_FEATURE_NOT_SUPPORTED. I think the correct err

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-06 Thread Dilip Kumar
On Thu, May 6, 2021 at 10:45 AM Dilip Kumar wrote: I noticed that the error code for invalid compression method is not perfect, basically when we pass the invalid compression method during CREATE/ALTER table that time we give ERRCODE_FEATURE_NOT_SUPPORTED. I think the correct error code is ERRCO

Re: Small issues with CREATE TABLE COMPRESSION

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

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-05 Thread Michael Paquier
On Wed, May 05, 2021 at 09:59:41AM -0400, Robert Haas wrote: > TAP tests have a facility for conditionally skipping tests; see > perldoc Test::More. That's actually superior to what you can do with > pg_regress. We'd need to come up with some logic to determine when to > skip or not, though. Perhap

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-05 Thread Robert Haas
On Wed, May 5, 2021 at 7:09 AM Dilip Kumar wrote: > So basically, if we have to write this test case in pg_dump then we > will have to use lz4 which means it will generate different output > --with-lz4 vs --without-lz4. With a simple regress test it easy to > deal with such cases by keeping multi

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-05 Thread Dilip Kumar
On Wed, May 5, 2021 at 4:00 PM Michael Paquier wrote: > > On Wed, May 05, 2021 at 01:41:03PM +0530, Dilip Kumar wrote: > > I think we already have such test cases at least through pg_upgrade. > > Basically, if you see in compression.sql we are not dropping the table > > so that pg_upgrade and dump

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-05 Thread Michael Paquier
On Wed, May 05, 2021 at 01:41:03PM +0530, Dilip Kumar wrote: > I think we already have such test cases at least through pg_upgrade. > Basically, if you see in compression.sql we are not dropping the table > so that pg_upgrade and dump them and test. So if test run --with-lz4 > then in pg_upgrade d

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-05 Thread Dilip Kumar
On Wed, May 5, 2021 at 11:02 AM Dilip Kumar wrote: > > On Wed, May 5, 2021 at 12:06 AM Robert Haas wrote: > > > > > > There are no tests in pg_dump to make sure that some ALTER > > > MATERIALIZED VIEW or ALTER TABLE commands are generated when the > > > compression of a matview's or table's colum

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-04 Thread Dilip Kumar
On Wed, May 5, 2021 at 12:06 AM Robert Haas wrote: > > > There are no tests in pg_dump to make sure that some ALTER > > MATERIALIZED VIEW or ALTER TABLE commands are generated when the > > compression of a matview's or table's column is changed. > > True, but it does seem to work. I am happy if y

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-04 Thread Dilip Kumar
On Thu, Apr 29, 2021 at 9:31 AM Justin Pryzby wrote: > > On Tue, Apr 27, 2021 at 03:22:25PM +0900, Michael Paquier wrote: > > Hi all, > > > And so, ALTER MATERIALIZED VIEW supports SET COMPRESSION but this is > > not mentioned in its docs: > > https://www.postgresql.org/docs/devel/sql-altermateria

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-04 Thread Robert Haas
Hi, My analysis of this open item is there are no code-level issues here, but there is one line of documentation that clearly got forgotten, some other documentation changes that might be nice, and maybe someone wants to work more on testing and/or tab completion at some point. On Tue, Apr 27, 20

Re: Small issues with CREATE TABLE COMPRESSION

2021-04-28 Thread Justin Pryzby
On Tue, Apr 27, 2021 at 03:22:25PM +0900, Michael Paquier wrote: > Hi all, > > I have been looking at and testing the patch set for CREATE TABLE > COMPRESSION, and spotted a couple of things in parallel of some work > done by Jacob (added in CC). > > The behavior around CREATE TABLE AS and matvie