A record 23 city and county employees in San Francisco made it over the $300,000 mark in pay this past fiscal year — topped by someone who made more than half a million dollars.

And no, it wasn’t the mayor.

At the top of the pay heap was the chief investment officer for the city’s retirement system, William Coaker Jr., coming in at $512,485.

Former Police Chief Greg Suhr was second — his salary was $300,727, and when he resigned under pressure in May, the sick leave, vacation time and other payouts that came due boosted his total to $401,517.

The highest overtime earner was sheriff’s Deputy Antonio Santiago. He put in for 5,009 hours of regular time and overtime last year, which averages out to more than 96 hours a week. That pushed his regular pay of $99,000-plus to $349,681.

The No. 2 overtime earner was sheriff’s Deputy Barry Bloom, whose willingness to work extra hours netted him $197,031 — bringing his total earnings to $316,059.

Santiago and Bloom have long been the kings of OT. Both have been among the city’s top earners for at least a decade.

“We are down 123 deputies. We have to fill the shifts, and they sign up,” Sheriff’s Department spokeswoman Eileen Hirst said of the two deputies. “It is all within the city and union contract guidelines.”

In fact, with so many unfilled slots, the Sheriff’s Department is scrambling to hire new deputies. In the meantime, the department has received a waiver from the city’s work rules that cap individual overtime.

“We are drafting people involuntarily to work overtime, so when someone volunteers to work, we are going to slot that person,” Hirst said.

The highest salary for a department head went to recently retired airport Director John Martin, who earned $331,959, without any overtime or special pay. No. 2 was Harlan Kelly, general manager of the Public Utilities Commission, at $325,628.

As for Mayor Ed Lee, he was all the way down at 28th on the overall pay list, at $292,815.

Happy Labor Day.

Pony up: Oakland Mayor Libby Schaaf has reason to hope city voters will back her call to pass a $600 million infrastructure and affordable-housing bond on the November ballot — a poll taken heading into the campaign indicated its chances were good, even as Oaklanders were souring on the overall direction of the city.

According to the June poll of 400 voters, paid for by the city and obtained by The Chronicle, 74 percent of those surveyed said they would OK the bond, even after being told potential negatives including the $300-a-year tax bump for the average homeowner.

That’s well above the two-thirds vote that Measure KK will need to pass this fall.

Support for the bond was strong across the board, the poll indicated. Homeowners, renters and residents of the flatlands and hills all backed it, and the favorable response cut across racial lines.

Schaaf and the City Council, which put Measure KK on the ballot, could use the good news — considering that the poll also found only 44 percent of respondents felt the city was going in the “right direction,” a 15-point drop from last year.

The number saying the city was on the “wrong track” rose eight points, to 36 percent — about on par with voters’ feelings in the final months of Mayor Jean Quan’s term.

The polling firm EMC conducted the telephone survey from June 19 to 23. The margin of error was 4.9 percentage points.

Southern front: Police unions are taking their beef with San Francisco District Attorney George Gascón statewide, with the first stop being his old home base of Los Angeles, where he started out as a beat cop and rose to become a deputy chief.

In a “President’s Message” to 18,000 LAPD officers and retirees, Los Angeles police union head Craig Lally slammed Gascón in the August edition of the union newspaper as a “failed D.A.” and “anti-police crusader” whose Proposition 47, the voter-approved 2014 measure that turned many nonviolent crimes into misdemeanors, “has contributed to a crime wave.”

If the slam sounds a lot like what you’d hear from the San Francisco Police Officers Association, it’s not surprising. Nathan Ballard, the local union’s media adviser, flew down to L.A. to talk to Lally before his broadside appeared.

The San Francisco union has been slamming Gascón for months over his decision to form a blue-ribbon panel to investigate racist text messages sent and received by SFPD cops.

The play in L.A. is pretty straightforward: Police unions think Gascón has his eye on running for state attorney general should current AG Kamala Harris be elected to the U.S. Senate, and they want to lay down early opposition to make his road as rough as possible.

Gascón spokesman Max Szabo took exception to both the message and messenger.

“The commission formed in the wake of the Rodney King beating gave the S.F. POA’s new ally (Lally) the distinction of being on a list of officers with at least six allegations of excessive force or improper tactics in just four years,” Szabo said.

The Los Angeles Times has reported that none of the allegations against Lally was upheld. Nonetheless, Szabo called him “truly a predictable choice for an emissary on the part of the S.F. POA — what’s that they say about the company you keep?”

San Francisco Chronicle columnists Phillip Matier and Andrew Ross appear Sundays, Mondays and Wednesdays. Matier can be seen on the KPIX-TV morning and evening news. He can also be heard on KCBS radio Monday through Friday at 7:50 a.m. and 5:50 p.m. Got a tip? Call (415) 777-8815, or email matierandross@sfchronicle.com Twitter: @matierandross