Jeff Frost | 15 May 23:52
Favicon

slony upstart script for Ubuntu 10.04+

I wrote an upstart script for starting slony on ubuntu 10.04+.  If there's any
interest in including it in the slony distro, you can find it here:

https://github.com/pgexperts/upstart-scripts/blob/master/etc/init/slony.conf

--

-- 
Jeff Frost <jeff@...>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/ 
Wolf Schwurack | 12 May 03:42
Favicon
Gravatar

Error finding slony1_funcs

Not sure what I'm missing but I get this error when I try to run the slony
config. I'm running this at postgres. I ran the config earlier this week
and we had to stop slony. Try to run it today but fails

$ ./slony-conf.sh
<stdin>:21: PGRES_FATAL_ERROR load '$libdir/slony1_funcs';  - ERROR:
could not access file "$libdir/slony1_funcs": No such file or directory
<stdin>:21: Error: the extension for the Slony-I C functions cannot be
loaded in database 'dbname=canvas_db host=harv user=postgres'

It all looks correct but can't find slony1_funcs when running conf

$ find /opt/postgres -name slony1_funcs.so
/opt/postgres/9.0.3-pgdg/lib/slony1_funcs.so

$ pg_config --libdir
/opt/postgres/9.0.3-pgdg/lib

$ pg_config --pkglibdir
/opt/postgres/9.0.3-pgdg/lib

$ ll /opt/postgres/9.0.3-pgdg/lib/slony1_funcs.so
-rwxr-xr-x 1 postgres postgres 39K Apr  9 14:28
/opt/postgres/9.0.3-pgdg/lib/slony1_funcs.so

      0___      Wolfgang Schwurack
     c/  /'_    SA/DBA - UEN
    (*)  \(*)   801-587-9444
                wolf@...
(Continue reading)

Steve Singer | 8 May 20:57

Re: Logship files printing incorrectly

On 12-05-07 03:26 PM, Jan Wieck wrote:
> On 5/7/2012 2:58 PM, Steve Singer wrote:

> If it works on Win32, I don't see how it can make things worse. It isn't
> watertight "when using NFS", but then again, that isn't such a reliable
> solution for log shipping to begin with.
>

Your patch does in fact compile on Win32.  I don't see any problems with 
applying this patch.

>
> Jan
>
Steve Singer | 8 May 21:02

Re: Logship files printing incorrectly

On 12-05-07 07:33 PM, Richard Yen wrote:
> On Mon, May 7, 2012 at 12:22 PM, Steve Singer <ssinger@...
> <mailto:ssinger@...>> wrote:
>
>
>     The archive sequence numbers are supposed to be assigned on the node
>     the slon is for (node 3 is this case).  So two remote_worker threads
>     inside of slon 3 SHOULDN'T ever get the same archive counter number
>     (we should be serializing on an update of the archive_counter
>     table), thus they shouldn't be writing to the same file.   One
>     theory is that some of the "shouldnt's" are actually happening (for
>     reasons we haven't determined)
>
>
> I notice in my logs that I see very frequent occurrences of these (maybe
> once per minute):
>
> 16:28]myhost:/home/richyen# head /var/log/local0
> Apr 29 20:13:31 myhost.example.com <http://myhost.example.com>
> postgres[21243]: [4876-1] 2012-04-29 20:13:31.873 PDT [user=###,db=###
> localhost(57453) PID:21243 XID:1971641858]ERROR:  could not serialize
> access due to concurrent update
> Apr 29 20:13:31 myhost.example.com
> <http://myhost.example.com> postgres[21243]: [4876-2] 2012-04-29
> 20:13:31.873 PDT [user=###,db=### localhost(57453) PID:21243
> XID:1971641858]STATEMENT:  update "_slony".sl_archive_counter     set
> ac_num = ac_num + 1,         ac_timestamp = CURRENT_TIMESTAMP; select
> ac_num, ac_timestamp from "_slony".sl_archive_counter;
> Apr 29 20:13:31 myhost.example.com
> <http://myhost.example.com> postgres[21243]: [4877-1] 2012-04-29
(Continue reading)

Steve Singer | 7 May 20:58

Re: Logship files printing incorrectly

On 12-05-07 12:51 PM, Jan Wieck wrote:
> On 5/7/2012 10:16 AM, Steve Singer wrote:
>> On 12-05-07 10:09 AM, Steve Singer wrote:
>>> On 12-05-05 10:14 AM, Jan Wieck wrote:
>>>> On 5/2/2012 5:39 PM, Steve Singer wrote:

>
> Me too and I agree that O_EXCL certainly isn't the best way to do it.
> However, the presented patch does not change any existing functionality
> (except for the exclusiveness in creating the temp file).
>
> While there remains a possible race condition when using NFS, the log
> file I examined would very unlikely slip through it. Remember, the first
> process must have written more than 32K before the second process calls
> open(2).
>
> What I intended with this simple patch was to give Richard a chance to
> identify the processes involved in creating this problem. Up to this
> moment we don't even know exactly how this happens.

Sorry, I was thinking you were proposing this patch for commit on the 
2.0, 2.1, 2.2 branches not just for Richard.

I wouldn't be opposed to a patch that doesn't make things worse on 
nfs/cifs systems (if it compiles on win32).  I think we both agree that 
the real problem is what is causing two files to be opened at the same 
time, and we don't yet have a handle why that is the case.

>
>
(Continue reading)

Mirko Vogt | 24 Apr 16:40
Picon

some questions which popped up while setting up...

Hey all!

I successfully setup my first slony replication - however quite a few
conceptual questions raised on the way:

I have the following setup (taken from slon_tools.conf):

add_node(node     => 1,
         host     => 'master.foo',
         dbname   => 'foo',
         port     => 5432,
         user     => 'slony',
         password => 'XXX');

add_node(node     => 11,
         host     => 'slave1.foo',
         dbname   => 'foo',
         port     => 6254,
         user     => 'slony',
         password => 'XXX');

add_node(node     => 12,
         host     => 'slave2.foo',
         dbname   => 'foo',
         port     => 2254,
         user     => 'slony',
         password => 'XXX');

This config got deployed on every node, every pg_hba.conf-file contained
a line which allowed all other servers to connect as user slony.
(Continue reading)

Lakshmi Priya | 12 Apr 12:39
Picon

New to slony

I am getting this error..i dont know where to change..can anyone say..


<stdin>:8: loading of file /usr/local/pgsql/share//slony1_funcs.sql: PGRES_FATAL_ERROR ERROR:  Slonik version: 2.0.6 != Slony-I version in PG build 2.1.1
ERROR:  Slonik version: 2.0.6 != Slony-I version in PG build 2.1.1

_______________________________________________
Slony1-general mailing list
Slony1-general@...
http://lists.slony.info/mailman/listinfo/slony1-general
Lakshmi Priya | 12 Apr 08:11
Picon

Update function

When i specify

UPDATE FUNCTIONS ( ID = 3 # Update functions on node 3 );

I am getting event node error,even i specified event node as 2 or 3. Event node function will not work in update node.

Can anyone help me..
_______________________________________________
Slony1-general mailing list
Slony1-general@...
http://lists.slony.info/mailman/listinfo/slony1-general
Richard Yen | 11 Apr 15:24

Logship files printing incorrectly

Hi,


I've recently come across a situation where slony logshipping files were being written incorrectly.  Normally, the files are written in this order:
- Begin transaction
- Set archive tracking index
- INSERTs/UPDATEs/DELETEs
- Set sequences
- Vacuum
- Commit

I noticed that in my particular instance, the files were being written as such:
- Begin transaction
- Set archive tracking index
- Vacuum
- Commit
- INSERTs/UPDATEs/DELETEs
- Set sequences

Obviously, this sounds pretty dangerous, and I actually encountered the situation where my logship destination got corrupted, and needed to rebuild that node.

Would anyone have any insight into why this happens?

Using 2.0.6 on CentOS, with Postgres 8.4.5

Thanks!
--Richard
_______________________________________________
Slony1-general mailing list
Slony1-general@...
http://lists.slony.info/mailman/listinfo/slony1-general
Glyn Astill | 11 Apr 12:05
Picon
Favicon

Re: Error in slony

Please don't reply off list.

First check the version of the slony binaries installed across your servers, and the slonik tool you are using are the same and the version you want to be using.  Then run update functions as follows.

http://slony.info/documentation/2.1/stmtupdatefunctions.html

From: Lakshmi Priya <gangulynj <at> gmail.com>
To: Glyn Astill <glynastill-/E1597aS9LT10XsdtD+oqA@public.gmane.org>
Sent: Wednesday, 11 April 2012, 10:44
Subject: Re: [Slony1-general] Error in slony

How to run the Update functions..

On Wed, Apr 11, 2012 at 1:56 PM, Glyn Astill <glynastill-/E1597aS9LT10XsdtD+oqA@public.gmane.org> wrote:
It means that the version of the functions in your schema does not match the compiled version of slony.  I'm guessing you need to run "update functions"

From: Lakshmi Priya <gangulynj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: slony1-general-8kkgcvHRObyz5F2/bZa4Fw@public.gmane.org
Sent: Wednesday, 11 April 2012, 8:24
Subject: [Slony1-general] Error in slony

Can any one say what this error meant..??

<stdin>:8: loading of file /usr/local/pgsql/share//slony1_funcs.sql: PGRES_FATAL_ERROR ERROR:  Slonik version: 2.0.6 != Slony-I version in PG build 2.1.1.

_______________________________________________
Slony1-general mailing list
Slony1-general-8kkgcvHRObyz5F2/bZa4Fw@public.gmane.org
http://lists.slony.info/mailman/listinfo/slony1-general





_______________________________________________
Slony1-general mailing list
Slony1-general@...
http://lists.slony.info/mailman/listinfo/slony1-general
Lakshmi Priya | 11 Apr 09:24
Picon

Error in slony

Can any one say what this error meant..??

<stdin>:8: loading of file /usr/local/pgsql/share//slony1_funcs.sql: PGRES_FATAL_ERROR ERROR:  Slonik version: 2.0.6 != Slony-I version in PG build 2.1.1.
_______________________________________________
Slony1-general mailing list
Slony1-general@...
http://lists.slony.info/mailman/listinfo/slony1-general

Gmane