Sat Jan 20 13:29:08 PST 2018
- Previous message: [Slony1-hackers] Akamai AMS patches
- Next message: [Slony1-hackers] Akamai AMS patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 10 Jan 2018, Tignor, Tom wrote: So for the pg_home patch. The original code is #ifdef HAVE_PGPORT /* * We need to find a share directory like PostgreSQL. */ if (find_my_exec(argv[0],myfull_path) < 0) { strcpy(share_path, PGSHARE); } else { get_share_path(myfull_path, share_path); } #else strcpy(share_path, PGSHARE); And you are replacing it with the following. #else + char *pgHome = getenv("PG_HOME"); + if (pgHome) { + strncpy(share_path, pgHome, MAXPGPATH-1); + share_path[MAXPGPATH-1] = '\0'; + strncat(share_path, "/share", MAXPGPATH-1-strlen(pgHome)); + } else { strcpy(share_path, PGSHARE); + } The above code only gets compiled in if PGPORT is not defined/present at build time. Is that your intention, or do you want PG_HOME to take precendence even if pgport is present? snprintf(share_path,"%s/share",pgHome,MAXPGPATH-1); Would the above code be clearer? (I haven't tested/tried to compile above) but trying to do this in one line? > > > > Hello slony1-hackers, > > Here at Akamai we have been using Slony-I to scale out read capacity for our Alert Management > System (AMS). Along the way we’ve needed to make a number of customizations. I’m submitting those now to consider > for inclusion in the Slony-I code base. Please find the patches attached and meta info below which would be > appropriate to use with code commits. Please take a look when time allows and let me know if there are any > questions or other changes to consider. > > Thanks in advance, > > > > Patch: compatibility_v2.2.patch > > Summary: Allows version 2.2.x slon daemons to operate in any Slony-I version 2.2.x DB schema. > Copyright (C) 2017 - Akamai Technologies, Inc > > > > Patch: pg_home_share_path.patch > > Summary: Allows the slonik configuration utility to discover the postgresql installation share > path via the PG_HOME environment variable. Copyright (C) 2017 - Akamai Technologies, Inc > > > > Patch: remote_listen_serial_option.patch > > Summary: Provides a configuration option to allow slon daemon remote listeners to operate with > either “repeatable read” or “serializable” transaction isolation. Copyright (C) 2017 - Akamai Technologies, Inc > > > > > > Tom ☺ > > > > > > >
- Previous message: [Slony1-hackers] Akamai AMS patches
- Next message: [Slony1-hackers] Akamai AMS patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-hackers mailing list