Re: I have some troubles to run test_shm_mq;

2019-03-11 Thread Andy Fan
 Thanks for the clarification!

On Mon, Mar 11, 2019 at 5:02 PM Thomas Munro  wrote:

> On Mon, Mar 11, 2019 at 9:35 PM Andy Fan  wrote:
> > and whenever I run a simple query  "SELECT test_shm_mq(1024, 'a');"
> >
> > I see the following log
> >
> > 2019-03-11 16:33:17.800 CST [65021] LOG:  background worker
> "test_shm_mq" (PID 65052) exited with exit code 1
>
> Hmm, I don't know actually know why test_shm_mq_main() ends with
> proc_exit(1) instead of 0.  It's possible that it was written when the
> meaning of bgworker exit codes was still being figured out, but I'm
> not sure...
>
> >> Works, thank you Thomas!  I have spent more than 2 hours on this.   do
> you know which document I miss for this question?
>
> There is probably only src/test/modules/README, which explains that
> these modules are tests and examples and not part of a server
> installation.
>
> --
> Thomas Munro
> https://enterprisedb.com
>


Re: I have some troubles to run test_shm_mq;

2019-03-11 Thread Thomas Munro
On Mon, Mar 11, 2019 at 9:35 PM Andy Fan  wrote:
> and whenever I run a simple query  "SELECT test_shm_mq(1024, 'a');"
>
> I see the following log
>
> 2019-03-11 16:33:17.800 CST [65021] LOG:  background worker "test_shm_mq" 
> (PID 65052) exited with exit code 1

Hmm, I don't know actually know why test_shm_mq_main() ends with
proc_exit(1) instead of 0.  It's possible that it was written when the
meaning of bgworker exit codes was still being figured out, but I'm
not sure...

>> Works, thank you Thomas!  I have spent more than 2 hours on this.   do you 
>> know which document I miss for this question?

There is probably only src/test/modules/README, which explains that
these modules are tests and examples and not part of a server
installation.

-- 
Thomas Munro
https://enterprisedb.com



Re: I have some troubles to run test_shm_mq;

2019-03-11 Thread Andy Fan
and whenever I run a simple query  "SELECT test_shm_mq(1024, 'a');"

I see the following log

2019-03-11 16:33:17.800 CST [65021] LOG:  background worker "test_shm_mq"
(PID 65052) exited with exit code 1


does it indicates something wrong?

On Mon, Mar 11, 2019 at 4:30 PM Andy Fan  wrote:

> Works, thank you Thomas!  I have spent more than 2 hours on this.   do you
> know which document I miss for this question?
>
> Thanks
>
> On Mon, Mar 11, 2019 at 4:05 PM Thomas Munro 
> wrote:
>
>> On Mon, Mar 11, 2019 at 8:59 PM Andy Fan 
>> wrote:
>> > 4.   CREATE EXTENSION test_shm_mq;  ==> .  could not open extension
>> control file "/.../share/postgresql/extension/test_shm_mq.control": No such
>> file or directory
>> >
>> > how can I get it work?  Thanks
>>
>> Hi Andy,
>>
>> Try this first:
>>
>> cd src/test/modules/test_shm_mq
>> make install
>>
>> --
>> Thomas Munro
>> https://enterprisedb.com
>>
>


Re: I have some troubles to run test_shm_mq;

2019-03-11 Thread Andy Fan
Works, thank you Thomas!  I have spent more than 2 hours on this.   do you
know which document I miss for this question?

Thanks

On Mon, Mar 11, 2019 at 4:05 PM Thomas Munro  wrote:

> On Mon, Mar 11, 2019 at 8:59 PM Andy Fan  wrote:
> > 4.   CREATE EXTENSION test_shm_mq;  ==> .  could not open extension
> control file "/.../share/postgresql/extension/test_shm_mq.control": No such
> file or directory
> >
> > how can I get it work?  Thanks
>
> Hi Andy,
>
> Try this first:
>
> cd src/test/modules/test_shm_mq
> make install
>
> --
> Thomas Munro
> https://enterprisedb.com
>


Re: I have some troubles to run test_shm_mq;

2019-03-11 Thread Thomas Munro
On Mon, Mar 11, 2019 at 8:59 PM Andy Fan  wrote:
> 4.   CREATE EXTENSION test_shm_mq;  ==> .  could not open extension control 
> file "/.../share/postgresql/extension/test_shm_mq.control": No such file or 
> directory
>
> how can I get it work?  Thanks

Hi Andy,

Try this first:

cd src/test/modules/test_shm_mq
make install

-- 
Thomas Munro
https://enterprisedb.com



I have some troubles to run test_shm_mq;

2019-03-11 Thread Andy Fan
My code is based on commit

zhifan@zhifandeMacBook-Pro ~/g/polardb_clean> git log
commit d06fe6ce2c79420fd19ac89ace81b66579f08493
Author: Tom Lane 
Date:   Tue Nov 6 18:56:26 2018 -0500

what I did includes:
1.   ./configure --enable-debug
2.   make world  // doesn't see the test_shm_mq on the output
3.   make install-world // doesn't see the test_shm_mq.control under the
install directory.
4.   CREATE EXTENSION test_shm_mq;  ==> .  could not open extension control
file "/.../share/postgresql/extension/test_shm_mq.control": No such file or
directory

how can I get it work?  Thanks