Hi Andres,

I have been able to fetch your code (thanks Andrea!) and some it. For the
time being I am spending some time reading the code and understanding the
whole set of features you are trying to implement inside core, even if I
got some background from what you presented at PGCon and from the hackers
ML.
Btw, as a first approach, I tried to run the logical log receiver plugged
on a postgres server, and I am not able to make it work.

Well, I am using settings similar to yours.
# Run master
rm -r ~/bin/pgsql/master/
initdb -D ~/bin/pgsql/master/
echo "local replication $USER trust" >> ~/bin/pgsql/master/pg_hba.conf
postgres -D ~/bin/pgsql/master \
          -c wal_level=logical \
          -c max_wal_senders=10 \
          -c max_logical_slots=10 \
          -c wal_keep_segments=100 \
          -c log_line_prefix="[%p %x] "
# Logical log receiver
pg_receivellog -f $HOME/output.txt -d postgres -v

After launching some SQLs, the logical receiver is stuck just after sending
INIT_LOGICAL_REPLICATION, please see bt of process waiting:
(gdb) bt
#0  0x00007f1bbc13b170 in __poll_nocancel () from /usr/lib/libc.so.6
#1  0x00007f1bbc43072d in pqSocketPoll (sock=3, forRead=1, forWrite=0,
end_time=-1) at fe-misc.c:1089
#2  0x00007f1bbc43060d in pqSocketCheck (conn=0x1dd0290, forRead=1,
forWrite=0, end_time=-1) at fe-misc.c:1031
#3  0x00007f1bbc4304dd in pqWaitTimed (forRead=1, forWrite=0,
conn=0x1dd0290, finish_time=-1) at fe-misc.c:963
#4  0x00007f1bbc4304af in pqWait (forRead=1, forWrite=0, conn=0x1dd0290) at
fe-misc.c:946
#5  0x00007f1bbc42c64c in PQgetResult (conn=0x1dd0290) at fe-exec.c:1709
#6  0x00007f1bbc42cd62 in PQexecFinish (conn=0x1dd0290) at fe-exec.c:1974
#7  0x00007f1bbc42c9c8 in PQexec (conn=0x1dd0290, query=0x406c60
"INIT_LOGICAL_REPLICATION 'test_decoding'") at fe-exec.c:1808
#8  0x0000000000402370 in StreamLog () at pg_receivellog.c:263
#9  0x00000000004030c9 in main (argc=6, argv=0x7fff44edb288) at
pg_receivellog.c:694
So I am not able to output any results using pg_receivellog.

Also, I noticed 2 errors in your set of tests.

On Thu, Nov 15, 2012 at 9:27 AM, Andres Freund <and...@anarazel.de> wrote:

> -- wrapped in a transaction
> BEGIN;
> INSERT INTO replication_example(somedata, text) VALUES (1, 1);
> UPDATE replication_example SET somedate = - somedata WHERE id = (SELECT
> currval('replication_example_id_seq'));
>
In SET clause, the column name is *somedata* and not *somedate*


> -- dont write out aborted data
> BEGIN;
> INSERT INTO replication_example(somedata, text) VALUES (2, 1);
> UPDATE replication_example SET somedate = - somedata WHERE id = (SELECT
> currval('replication_example_id_seq'));
>
Same error here, *somedata* and not *somedate*. Not a big deal, it made the
transactions failing though.
-- 
Michael Paquier
http://michael.otacoo.com

Reply via email to